2024-04-05 03:10:24

by Michael Ellerman

[permalink] [raw]
Subject: Re: [PATCH v2] serial/pmac_zilog: Remove flawed mitigation for rx irq flood

Finn Thain <[email protected]> writes:
> The mitigation was intended to stop the irq completely. That may be
> better than a hard lock-up but it turns out that you get a crash anyway
> if you're using pmac_zilog as a serial console:
>
> ttyPZ0: pmz: rx irq flood !
> BUG: spinlock recursion on CPU#0, swapper/0
>
> That's because the pr_err() call in pmz_receive_chars() results in
> pmz_console_write() attempting to lock a spinlock already locked in
> pmz_interrupt(). With CONFIG_DEBUG_SPINLOCK=y, this produces a fatal
> BUG splat. The spinlock in question is the one in struct uart_port.
>
> Even when it's not fatal, the serial port rx function ceases to work.
> Also, the iteration limit doesn't play nicely with QEMU, as can be
> seen in the bug report linked below.
>
> A web search for other reports of the error message "pmz: rx irq flood"
> didn't produce anything. So I don't think this code is needed any more.
> Remove it.

Yeah I think you're probably right.

I assume you have tested this on an actual pmac, as well as qemu?

cheers


2024-04-06 03:20:02

by Finn Thain

[permalink] [raw]
Subject: Re: [PATCH v2] serial/pmac_zilog: Remove flawed mitigation for rx irq flood

On Fri, 5 Apr 2024, Michael Ellerman wrote:

> I assume you have tested this on an actual pmac, as well as qemu?
>

I tested the patched driver and its console functionality using Zilog SCC
hardware in a Mac IIci, as well as QEMU's q800 virtual machine.

That should suffice from a code coverage point-of-view, since
pmz_receive_chars() is portable and independent of CONFIG_PPC_PMAC.

Moreover, I don't know how to get my PowerMac G3 to execute the kludge
that's to be removed here. I can't prove it's impossible, though.

2024-04-08 05:30:13

by Michael Ellerman

[permalink] [raw]
Subject: Re: [PATCH v2] serial/pmac_zilog: Remove flawed mitigation for rx irq flood

Finn Thain <[email protected]> writes:
> On Fri, 5 Apr 2024, Michael Ellerman wrote:
>
>> I assume you have tested this on an actual pmac, as well as qemu?
>>
>
> I tested the patched driver and its console functionality using Zilog SCC
> hardware in a Mac IIci, as well as QEMU's q800 virtual machine.
>
> That should suffice from a code coverage point-of-view, since
> pmz_receive_chars() is portable and independent of CONFIG_PPC_PMAC.
>
> Moreover, I don't know how to get my PowerMac G3 to execute the kludge
> that's to be removed here. I can't prove it's impossible, though.

Thanks. That's good enough for me.

Acked-by: Michael Ellerman <[email protected]> (powerpc)

cheers