]> git.baikalelectronics.ru Git - kernel.git/commit
MPSC serial driver tx locking
authorDave Jiang <djiang@mvista.com>
Sun, 6 May 2007 21:48:50 +0000 (14:48 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 7 May 2007 19:12:50 +0000 (12:12 -0700)
commitce19048c68f025a41d15269f13ff6ba2d60c8103
treecd3568ef8b75edbe9a21cd3b1a12cbdf0c044d02
parent701725da1ceffcef67225156d9a32e045c62c505
MPSC serial driver tx locking

The MPSC serial driver assumes that interrupt is always on to pick up the
DMA transmit ops that aren't submitted while the DMA engine is active.
However when irqs are off for a period of time such as operations under
kernel crash dump console messages do not show up due to additional DMA ops
are being dropped.  This makes console writes to process through all the tx
DMAs queued up before submitting a new request.

Also, the current locking mechanism does not protect the hardware registers
and ring buffer when a printk is done during the serial write operations.
The additional per port transmit lock provides a finer granular locking and
protects registers being clobbered while printks are nested within UART
writes.

Signed-off-by: Dave Jiang <djiang@mvista.com>
Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/serial/mpsc.c