Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5efe92c6 authored by David Howells's avatar David Howells Committed by Linus Torvalds
Browse files

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: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 2b79aac9
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -196,6 +196,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;
@@ -207,6 +208,7 @@ try_again:


	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 & (PAGE_SIZE - 1);
	gdbstub_rx_outp = ix & (PAGE_SIZE - 1);


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