]> git.proxmox.com Git - mirror_qemu.git/commitdiff
sun4u: move ISABus inside of EBusState
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Thu, 21 Dec 2017 07:32:57 +0000 (07:32 +0000)
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tue, 9 Jan 2018 21:31:31 +0000 (21:31 +0000)
Since the EBus is effectively a PCI-ISA bridge then the underlying ISA bus
should be contained within the PCI bridge itself.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
hw/sparc64/sun4u.c

index 394b7d6c5976f36ed95e7caf84ad4d01b6d92044..63b4aaa6eb25701395939ace4d6f75e3ac3252ad 100644 (file)
@@ -84,6 +84,7 @@ typedef struct EbusState {
     /*< private >*/
     PCIDevice parent_obj;
 
+    ISABus *isa_bus;
     MemoryRegion bar0;
     MemoryRegion bar1;
 } EbusState;
@@ -245,8 +246,10 @@ static void ebus_realize(PCIDevice *pci_dev, Error **errp)
 {
     EbusState *s = EBUS(pci_dev);
 
-    if (!isa_bus_new(DEVICE(pci_dev), get_system_memory(),
-                     pci_address_space_io(pci_dev), errp)) {
+    s->isa_bus = isa_bus_new(DEVICE(pci_dev), get_system_memory(),
+                             pci_address_space_io(pci_dev), errp);
+    if (!s->isa_bus) {
+        error_setg(errp, "unable to instantiate EBUS ISA bus");
         return;
     }