From 004b50f4ed2accb56069d56714a32484f8b83ec0 Mon Sep 17 00:00:00 2001 From: David Howells Date: Wed, 3 Dec 2008 16:33:14 +0000 Subject: 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 Signed-off-by: Linus Torvalds --- arch/mn10300/kernel/gdb-io-serial.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/mn10300/kernel') diff --git a/arch/mn10300/kernel/gdb-io-serial.c b/arch/mn10300/kernel/gdb-io-serial.c index 9a6d4e8ebe7..11584c51acd 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) 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) { -- cgit v1.2.3-70-g09d2