diff options
author | David Howells <dhowells@redhat.com> | 2008-12-03 11:33:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-03 19:47:40 -0500 |
commit | 004b50f4ed2accb56069d56714a32484f8b83ec0 (patch) | |
tree | 7b8a8960972fed8e2c7bff027eb039e7e2d8d7f6 /arch/mn10300 | |
parent | 8711cca2251f1fc3beb870a75ff847bb55225490 (diff) |
MN10300: Introduce barriers to replace removed volatiles in gdbstub 16550 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>
Diffstat (limited to 'arch/mn10300')
-rw-r--r-- | arch/mn10300/kernel/gdb-io-serial.c | 2 |
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) { |