Skip to content

Commit

Permalink
MN10300: Introduce barriers to replace removed volatiles in gdbstub 1…
Browse files Browse the repository at this point in the history
…6550 driver

Introduce into the MN10300 gdbstub 16550 driver a couple of barrier() calls to
replace the removed volatility of the input/output index variables for the Rx
ring buffer.  A previous patch added them into the on-chip serial port driver.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
David Howells authored and Linus Torvalds committed Dec 4, 2008
1 parent 8711cca commit 004b50f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/mn10300/kernel/gdb-io-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand Down

0 comments on commit 004b50f

Please sign in to comment.