From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60122) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaxqJ-0007tV-MT for qemu-devel@nongnu.org; Wed, 14 Dec 2011 18:02:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RaxqI-0006R7-Ad for qemu-devel@nongnu.org; Wed, 14 Dec 2011 18:02:31 -0500 Received: from smtp1-g21.free.fr ([212.27.42.1]:50720) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaxqH-0006Qh-A5 for qemu-devel@nongnu.org; Wed, 14 Dec 2011 18:02:30 -0500 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Thu, 15 Dec 2011 00:02:36 +0100 Message-Id: <1323903763-22933-5-git-send-email-hpoussin@reactos.org> In-Reply-To: <1323903763-22933-1-git-send-email-hpoussin@reactos.org> References: <1323903763-22933-1-git-send-email-hpoussin@reactos.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 04/11] pc: give ISA bus to ISA methods List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori , =?UTF-8?q?Herv=C3=A9=20Poussineau?= Signed-off-by: Herv=C3=A9 Poussineau --- hw/pc.h | 2 +- hw/pc_piix.c | 3 +-- hw/piix_pci.c | 8 +++++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/hw/pc.h b/hw/pc.h index 5a33703..5afd16b 100644 --- a/hw/pc.h +++ b/hw/pc.h @@ -183,7 +183,7 @@ struct PCII440FXState; typedef struct PCII440FXState PCII440FXState; =20 PCIBus *i440fx_init(PCII440FXState **pi440fx_state, int *piix_devfn, - qemu_irq *pic, + ISABus **isa_bus, qemu_irq *pic, MemoryRegion *address_space_mem, MemoryRegion *address_space_io, ram_addr_t ram_size, diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 347e2e0..5e29d3c 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -136,7 +136,7 @@ static void pc_init1(MemoryRegion *system_memory, gsi =3D qemu_allocate_irqs(gsi_handler, gsi_state, GSI_NUM_PINS); =20 if (pci_enabled) { - pci_bus =3D i440fx_init(&i440fx_state, &piix3_devfn, gsi, + pci_bus =3D i440fx_init(&i440fx_state, &piix3_devfn, &isa_bus, g= si, system_memory, system_io, ram_size, below_4g_mem_size, 0x100000000ULL - below_4g_mem_size, @@ -145,7 +145,6 @@ static void pc_init1(MemoryRegion *system_memory, ? 0 : ((uint64_t)1 << 62)), pci_memory, ram_memory); - isa_bus =3D NULL; } else { pci_bus =3D NULL; i440fx_state =3D NULL; diff --git a/hw/piix_pci.c b/hw/piix_pci.c index d183443..aef2d7f 100644 --- a/hw/piix_pci.c +++ b/hw/piix_pci.c @@ -263,7 +263,7 @@ static int i440fx_initfn(PCIDevice *dev) static PCIBus *i440fx_common_init(const char *device_name, PCII440FXState **pi440fx_state, int *piix3_devfn, - qemu_irq *pic, + ISABus **isa_bus, qemu_irq *pic, MemoryRegion *address_space_mem, MemoryRegion *address_space_io, ram_addr_t ram_size, @@ -325,6 +325,8 @@ static PCIBus *i440fx_common_init(const char *device_= name, PIIX_NUM_PIRQS); } piix3->pic =3D pic; + *isa_bus =3D DO_UPCAST(ISABus, qbus, + qdev_get_child_bus(&piix3->dev.qdev, "isa.0")); =20 (*pi440fx_state)->piix3 =3D piix3; =20 @@ -341,7 +343,7 @@ static PCIBus *i440fx_common_init(const char *device_= name, } =20 PCIBus *i440fx_init(PCII440FXState **pi440fx_state, int *piix3_devfn, - qemu_irq *pic, + ISABus **isa_bus, qemu_irq *pic, MemoryRegion *address_space_mem, MemoryRegion *address_space_io, ram_addr_t ram_size, @@ -354,7 +356,7 @@ PCIBus *i440fx_init(PCII440FXState **pi440fx_state, i= nt *piix3_devfn, { PCIBus *b; =20 - b =3D i440fx_common_init("i440FX", pi440fx_state, piix3_devfn, pic, + b =3D i440fx_common_init("i440FX", pi440fx_state, piix3_devfn, isa_b= us, pic, address_space_mem, address_space_io, ram_size= , pci_hole_start, pci_hole_size, pci_hole64_size, pci_hole64_size, --=20 1.7.7.3