On Tue, 2009-10-27 at 06:19 -0400, [email protected] wrote: > Revision > 7720 > Author > sonicz > Date > 2009-10-27 06:19:14 -0400 (Tue, 27 Oct 2009) > Log Message > Split uart rx lock from uart lock to avoid dead lock. > > rx lock in bfin serial driver is used to protect rx buffer from > concurrent access in DMA mode in timer and rx interrupt routines > on different CPUs. It is independant from uart lock which is to > protect tx buffer. Uart tx transfer may be started up from rx > interrupt handler with lock held if low latency is expected. This > dead lock is avoided by splitting rx and tx lock. > > In PIO mode, rx lock is not necessary, because handle_simple_irq > and handle_level_irq ensure driver interrupt handler is called once > on one core.
The rx lock may also be necessary if serial rx irq is handled in thread. handle_simple_irq() simply wakes up the irq thread then exit. The serial rx irq handler thread may be executed by two cores. It is at least not bad to protect the rx buffer using the rx lock. -Yi _______________________________________________ Linux-kernel-commits mailing list [email protected] https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits
