Hi All,

Can we land this patch upstream?
Feel free to add my tested-by.

Thanks.

Regards,
Shirish S

-----Original Message-----
From: S, Shirish <shiris...@amd.com> 
Sent: Wednesday, July 1, 2020 12:15 PM
To: Tony Lindgren <t...@atomide.com>; Sergey Senozhatsky 
<sergey.senozhat...@gmail.com>
Cc: Petr Mladek <pmla...@suse.com>; Andy Shevchenko 
<andy.shevche...@gmail.com>; Raul Rangel <rran...@google.com>; Sergey 
Senozhatsky <sergey.senozhatsky.w...@gmail.com>; linux-kernel 
<linux-kernel@vger.kernel.org>; Greg Kroah-Hartman 
<gre...@linuxfoundation.org>; Andy Shevchenko 
<andriy.shevche...@linux.intel.com>; k...@linutronix.de; S, Shirish 
<shiris...@amd.com>; Peter Zijlstra <pet...@infradead.org>; John Ogness 
<john.ogn...@linutronix.de>; Steven Rostedt <rost...@goodmis.org>
Subject: Re: UART/TTY console deadlock


On 6/30/2020 11:32 PM, Tony Lindgren wrote:
> * Sergey Senozhatsky <sergey.senozhat...@gmail.com> [200630 13:06]:
>> On (20/06/30 14:22), Petr Mladek wrote:
> ...
>
>>>>>> @@ -2284,8 +2289,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,9 +2300,9 @@ 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);
>>>>>> +                if (irq_shared)
>>>>>> +                        enable_irq(port->irq);
>>>>>>   
>>>>>>                  /*
>>>>>>                   * If the interrupt is not reasserted, or we otherwise
>>>>> I think that it might be safe but I am not 100% sure, sigh.
>>>> Yeah, I'm not 100%, but I'd give it a try.
>>> I do not feel brave enough to ack it today. But I am all for trying 
>>> it if anyone more familiar with the code is fine with it.
>> I see. Well, I suppose we need Ack-s from tty/serial/8250 maintainers.
>> I would not be very happy if _only_ printk people Ack the patch.

FWIW, the lockdep trace is not seen anymore with the patch applied.

Regards,

Shirish S

> This conditional disable for irq_shared does not look nice to me from 
> the other device point of view :)
>
> Would it be possible to just set up te dummy interrupt handler for the 
> startup, then change it back afterwards? See for example 
> omap8250_no_handle_irq().
>
> The other device for irq_shared should be capable of dealing with 
> spurious interrupts if it's shared.
>
> Regards,
>
> Tony

--
Regards,
Shirish S

Reply via email to