From nobody Wed Nov 5 22:43:06 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; dkim=fail; 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 1537859406370395.3300295927912; Tue, 25 Sep 2018 00:10:06 -0700 (PDT) Received: from localhost ([::1]:51290 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4hTq-0005fj-Nm for importer@patchew.org; Tue, 25 Sep 2018 03:09:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4hMK-0006uG-DE for qemu-devel@nongnu.org; Tue, 25 Sep 2018 03:02:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g4hMF-0006Oh-KI for qemu-devel@nongnu.org; Tue, 25 Sep 2018 03:02:12 -0400 Received: from ozlabs.org ([203.11.71.1]:51415) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g4hMF-0006NG-8W; Tue, 25 Sep 2018 03:02:07 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 42KBp01xXlz9sCh; Tue, 25 Sep 2018 17:01:59 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1537858920; bh=7Ewwb0cFkGgp431aT9dfZ1XA2dRKH4vH7aAKG2Ny9ag=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EqyUT7tRK+DBi6J3YOKmCmlDtMRPTIpfsgj2xBYmht6IhyIOp+6RC8or0R74vgueL 9+aePQPWnPap8nX0Wk0vqbzOyk+fZ2WiUBY5DoG1moOJmeS9440ixo/rUFQryzX1BF kT9XsCDwA9B4KGqaQ5XAJfh+svBVPamN8zx7Z8YI= From: David Gibson To: peter.maydell@linaro.org Date: Tue, 25 Sep 2018 17:01:44 +1000 Message-Id: <20180925070154.5812-5-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180925070154.5812-1-david@gibson.dropbear.id.au> References: <20180925070154.5812-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 203.11.71.1 Subject: [Qemu-devel] [PULL 04/14] raven: some minor IRQ-related tidy-ups 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: mark.cave-ayland@ilande.co.uk, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, clg@kaod.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Mark Cave-Ayland 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 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Herv=C3=A9 Poussineau Tested-by: Herv=C3=A9 Poussineau Signed-off-by: David Gibson --- 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; =20 - 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_nu= m) =20 static void raven_set_irq(void *opaque, int irq_num, int level) { - qemu_irq *pic =3D opaque; + PREPPCIState *s =3D opaque; =20 - qemu_set_irq(pic[irq_num] , level); + qemu_set_irq(s->pci_irqs[irq_num], level); } =20 static AddressSpace *raven_pcihost_set_iommu(PCIBus *bus, void *opaque, @@ -223,13 +223,12 @@ static void raven_pcihost_realizefn(DeviceState *d, E= rror **errp) int i; =20 for (i =3D 0; i < PCI_NUM_PINS; i++) { - sysbus_init_irq(dev, &s->irq[i]); + sysbus_init_irq(dev, &s->pci_irqs[i]); } =20 qdev_init_gpio_in(d, raven_change_gpio, 1); =20 - 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_PIN= S); =20 memory_region_init_io(&h->conf_mem, OBJECT(h), &pci_host_conf_le_ops, = s, "pci-conf-idx", 4); --=20 2.17.1