Skip to content

Commit

Permalink
hw/isa/vt82c686: Keep track of PIRQ/PINT pins separately
Browse files Browse the repository at this point in the history
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: 7e01bd8 hw/isa/vt82c686: Bring back via_isa_set_irq()
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 f332742)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
zbalaton authored and Michael Tokarev committed Apr 16, 2024
1 parent fcbb086 commit dd784cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hw/isa/vt82c686.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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 {
Expand Down

0 comments on commit dd784cb

Please sign in to comment.