Re: UART/TTY console deadlock
From: Sergey Senozhatsky
Date: Mon Jul 06 2020 - 10:43:19 EST
On (20/07/06 13:31), Kurt Kanzenbach wrote:
> >> @@ -2275,6 +2275,7 @@ int serial8250_do_startup(struct uart_port *port)
> >>
> >> if (port->irq && !(up->port.flags & UPF_NO_THRE_TEST)) {
> >> unsigned char iir1;
> >> +
> >> /*
> >> * Test for UARTs that do not reassert THRE when the
> >> * transmitter is idle and the interrupt has already
> >> @@ -2284,8 +2285,6 @@ int serial8250_do_startup(struct uart_port *port)
> >> * allow register changes to become visible.
> >> */
> >> spin_lock_irqsave(&port->lock, flags);
> >> - if (up->port.irqflags & IRQF_SHARED)
> >> - disable_irq_nosync(port->irq);
> >>
> >> wait_for_xmitr(up, UART_LSR_THRE);
> >> serial_port_out_sync(port, UART_IER, UART_IER_THRI);
> >> @@ -2297,8 +2296,6 @@ int serial8250_do_startup(struct uart_port *port)
> >> iir = serial_port_in(port, UART_IIR);
> >> serial_port_out(port, UART_IER, 0);
> >>
> >> - if (port->irqflags & IRQF_SHARED)
> >> - enable_irq(port->irq);
> >> spin_unlock_irqrestore(&port->lock, flags);
> >>
> >> /*
> >
> > ...which effectively is a revert of
> >
> > 768aec0b5bcc ("serial: 8250: fix shared interrupts issues with SMP and
> > RT kernels")
>
> Please, don't revert that commit. I've faced the same issue as described
> in the commit log. There is hardware available with shared UART
> interrupt lines.
Will this patch break that hardware?
https://lore.kernel.org/lkml/20200702051213.GB3450@xxxxxxxxxxxxxxxxxxxxxxxx/
-ss