]> git.baikalelectronics.ru Git - kernel.git/commit
MN10300: fix SMP synchronization between txdma and serial driver
authorMark Salter <msalter@redhat.com>
Wed, 12 Dec 2012 15:36:38 +0000 (15:36 +0000)
committerDavid Howells <dhowells@redhat.com>
Wed, 12 Dec 2012 15:46:14 +0000 (15:46 +0000)
commit7e52aab07c3a9eafce84f1a8ed3c32906ccf7334
tree8833a5b7f169942e41ba907c54ba817b64be4ba2
parent6dfacb5c409ffabdc724744506bf14c1edc5559e
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>
arch/mn10300/kernel/asm-offsets.c
arch/mn10300/kernel/mn10300-serial-low.S
arch/mn10300/kernel/mn10300-serial.c
arch/mn10300/kernel/mn10300-serial.h