[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 04/18] hw/isa/vt82c686.c: Embed i8259 irq in device state instead
From: |
Michael S. Tsirkin |
Subject: |
[PULL 04/18] hw/isa/vt82c686.c: Embed i8259 irq in device state instead of allocating |
Date: |
Wed, 11 Sep 2024 09:51:34 -0400 |
From: BALATON Zoltan <balaton@eik.bme.hu>
To avoid a warning about unfreed qemu_irq embed the i8259 irq in the
device state instead of allocating it.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-Id:
<b70b9e72063b4dd4005bf4bc040b84f2bb617bf4.1719690591.git.balaton@eik.bme.hu>
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
hw/isa/vt82c686.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
index 505b44c4e6..82591e3e07 100644
--- a/hw/isa/vt82c686.c
+++ b/hw/isa/vt82c686.c
@@ -592,6 +592,8 @@ OBJECT_DECLARE_SIMPLE_TYPE(ViaISAState, VIA_ISA)
struct ViaISAState {
PCIDevice dev;
+
+ IRQState i8259_irq;
qemu_irq cpu_intr;
qemu_irq *isa_irqs_in;
uint16_t irq_state[ISA_NUM_IRQS];
@@ -715,13 +717,12 @@ static void via_isa_realize(PCIDevice *d, Error **errp)
ViaISAState *s = VIA_ISA(d);
DeviceState *dev = DEVICE(d);
PCIBus *pci_bus = pci_get_bus(d);
- qemu_irq *isa_irq;
ISABus *isa_bus;
int i;
qdev_init_gpio_out_named(dev, &s->cpu_intr, "intr", 1);
qdev_init_gpio_in_named(dev, via_isa_pirq, "pirq", PCI_NUM_PINS);
- isa_irq = qemu_allocate_irqs(via_isa_request_i8259_irq, s, 1);
+ qemu_init_irq(&s->i8259_irq, via_isa_request_i8259_irq, s, 0);
isa_bus = isa_bus_new(dev, pci_address_space(d), pci_address_space_io(d),
errp);
@@ -729,7 +730,7 @@ static void via_isa_realize(PCIDevice *d, Error **errp)
return;
}
- s->isa_irqs_in = i8259_init(isa_bus, *isa_irq);
+ s->isa_irqs_in = i8259_init(isa_bus, &s->i8259_irq);
isa_bus_register_input_irqs(isa_bus, s->isa_irqs_in);
i8254_pit_init(isa_bus, 0x40, 0, NULL);
i8257_dma_init(OBJECT(d), isa_bus, 0);
--
MST
- [PULL 06/18] hw/pci/pci-hmp-cmds: Avoid displaying bogus size in 'info pci', (continued)
- [PULL 06/18] hw/pci/pci-hmp-cmds: Avoid displaying bogus size in 'info pci', Michael S. Tsirkin, 2024/09/11
- [PULL 01/18] virtio: Allow .get_vhost() without vhost_started, Michael S. Tsirkin, 2024/09/11
- [PULL 14/18] virtio-pci: Add lookup subregion of VirtIOPCIRegion MR, Michael S. Tsirkin, 2024/09/11
- [PULL 07/18] virtio: rename virtio_split_packed_update_used_idx, Michael S. Tsirkin, 2024/09/11
- [PULL 15/18] hw/cxl: fix physical address field in get scan media results output, Michael S. Tsirkin, 2024/09/11
- [PULL 12/18] tests/acpi: pc: update golden masters for DSDT, Michael S. Tsirkin, 2024/09/11
- [PULL 08/18] intel_iommu: Fix invalidation descriptor type field, Michael S. Tsirkin, 2024/09/11
- [PULL 11/18] hw/i386/acpi-build: Return a pre-computed _PRT table, Michael S. Tsirkin, 2024/09/11
- [PULL 02/18] virtio: Always reset vhost devices, Michael S. Tsirkin, 2024/09/11
- [PULL 04/18] hw/isa/vt82c686.c: Embed i8259 irq in device state instead of allocating,
Michael S. Tsirkin <=
- [PULL 09/18] intel_iommu: Make PASID-cache and PIOTLB type invalid in legacy mode, Michael S. Tsirkin, 2024/09/11
- [PULL 10/18] tests/acpi: pc: allow DSDT acpi table changes, Michael S. Tsirkin, 2024/09/11
- [PULL 17/18] virtio-mem: don't warn about THP sizes on a kernel without THP support, Michael S. Tsirkin, 2024/09/11
- [PULL 03/18] hw: Move declaration of IRQState to header and add init function, Michael S. Tsirkin, 2024/09/11
- [PULL 05/18] pci: don't skip function 0 occupancy verification for devfn auto assign, Michael S. Tsirkin, 2024/09/11
- [PULL 18/18] hw/acpi/ich9: Add periodic and swsmi timer, Michael S. Tsirkin, 2024/09/11
- Re: [PULL 00/18] virtio,pc,pci: features, fixes, cleanups, Peter Maydell, 2024/09/13