Skip to content

Commit

Permalink
MN10300: Introduce barriers to replace removed volatiles in gdbstub
Browse files Browse the repository at this point in the history
Introduce into the MN10300 gdbstub a couple of barrier() calls to replace the
removed volatility of the input/output index variables for the Rx ring buffer.

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 Feb 19, 2008
1 parent 2b79aac commit 5efe92c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/mn10300/kernel/gdb-io-ttysm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -207,6 +208,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 & (PAGE_SIZE - 1);

st &= SC01STR_RXF | SC01STR_RBF | SC01STR_FEF | SC01STR_PEF |
Expand Down

0 comments on commit 5efe92c

Please sign in to comment.