mbox series

[0/2] allwinner-a10: Fix interrupt controller regression

Message ID 20230606104609.3692557-1-peter.maydell@linaro.org
Headers show
Series allwinner-a10: Fix interrupt controller regression | expand

Message

Peter Maydell June 6, 2023, 10:46 a.m. UTC
In commit 2c5fa0778c3b430 we fixed an endianness bug in the Allwinner
A10 PIC model; however in the process we introduced a regression.
This is because the old code was robust against the incoming 'level'
argument being something other than 0 or 1, whereas the new code was
not.

In particular, the allwinner-sdhost code treats its IRQ line as
0-vs-non-0 rather than 0-vs-1, so when the SD controller set its IRQ
line for any reason other than transmit the interrupt controller would
ignore it. The observed effect was a guest timeout when rebooting the
guest kernel.

Patch 1 in this series fixes the regression by restoring the
old behaviour of aw_a10_pic_set_irq() for non-0 levels; it
is stable material.

Patch 2 changes the SD controller to follow our usual convention that
simple IRQ lines only send 0 or 1; this isn't strictly necessary with
patch 1, but it avoids future surprises. It doesn't need to go to
stable.

thanks
-- PMM

Peter Maydell (2):
  hw/intc/allwinner-a10-pic: Handle IRQ levels other than 0 or 1
  hw/sd/allwinner-sdhost: Don't send non-boolean IRQ line levels

 hw/intc/allwinner-a10-pic.c | 2 +-
 hw/sd/allwinner-sdhost.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Philippe Mathieu-Daudé June 6, 2023, 12:36 p.m. UTC | #1
On 6/6/23 12:46, Peter Maydell wrote:

> Peter Maydell (2):
>    hw/intc/allwinner-a10-pic: Handle IRQ levels other than 0 or 1
>    hw/sd/allwinner-sdhost: Don't send non-boolean IRQ line levels

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>