]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/mn10300/kernel/gdb-io-ttysm.c
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
[mv-sheeva.git] / arch / mn10300 / kernel / gdb-io-ttysm.c
index c5451592d403065b3e38c52b4e8f83c0ae7eece3..a560bbc3137d3c93fd2a14eddbb79ed5b8abc23f 100644 (file)
@@ -20,7 +20,7 @@
 #include <asm/system.h>
 #include <asm/gdb-stub.h>
 #include <asm/exceptions.h>
-#include <asm/unit/clock.h>
+#include <unit/clock.h>
 #include "mn10300-serial.h"
 
 #if defined(CONFIG_GDBSTUB_ON_TTYSM0)
@@ -196,6 +196,7 @@ int gdbstub_io_rx_char(unsigned char *_ch, int nonblock)
 try_again:
        /* pull chars out of the buffer */
        ix = gdbstub_rx_outp;
+       barrier();
        if (ix == gdbstub_rx_inp) {
                if (nonblock)
                        return -EAGAIN;
@@ -207,6 +208,7 @@ try_again:
 
        ch = gdbstub_rx_buffer[ix++];
        st = gdbstub_rx_buffer[ix++];
+       barrier();
        gdbstub_rx_outp = ix & (PAGE_SIZE - 1);
 
        st &= SC01STR_RXF | SC01STR_RBF | SC01STR_FEF | SC01STR_PEF |