From nobody Wed Nov 5 22:36:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 153839437907534.217818505711875; Mon, 1 Oct 2018 04:46:19 -0700 (PDT) Received: from localhost ([::1]:37700 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6weX-0007MZ-W6 for importer@patchew.org; Mon, 01 Oct 2018 07:46:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6wd2-0006Vo-25 for qemu-devel@nongnu.org; Mon, 01 Oct 2018 07:44:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6wcw-000495-VS for qemu-devel@nongnu.org; Mon, 01 Oct 2018 07:44:43 -0400 Received: from 18.mo1.mail-out.ovh.net ([46.105.35.72]:50900) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g6wcw-00047b-LB for qemu-devel@nongnu.org; Mon, 01 Oct 2018 07:44:38 -0400 Received: from player791.ha.ovh.net (unknown [10.109.160.251]) by mo1.mail-out.ovh.net (Postfix) with ESMTP id 3B5001371BE for ; Mon, 1 Oct 2018 13:44:37 +0200 (CEST) Received: from zorba.kaod.org.com (LFbn-1-10605-110.w90-89.abo.wanadoo.fr [90.89.196.110]) (Authenticated sender: clg@kaod.org) by player791.ha.ovh.net (Postfix) with ESMTPSA id D7D6342009A; Mon, 1 Oct 2018 13:44:31 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: David Gibson Date: Mon, 1 Oct 2018 13:44:20 +0200 Message-Id: <20181001114421.1377-2-clg@kaod.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181001114421.1377-1-clg@kaod.org> References: <20181001114421.1377-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 622904123842399206 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtjedrudduhedgfeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 46.105.35.72 Subject: [Qemu-devel] [PATCH 1/2] ppc440_pcix: convert SysBus init method to a realize method X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , qemu-ppc@nongnu.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Greg Kurz Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/ppc/ppc440_pcix.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/hw/ppc/ppc440_pcix.c b/hw/ppc/ppc440_pcix.c index 64ed07afa658..42ef76b6f58a 100644 --- a/hw/ppc/ppc440_pcix.c +++ b/hw/ppc/ppc440_pcix.c @@ -466,17 +466,18 @@ const MemoryRegionOps ppc440_pcix_host_data_ops =3D { .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 -static int ppc440_pcix_initfn(SysBusDevice *dev) +static void ppc440_pcix_realize(DeviceState *dev, Error **errp) { + SysBusDevice *sbd =3D SYS_BUS_DEVICE(dev); PPC440PCIXState *s; PCIHostState *h; =20 h =3D PCI_HOST_BRIDGE(dev); s =3D PPC440_PCIX_HOST_BRIDGE(dev); =20 - sysbus_init_irq(dev, &s->irq); + sysbus_init_irq(sbd, &s->irq); memory_region_init(&s->busmem, OBJECT(dev), "pci bus memory", UINT64_M= AX); - h->bus =3D pci_register_root_bus(DEVICE(dev), NULL, ppc440_pcix_set_ir= q, + h->bus =3D pci_register_root_bus(dev, NULL, ppc440_pcix_set_irq, ppc440_pcix_map_irq, &s->irq, &s->busmem, get_system_io(), PCI_DEVFN(0, 0), 1, TYPE_PCI_BUS= ); =20 @@ -497,17 +498,14 @@ static int ppc440_pcix_initfn(SysBusDevice *dev) memory_region_add_subregion(&s->container, PCIC0_CFGADDR, &h->conf_mem= ); memory_region_add_subregion(&s->container, PCIC0_CFGDATA, &h->data_mem= ); memory_region_add_subregion(&s->container, PPC440_REG_BASE, &s->iomem); - sysbus_init_mmio(dev, &s->container); - - return 0; + sysbus_init_mmio(sbd, &s->container); } =20 static void ppc440_pcix_class_init(ObjectClass *klass, void *data) { - SysBusDeviceClass *k =3D SYS_BUS_DEVICE_CLASS(klass); DeviceClass *dc =3D DEVICE_CLASS(klass); =20 - k->init =3D ppc440_pcix_initfn; + dc->realize =3D ppc440_pcix_realize; dc->reset =3D ppc440_pcix_reset; } =20 --=20 2.17.1 From nobody Wed Nov 5 22:36:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1538394497094669.4099730805735; Mon, 1 Oct 2018 04:48:17 -0700 (PDT) Received: from localhost ([::1]:37705 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6wgI-0008Rp-Gh for importer@patchew.org; Mon, 01 Oct 2018 07:48:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60028) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6wd7-0006bV-Ie for qemu-devel@nongnu.org; Mon, 01 Oct 2018 07:44:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6wd2-0004D8-0t for qemu-devel@nongnu.org; Mon, 01 Oct 2018 07:44:49 -0400 Received: from 4.mo177.mail-out.ovh.net ([46.105.37.72]:60968) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g6wd1-0004CI-Q8 for qemu-devel@nongnu.org; Mon, 01 Oct 2018 07:44:43 -0400 Received: from player791.ha.ovh.net (unknown [10.109.146.76]) by mo177.mail-out.ovh.net (Postfix) with ESMTP id 64CD5CCBB6 for ; Mon, 1 Oct 2018 13:44:42 +0200 (CEST) Received: from zorba.kaod.org.com (LFbn-1-10605-110.w90-89.abo.wanadoo.fr [90.89.196.110]) (Authenticated sender: clg@kaod.org) by player791.ha.ovh.net (Postfix) with ESMTPSA id 1D078420090; Mon, 1 Oct 2018 13:44:37 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: David Gibson Date: Mon, 1 Oct 2018 13:44:21 +0200 Message-Id: <20181001114421.1377-3-clg@kaod.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181001114421.1377-1-clg@kaod.org> References: <20181001114421.1377-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 624311500663065574 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtjedrudduhedgfeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 46.105.37.72 Subject: [Qemu-devel] [PATCH 2/2] ppc4xx_pci: convert SysBus init method to a realize method X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , qemu-ppc@nongnu.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Greg Kurz Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/ppc/ppc4xx_pci.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/hw/ppc/ppc4xx_pci.c b/hw/ppc/ppc4xx_pci.c index b7642bac016b..86981be71024 100644 --- a/hw/ppc/ppc4xx_pci.c +++ b/hw/ppc/ppc4xx_pci.c @@ -300,8 +300,9 @@ static const VMStateDescription vmstate_ppc4xx_pci =3D { }; =20 /* XXX Interrupt acknowledge cycles not supported. */ -static int ppc4xx_pcihost_initfn(SysBusDevice *dev) +static void ppc4xx_pcihost_realize(DeviceState *dev, Error **errp) { + SysBusDevice *sbd =3D SYS_BUS_DEVICE(dev); PPC4xxPCIState *s; PCIHostState *h; PCIBus *b; @@ -311,10 +312,10 @@ static int ppc4xx_pcihost_initfn(SysBusDevice *dev) s =3D PPC4xx_PCI_HOST_BRIDGE(dev); =20 for (i =3D 0; i < ARRAY_SIZE(s->irq); i++) { - sysbus_init_irq(dev, &s->irq[i]); + sysbus_init_irq(sbd, &s->irq[i]); } =20 - b =3D pci_register_root_bus(DEVICE(dev), NULL, ppc4xx_pci_set_irq, + b =3D pci_register_root_bus(dev, NULL, ppc4xx_pci_set_irq, ppc4xx_pci_map_irq, s->irq, get_system_memor= y(), get_system_io(), 0, 4, TYPE_PCI_BUS); h->bus =3D b; @@ -332,10 +333,8 @@ static int ppc4xx_pcihost_initfn(SysBusDevice *dev) memory_region_add_subregion(&s->container, PCIC0_CFGADDR, &h->conf_mem= ); memory_region_add_subregion(&s->container, PCIC0_CFGDATA, &h->data_mem= ); memory_region_add_subregion(&s->container, PCI_REG_BASE, &s->iomem); - sysbus_init_mmio(dev, &s->container); + sysbus_init_mmio(sbd, &s->container); qemu_register_reset(ppc4xx_pci_reset, s); - - return 0; } =20 static void ppc4xx_host_bridge_class_init(ObjectClass *klass, void *data) @@ -367,10 +366,9 @@ static const TypeInfo ppc4xx_host_bridge_info =3D { =20 static void ppc4xx_pcihost_class_init(ObjectClass *klass, void *data) { - SysBusDeviceClass *k =3D SYS_BUS_DEVICE_CLASS(klass); DeviceClass *dc =3D DEVICE_CLASS(klass); =20 - k->init =3D ppc4xx_pcihost_initfn; + dc->realize =3D ppc4xx_pcihost_realize; dc->vmsd =3D &vmstate_ppc4xx_pci; } =20 --=20 2.17.1