aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBALATON Zoltan <balaton@eik.bme.hu>2024-04-11 00:25:43 +0200
committerNabih Estefan <nabihestefan@google.com>2024-05-01 16:38:08 +0000
commitaaacd32e92f105d7e3a8cd84860b119b5e592d68 (patch)
treeb05f39b0e7d4e5a896b194c57addd08b51e58b0f
parent352982dfbbe88c641b7e573b25368f37fc2fc9cb (diff)
downloadqemu-aaacd32e92f105d7e3a8cd84860b119b5e592d68.tar.gz
hw/isa/vt82c686: Keep track of PIRQ/PINT pins separately
Move calculation of mask after the switch which sets the function number for PIRQ/PINT pins to make sure the state of these pins are kept track of separately and IRQ is raised if any of them is active. Cc: qemu-stable@nongnu.org Fixes: 7e01bd80c1 hw/isa/vt82c686: Bring back via_isa_set_irq() Change-Id: I56bf863e7030bfd0449aa900b45e81a731ce1f93 Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240410222543.0EA534E6005@zero.eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> (cherry picked from commit f33274265a242df5d9fdb00915fe72fbb1b2a3c4) Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r--hw/isa/vt82c686.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
index 9c2333a277..0334431219 100644
--- a/hw/isa/vt82c686.c
+++ b/hw/isa/vt82c686.c
@@ -613,7 +613,7 @@ void via_isa_set_irq(PCIDevice *d, int pin, int level)
ViaISAState *s = VIA_ISA(pci_get_function_0(d));
uint8_t irq = d->config[PCI_INTERRUPT_LINE], max_irq = 15;
int f = PCI_FUNC(d->devfn);
- uint16_t mask = BIT(f);
+ uint16_t mask;
switch (f) {
case 0: /* PIRQ/PINT inputs */
@@ -628,6 +628,7 @@ void via_isa_set_irq(PCIDevice *d, int pin, int level)
}
/* Keep track of the state of all sources */
+ mask = BIT(f);
if (level) {
s->irq_state[0] |= mask;
} else {