Skip to contentSkip to conversation

hw/isa/vt82c686: Keep track of PIRQ/PINT pins separately

PATCH Applied BALATON Zoltan 2 participants 3 messages Apr 10, 2024 – Apr 15, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Fixes 7e01bd80c1 hw/isa/vt82c686: Bring back via_isa_set_irq()

---
Preferably for 9.0 if there will be another RC.

 hw/isa/vt82c686.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
hw/isa/vt82c686.c +2 -1
index aa91942745..8582ac0322 100644
@@ -658,7 +658,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 */
@@ -673,6 +673,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 {
Signature · 1 line
2.30.9
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · BALATON Zoltan

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.

Fixes 7e01bd80c1 hw/isa/vt82c686: Bring back via_isa_set_irq()

---
Preferably for 9.0 if there will be another RC.

  hw/isa/vt82c686.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
#2 lore raw
In reply to BALATON Zoltan
Quoted 11 lines · BALATON Zoltan

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.

Fixes 7e01bd80c1 hw/isa/vt82c686: Bring back via_isa_set_irq()

---
Preferably for 9.0 if there will be another RC.

  hw/isa/vt82c686.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

Queued, thanks.