qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 5/5] isa/piix4: Resolve redundant i8259[] attribute


From: BALATON Zoltan
Subject: Re: [PATCH v2 5/5] isa/piix4: Resolve redundant i8259[] attribute
Date: Sat, 12 Feb 2022 14:19:51 +0100 (CET)

On Sat, 12 Feb 2022, Bernhard Beschow wrote:
This is a follow-up on patch "malta: Move PCI interrupt handling from
gt64xxx to piix4" where i8259[] was moved from MaltaState to PIIX4State
to make the code movement more obvious. However, i8259[] seems redundant
to *isa, so remove it.

Should this be squashed in patch 1 or at least come after it? Or are there some other changes needed before this patch?

Regards,
BALATON Zoltan

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
hw/isa/piix4.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c
index a9322851db..692fa8d1f9 100644
--- a/hw/isa/piix4.c
+++ b/hw/isa/piix4.c
@@ -43,7 +43,6 @@ struct PIIX4State {
    PCIDevice dev;
    qemu_irq cpu_intr;
    qemu_irq *isa;
-    qemu_irq i8259[ISA_NUM_IRQS];

    int32_t pci_irq_levels[PIIX_NUM_PIRQS];

@@ -73,7 +72,7 @@ static void piix4_set_irq(void *opaque, int irq_num, int 
level)
                pic_level |= s->pci_irq_levels[i];
            }
        }
-        qemu_set_irq(s->i8259[pic_irq], pic_level);
+        qemu_set_irq(s->isa[pic_irq], pic_level);
    }
}

@@ -323,9 +322,5 @@ DeviceState *piix4_create(PCIBus *pci_bus, ISABus 
**isa_bus, I2CBus **smbus)

    pci_bus_irqs(pci_bus, piix4_set_irq, pci_slot_get_pirq, s, PIIX_NUM_PIRQS);

-    for (int i = 0; i < ISA_NUM_IRQS; i++) {
-        s->i8259[i] = qdev_get_gpio_in_named(dev, "isa", i);
-    }
-
    return dev;
}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]