|
@@ -99,6 +99,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;
|
|
@@ -110,6 +111,7 @@ int gdbstub_io_rx_char(unsigned char *_ch, int nonblock)
|
|
|
|
|
|
ch = gdbstub_rx_buffer[ix++];
|
|
|
st = gdbstub_rx_buffer[ix++];
|
|
|
+ barrier();
|
|
|
gdbstub_rx_outp = ix & 0x00000fff;
|
|
|
|
|
|
if (st & UART_LSR_BI) {
|