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>
This commit is contained in:
parent
8711cca225
commit
004b50f4ed
|
@ -99,6 +99,7 @@ int gdbstub_io_rx_char(unsigned char *_ch, int nonblock)
|
||||||
try_again:
|
try_again:
|
||||||
/* pull chars out of the buffer */
|
/* pull chars out of the buffer */
|
||||||
ix = gdbstub_rx_outp;
|
ix = gdbstub_rx_outp;
|
||||||
|
barrier();
|
||||||
if (ix == gdbstub_rx_inp) {
|
if (ix == gdbstub_rx_inp) {
|
||||||
if (nonblock)
|
if (nonblock)
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
|
@ -110,6 +111,7 @@ int gdbstub_io_rx_char(unsigned char *_ch, int nonblock)
|
||||||
|
|
||||||
ch = gdbstub_rx_buffer[ix++];
|
ch = gdbstub_rx_buffer[ix++];
|
||||||
st = gdbstub_rx_buffer[ix++];
|
st = gdbstub_rx_buffer[ix++];
|
||||||
|
barrier();
|
||||||
gdbstub_rx_outp = ix & 0x00000fff;
|
gdbstub_rx_outp = ix & 0x00000fff;
|
||||||
|
|
||||||
if (st & UART_LSR_BI) {
|
if (st & UART_LSR_BI) {
|
||||||
|
|
Reference in New Issue