OSDN Git Service

hw/isa/vt82c686: Bring back via_isa_set_irq()
authorBALATON Zoltan <balaton@eik.bme.hu>
Sun, 26 Nov 2023 22:49:29 +0000 (23:49 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 28 Nov 2023 13:26:37 +0000 (14:26 +0100)
commit7e01bd80c1580aa523d2a35c433d57266b9a396a
treebf257c83e8fa98e89776a90d4e03f37da50119e1
parent57c3150accefcb770dbf02539d723fb3864d49ea
hw/isa/vt82c686: Bring back via_isa_set_irq()

The VIA integrated south bridge chips combine several functions and
allow routing their interrupts to any of the ISA IRQs also allowing
multiple sources to share the same ISA IRQ. E.g. pegasos2 firmware
configures everything to use IRQ 9 but amigaone routes them to
separate ISA IRQs so the current simplified routing does not work.
Bring back via_isa_set_irq() and change it to take the component that
wants to change an IRQ and keep track of interrupt status of each
source separately and do the mapping to ISA IRQ within the ISA bridge.

This may not handle cases when an ISA IRQ is controlled by devices
directly, not going through via_isa_set_irq() such as serial, parallel
or keyboard but these IRQs being conventionally fixed are not likely
to be change by guests or share with other devices so this does not
cause a problem in practice.

This reverts commit 4e5a20b6da9b1f6d2e9621ed7eb8b239560104ae.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-ID: <1c3902d4166234bef0a476026441eaac3dd6cda5.1701035944.git.balaton@eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
hw/isa/vt82c686.c
include/hw/isa/vt82c686.h