]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/mn10300/kernel/gdb-io-ttysm.c
MN10300: Introduce barriers to replace removed volatiles in gdbstub
[linux-2.6-omap-h63xx.git] / arch / mn10300 / kernel / gdb-io-ttysm.c
index c5451592d403065b3e38c52b4e8f83c0ae7eece3..e94c25e8ca058e47d077060a76c3d12c7db7e910 100644 (file)
@@ -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 |