aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mn10300/kernel/gdb-io-serial.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/mn10300/kernel/gdb-io-serial.c b/arch/mn10300/kernel/gdb-io-serial.c
index 9a6d4e8ebe73..11584c51acd9 100644
--- a/arch/mn10300/kernel/gdb-io-serial.c
+++ b/arch/mn10300/kernel/gdb-io-serial.c
@@ -99,6 +99,7 @@ int gdbstub_io_rx_char(unsigned char *_ch, int nonblock)
99 try_again: 99 try_again:
100 /* pull chars out of the buffer */ 100 /* pull chars out of the buffer */
101 ix = gdbstub_rx_outp; 101 ix = gdbstub_rx_outp;
102 barrier();
102 if (ix == gdbstub_rx_inp) { 103 if (ix == gdbstub_rx_inp) {
103 if (nonblock) 104 if (nonblock)
104 return -EAGAIN; 105 return -EAGAIN;
@@ -110,6 +111,7 @@ int gdbstub_io_rx_char(unsigned char *_ch, int nonblock)
110 111
111 ch = gdbstub_rx_buffer[ix++]; 112 ch = gdbstub_rx_buffer[ix++];
112 st = gdbstub_rx_buffer[ix++]; 113 st = gdbstub_rx_buffer[ix++];
114 barrier();
113 gdbstub_rx_outp = ix & 0x00000fff; 115 gdbstub_rx_outp = ix & 0x00000fff;
114 116
115 if (st & UART_LSR_BI) { 117 if (st & UART_LSR_BI) {