On 7/25/07, Thomas Gleixner <[EMAIL PROTECTED]> wrote: > The port lock needs to be dropped across the tty_flip_buffer call, as it > would lead to a deadlock with the spin_lock(&port->lock) in uart_start() > > Uncovered by lockdep / preempt-rt > > Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
Instead of dropping the lock and reclaiming it, would it be better for me to rework the driver to only grab the lock in the 'meat' of mpc52xx_uart_int_rx_chars() and mpc52xx_uart_int_tx_chars()? (As opposed to holding the lock for the entirety of mpc52xx_uart_int()) What convention is used in other drivers? Cheers, g. > > > Index: linux-2.6.22/drivers/serial/mpc52xx_uart.c > =================================================================== > --- linux-2.6.22.orig/drivers/serial/mpc52xx_uart.c 2007-07-09 > 01:32:17.000000000 +0200 > +++ linux-2.6.22/drivers/serial/mpc52xx_uart.c 2007-07-25 21:06:11.000000000 > +0200 > @@ -501,7 +501,9 @@ mpc52xx_uart_int_rx_chars(struct uart_po > } > } > > + spin_unlock(&port->lock); > tty_flip_buffer_push(tty); > + spin_lock(&port->lock); > > return in_be16(&PSC(port)->mpc52xx_psc_status) & MPC52xx_PSC_SR_RXRDY; > } > > > _______________________________________________ > Linuxppc-embedded mailing list > [email protected] > https://ozlabs.org/mailman/listinfo/linuxppc-embedded > -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. [EMAIL PROTECTED] (403) 399-0195 _______________________________________________ Linuxppc-embedded mailing list [email protected] https://ozlabs.org/mailman/listinfo/linuxppc-embedded
