From: David Howells Date: Tue, 19 Feb 2008 18:58:54 +0000 (+0000) Subject: MN10300: Introduce barriers to replace removed volatiles in gdbstub X-Git-Tag: v2.6.25-rc3~115 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=5efe92c68045817b97927b748f369d407c1d89ab;p=linux-2.6-omap-h63xx.git MN10300: Introduce barriers to replace removed volatiles in gdbstub 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 Signed-off-by: Linus Torvalds --- diff --git a/arch/mn10300/kernel/gdb-io-ttysm.c b/arch/mn10300/kernel/gdb-io-ttysm.c index c5451592d40..e94c25e8ca0 100644 --- a/arch/mn10300/kernel/gdb-io-ttysm.c +++ b/arch/mn10300/kernel/gdb-io-ttysm.c @@ -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; @@ -207,6 +208,7 @@ try_again: 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 |