[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 04/14] raven: some minor IRQ-related tidy-ups
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 04/14] raven: some minor IRQ-related tidy-ups |
Date: |
Tue, 25 Sep 2018 17:01:44 +1000 |
From: Mark Cave-Ayland <address@hidden>
This really lays the groundwork for the upcoming patches: it renames the
irqs PREPPCIState struct member to pci_irqs (as soon there will be a
distinction) and then changes the raven IRQ opaque to use PREPPCIState
instead of just irqs array.
Signed-off-by: Mark Cave-Ayland <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Hervé Poussineau <address@hidden>
Tested-by: Hervé Poussineau <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/pci-host/prep.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/hw/pci-host/prep.c b/hw/pci-host/prep.c
index 88f035c20b..9b36f19c97 100644
--- a/hw/pci-host/prep.c
+++ b/hw/pci-host/prep.c
@@ -55,7 +55,7 @@ typedef struct RavenPCIState {
typedef struct PRePPCIState {
PCIHostState parent_obj;
- qemu_irq irq[PCI_NUM_PINS];
+ qemu_irq pci_irqs[PCI_NUM_PINS];
PCIBus pci_bus;
AddressSpace pci_io_as;
MemoryRegion pci_io;
@@ -194,9 +194,9 @@ static int raven_map_irq(PCIDevice *pci_dev, int irq_num)
static void raven_set_irq(void *opaque, int irq_num, int level)
{
- qemu_irq *pic = opaque;
+ PREPPCIState *s = opaque;
- qemu_set_irq(pic[irq_num] , level);
+ qemu_set_irq(s->pci_irqs[irq_num], level);
}
static AddressSpace *raven_pcihost_set_iommu(PCIBus *bus, void *opaque,
@@ -223,13 +223,12 @@ static void raven_pcihost_realizefn(DeviceState *d, Error
**errp)
int i;
for (i = 0; i < PCI_NUM_PINS; i++) {
- sysbus_init_irq(dev, &s->irq[i]);
+ sysbus_init_irq(dev, &s->pci_irqs[i]);
}
qdev_init_gpio_in(d, raven_change_gpio, 1);
- pci_bus_irqs(&s->pci_bus, raven_set_irq, raven_map_irq, s->irq,
- PCI_NUM_PINS);
+ pci_bus_irqs(&s->pci_bus, raven_set_irq, raven_map_irq, s, PCI_NUM_PINS);
memory_region_init_io(&h->conf_mem, OBJECT(h), &pci_host_conf_le_ops, s,
"pci-conf-idx", 4);
--
2.17.1
- [Qemu-ppc] [PULL 00/14] ppc-for-3.1 queue 20180925, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 03/14] hw/ppc: on 40p machine, change default firmware to OpenBIOS, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 06/14] spapr: introduce a spapr_irq class 'nr_msis' attribute, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 02/14] target/ppc/cpu-models: Re-group the 970 CPUs together again, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 05/14] 40p: use OR gate to wire up raven PCI interrupts, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 07/14] spapr: increase the size of the IRQ number space, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 04/14] raven: some minor IRQ-related tidy-ups,
David Gibson <=
- [Qemu-ppc] [PULL 01/14] Record history of ppcemb target in common.json, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 12/14] scsi: remove unused lsi53c895a_create() and lsi53c810_create() functions, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 08/14] spapr_pci: add an extra 'nr_msis' argument to spapr_populate_pci_dt, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 09/14] sm501: Adjust endianness of pixel value in rectangle fill, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 14/14] 40p: add fixed IRQ routing for LSI SCSI device, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 11/14] scsi: move lsi53c8xx_create() callers to lsi53c8xx_handle_legacy_cmdline(), David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 10/14] scsi: add lsi53c8xx_handle_legacy_cmdline() function, David Gibson, 2018/09/25
- [Qemu-ppc] [PULL 13/14] lsi53c895a: add optional external IRQ via qdev, David Gibson, 2018/09/25
- Re: [Qemu-ppc] [PULL 00/14] ppc-for-3.1 queue 20180925, Peter Maydell, 2018/09/25