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

Peter Maydell posted 2 patches 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230606104609.3692557-1-peter.maydell@linaro.org
Maintainers: Beniamino Galvani <b.galvani@gmail.com>, Peter Maydell <peter.maydell@linaro.org>, Strahinja Jankovic <strahinja.p.jankovic@gmail.com>
hw/intc/allwinner-a10-pic.c | 2 +-
hw/sd/allwinner-sdhost.c    | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
[PATCH 0/2] allwinner-a10: Fix interrupt controller regression
Posted by Peter Maydell 11 months ago
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(-)

-- 
2.34.1
Re: [PATCH 0/2] allwinner-a10: Fix interrupt controller regression
Posted by Philippe Mathieu-Daudé 11 months ago
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>