diff options
author | Greg Kurz | 2020-12-09 18:00:50 +0100 |
---|---|---|
committer | David Gibson | 2020-12-14 05:54:12 +0100 |
commit | 56cca10eb56f259dd7b479bbb2c66a87560e3146 (patch) | |
tree | f77028e7325cc85341c0760f5913f6a3b77f1289 /hw | |
parent | spapr: Pass sPAPR machine state down to spapr_pci_switch_vga() (diff) | |
download | qemu-56cca10eb56f259dd7b479bbb2c66a87560e3146.tar.gz qemu-56cca10eb56f259dd7b479bbb2c66a87560e3146.tar.xz qemu-56cca10eb56f259dd7b479bbb2c66a87560e3146.zip |
spapr: Don't use qdev_get_machine() in spapr_msi_write()
spapr_phb_realize() passes the sPAPR machine state as opaque data
for the I/O callbacks:
memory_region_init_io(&sphb->msiwindow, OBJECT(sphb), &spapr_msi_ops, spapr,
^^^^^
"msi", msi_window_size);
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <20201209170052.1431440-5-groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ppc/spapr_pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index cff76479c7..76d7c91e9c 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -747,7 +747,7 @@ static PCIINTxRoute spapr_route_intx_pin_to_irq(void *opaque, int pin) static void spapr_msi_write(void *opaque, hwaddr addr, uint64_t data, unsigned size) { - SpaprMachineState *spapr = SPAPR_MACHINE(qdev_get_machine()); + SpaprMachineState *spapr = opaque; uint32_t irq = data; trace_spapr_pci_msi_write(addr, data, irq); |