diff options
author | Mark Salter <msalter@redhat.com> | 2012-12-12 10:36:38 -0500 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2012-12-12 10:46:14 -0500 |
commit | 8f0bcbcab016324c2a3ba4cc715e8e523c29a578 (patch) | |
tree | 8833a5b7f169942e41ba907c54ba817b64be4ba2 /arch/mn10300/kernel/asm-offsets.c | |
parent | 8d160027ff234bddea627ba54c2b85efa1884867 (diff) |
MN10300: fix SMP synchronization between txdma and serial driver
The SoC serial port driver uses a high priority interrupt to handle tx of
characters in the tx ring buffer. The driver needs to disable/enable this IRQ
from outside of irq context. The original code to do this is not foolproof on
SMP machines because the IRQ running on one core could still access the serial
port for a short time after the driver running on another core disables the
interrupt. This patch adds a flag to tell the IRQ handler that the driver
wants to disable the interrupt. After seeing the flag, the IRQ handler will
immediately disable the interrupt and exit. After setting the flag, the driver
will wait for interrupt to be disabled by the IRQ handler.
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'arch/mn10300/kernel/asm-offsets.c')
-rw-r--r-- | arch/mn10300/kernel/asm-offsets.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mn10300/kernel/asm-offsets.c b/arch/mn10300/kernel/asm-offsets.c index 96f24fab7de6..47b3bb0c04ff 100644 --- a/arch/mn10300/kernel/asm-offsets.c +++ b/arch/mn10300/kernel/asm-offsets.c | |||
@@ -96,7 +96,7 @@ void foo(void) | |||
96 | OFFSET(__rx_outp, mn10300_serial_port, rx_outp); | 96 | OFFSET(__rx_outp, mn10300_serial_port, rx_outp); |
97 | OFFSET(__uart_state, mn10300_serial_port, uart.state); | 97 | OFFSET(__uart_state, mn10300_serial_port, uart.state); |
98 | OFFSET(__tx_xchar, mn10300_serial_port, tx_xchar); | 98 | OFFSET(__tx_xchar, mn10300_serial_port, tx_xchar); |
99 | OFFSET(__tx_break, mn10300_serial_port, tx_break); | 99 | OFFSET(__tx_flags, mn10300_serial_port, tx_flags); |
100 | OFFSET(__intr_flags, mn10300_serial_port, intr_flags); | 100 | OFFSET(__intr_flags, mn10300_serial_port, intr_flags); |
101 | OFFSET(__rx_icr, mn10300_serial_port, rx_icr); | 101 | OFFSET(__rx_icr, mn10300_serial_port, rx_icr); |
102 | OFFSET(__tx_icr, mn10300_serial_port, tx_icr); | 102 | OFFSET(__tx_icr, mn10300_serial_port, tx_icr); |