diff options
author | Mark Salter <msalter@redhat.com> | 2012-12-12 15:36:38 +0000 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2012-12-12 15:46:14 +0000 |
commit | 8f0bcbcab016324c2a3ba4cc715e8e523c29a578 (patch) | |
tree | 8833a5b7f169942e41ba907c54ba817b64be4ba2 /arch/mn10300/kernel/mn10300-serial.h | |
parent | 8d160027ff234bddea627ba54c2b85efa1884867 (diff) | |
download | talos-obmc-linux-8f0bcbcab016324c2a3ba4cc715e8e523c29a578.tar.gz talos-obmc-linux-8f0bcbcab016324c2a3ba4cc715e8e523c29a578.zip |
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/mn10300-serial.h')
-rw-r--r-- | arch/mn10300/kernel/mn10300-serial.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/mn10300/kernel/mn10300-serial.h b/arch/mn10300/kernel/mn10300-serial.h index 6796499bf789..0004e61619a5 100644 --- a/arch/mn10300/kernel/mn10300-serial.h +++ b/arch/mn10300/kernel/mn10300-serial.h @@ -29,6 +29,10 @@ #define MNSCx_TX_SPACE 0x04 #define MNSCx_TX_EMPTY 0x08 +/* tx_flags bits */ +#define MNSCx_TX_BREAK 0x01 +#define MNSCx_TX_STOP 0x02 + #ifndef __ASSEMBLY__ struct mn10300_serial_port { @@ -36,7 +40,7 @@ struct mn10300_serial_port { unsigned rx_inp; /* pointer to rx input offset */ unsigned rx_outp; /* pointer to rx output offset */ u8 tx_xchar; /* high-priority XON/XOFF buffer */ - u8 tx_break; /* transmit break request */ + u8 tx_flags; /* transmit break/stop request */ u8 intr_flags; /* interrupt flags */ volatile u16 *rx_icr; /* Rx interrupt control register */ volatile u16 *tx_icr; /* Tx interrupt control register */ |