From nobody Thu May 2 01:09:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1584134850; cv=none; d=zohomail.com; s=zohoarc; b=SS04hoyT4GjQoAHoFAvxNAS2IzWqBaMW6+Fq7/17gZdPxI28BwqZKeDWs8LGTLoRtR2svW3KhdSE9QA3Gqj+746Ar+ojiMG4uWTvccC+ONFHkygrbigEBB4w9DBruD6UQaKoyJe1nVKDrqweEUrquEYoVAUKwpHVOaiyHqiL4Pk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584134850; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=lrPAnsJu6fpe5diGV3MDoRsGkAbIJrA3kqncGPO0RKs=; b=k7Z8kjTVPo98eNmLeRBruoSaFvvMgIZJjNdmfn0g2T6LNaLrm1ciEo7CUUPTkN0hRwi/FjNIByWZ0PYKRSzn/1z+NCD2Jatga2ypMhyfCE0POGOcc0LKwqUnNMLE7exW0iwckDJfjYVcVCuxr5jilnzOd7O/uxv2izc0d7HBJBA= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584134850945551.0432631479724; Fri, 13 Mar 2020 14:27:30 -0700 (PDT) Received: from localhost ([::1]:37756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCrq6-0006Aw-16 for importer@patchew.org; Fri, 13 Mar 2020 17:27:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46583) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCrly-0007kW-1d for qemu-devel@nongnu.org; Fri, 13 Mar 2020 17:23:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCrlw-0000L1-0q for qemu-devel@nongnu.org; Fri, 13 Mar 2020 17:23:13 -0400 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:57665) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jCrls-00009O-G7; Fri, 13 Mar 2020 17:23:08 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 0592F747E15; Fri, 13 Mar 2020 22:23:06 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 6A1B5747E12; Fri, 13 Mar 2020 22:23:05 +0100 (CET) Message-Id: In-Reply-To: References: From: BALATON Zoltan Subject: [PATCH 1/8] hw/ide: Get rid of piix3_init functions Date: Fri, 13 Mar 2020 22:14:34 +0100 To: qemu-devel@nongnu.org, qemu-block@nongnu.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:738:2001:2001::2001 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , John Snow , Mark Cave-Ayland , hpoussin@reactos.org, Aleksandar Markovic , Paolo Bonzini , philmd@redhat.com, Artyom Tarasenko , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This removes pci_piix3_ide_init() and pci_piix3_xen_ide_init() functions similar to clean up done to other ide devices. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Reviewed-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/i386/pc_piix.c | 10 +++++----- hw/ide/pci.c | 1 + hw/ide/piix.c | 21 +-------------------- include/hw/ide.h | 2 -- 4 files changed, 7 insertions(+), 27 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index e2d98243bc..c399398739 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -39,6 +39,7 @@ #include "hw/usb.h" #include "net/net.h" #include "hw/ide.h" +#include "hw/ide/pci.h" #include "hw/irq.h" #include "sysemu/kvm.h" #include "hw/kvm/clock.h" @@ -242,11 +243,10 @@ static void pc_init1(MachineState *machine, ide_drive_get(hd, ARRAY_SIZE(hd)); if (pcmc->pci_enabled) { PCIDevice *dev; - if (xen_enabled()) { - dev =3D pci_piix3_xen_ide_init(pci_bus, hd, piix3_devfn + 1); - } else { - dev =3D pci_piix3_ide_init(pci_bus, hd, piix3_devfn + 1); - } + + dev =3D pci_create_simple(pci_bus, piix3_devfn + 1, + xen_enabled() ? "piix3-ide-xen" : "piix3-i= de"); + pci_ide_create_devs(dev, hd); idebus[0] =3D qdev_get_child_bus(&dev->qdev, "ide.0"); idebus[1] =3D qdev_get_child_bus(&dev->qdev, "ide.1"); pc_cmos_init(pcms, idebus[0], idebus[1], rtc_state); diff --git a/hw/ide/pci.c b/hw/ide/pci.c index 1a6a287e76..4fc76c5225 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -476,6 +476,7 @@ const VMStateDescription vmstate_ide_pci =3D { } }; =20 +/* hd_table must contain 4 block drivers */ void pci_ide_create_devs(PCIDevice *dev, DriveInfo **hd_table) { PCIIDEState *d =3D PCI_IDE(dev); diff --git a/hw/ide/piix.c b/hw/ide/piix.c index bc575b4d70..8bcd6b72c2 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -197,15 +197,6 @@ int pci_piix3_xen_ide_unplug(DeviceState *dev, bool au= x) return 0; } =20 -PCIDevice *pci_piix3_xen_ide_init(PCIBus *bus, DriveInfo **hd_table, int d= evfn) -{ - PCIDevice *dev; - - dev =3D pci_create_simple(bus, devfn, "piix3-ide-xen"); - pci_ide_create_devs(dev, hd_table); - return dev; -} - static void pci_piix_ide_exitfn(PCIDevice *dev) { PCIIDEState *d =3D PCI_IDE(dev); @@ -217,17 +208,6 @@ static void pci_piix_ide_exitfn(PCIDevice *dev) } } =20 -/* hd_table must contain 4 block drivers */ -/* NOTE: for the PIIX3, the IRQs and IOports are hardcoded */ -PCIDevice *pci_piix3_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn) -{ - PCIDevice *dev; - - dev =3D pci_create_simple(bus, devfn, "piix3-ide"); - pci_ide_create_devs(dev, hd_table); - return dev; -} - /* hd_table must contain 4 block drivers */ /* NOTE: for the PIIX4, the IRQs and IOports are hardcoded */ PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn) @@ -239,6 +219,7 @@ PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **= hd_table, int devfn) return dev; } =20 +/* NOTE: for the PIIX3, the IRQs and IOports are hardcoded */ static void piix3_ide_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); diff --git a/include/hw/ide.h b/include/hw/ide.h index dea0ecf5be..883bbaeb9b 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -12,8 +12,6 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int ioba= se2, int isairq, DriveInfo *hd0, DriveInfo *hd1); =20 /* ide-pci.c */ -PCIDevice *pci_piix3_xen_ide_init(PCIBus *bus, DriveInfo **hd_table, int d= evfn); -PCIDevice *pci_piix3_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn= ); PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn= ); int pci_piix3_xen_ide_unplug(DeviceState *dev, bool aux); =20 --=20 2.21.1 From nobody Thu May 2 01:09:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1584134707; cv=none; d=zohomail.com; s=zohoarc; b=JmheT2e8XO0WOrArztuZjXP4Q5hpFNf16pAuazKAG/je4QFEsbpDfrINd6zAkvrAWct+vmPD1sF+vqMdr/9666zTxolOFuUkNPKSY7lOir/m2z1BnorF4naAWwppAD/q3ud5K8EiCae2QCe0RgfyIHxsoxvVkrmEOGb+hp5R+ps= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584134707; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=u8C/2HK2rrZ4u4B/6bRfpdrmxkeZKa9Ot0A0hZUtP9E=; b=WzoOxXQamGPb743+CN0VclaQtC0x0146AmfE3eafT9loIwYxYVKesWrcJ+u7JOKdDWuvAfuKefzOYRIfzyFqz8vAoL1h4ibs9HKR0Sl7NKi+CXhVV91icG6YNeILr9QDfykn2Np9583GGYsF2nM2jqRAv3uFgC7Ipg+Lxtu8aYA= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584134707662702.2168396578065; Fri, 13 Mar 2020 14:25:07 -0700 (PDT) Received: from localhost ([::1]:37664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCrnm-0002eI-Id for importer@patchew.org; Fri, 13 Mar 2020 17:25:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46625) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCrly-0007lx-Mr for qemu-devel@nongnu.org; Fri, 13 Mar 2020 17:23:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCrlw-0000Kq-0Q for qemu-devel@nongnu.org; Fri, 13 Mar 2020 17:23:14 -0400 Received: from zero.eik.bme.hu ([152.66.115.2]:57645) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jCrlr-0008UM-Ec; Fri, 13 Mar 2020 17:23:09 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 019D7747E13; Fri, 13 Mar 2020 22:23:06 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 71609747E04; Fri, 13 Mar 2020 22:23:05 +0100 (CET) Message-Id: <3240656814c804513de08bdbbf318f2f590df241.1584134074.git.balaton@eik.bme.hu> In-Reply-To: References: From: BALATON Zoltan Subject: [PATCH 2/8] hw/ide: Get rid of piix4_init function Date: Fri, 13 Mar 2020 22:14:34 +0100 To: qemu-devel@nongnu.org, qemu-block@nongnu.org X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 152.66.115.2 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , John Snow , Mark Cave-Ayland , hpoussin@reactos.org, Aleksandar Markovic , Paolo Bonzini , philmd@redhat.com, Artyom Tarasenko , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This removes pci_piix4_ide_init() function similar to clean up done to other ide devices. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Reviewed-by: Markus Armbruster --- hw/ide/piix.c | 12 +----------- hw/isa/piix4.c | 5 ++++- include/hw/ide.h | 1 - 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index 8bcd6b72c2..3b2de4c312 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -208,17 +208,6 @@ static void pci_piix_ide_exitfn(PCIDevice *dev) } } =20 -/* hd_table must contain 4 block drivers */ -/* NOTE: for the PIIX4, the IRQs and IOports are hardcoded */ -PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn) -{ - PCIDevice *dev; - - dev =3D pci_create_simple(bus, devfn, "piix4-ide"); - pci_ide_create_devs(dev, hd_table); - return dev; -} - /* NOTE: for the PIIX3, the IRQs and IOports are hardcoded */ static void piix3_ide_class_init(ObjectClass *klass, void *data) { @@ -247,6 +236,7 @@ static const TypeInfo piix3_ide_xen_info =3D { .class_init =3D piix3_ide_class_init, }; =20 +/* NOTE: for the PIIX4, the IRQs and IOports are hardcoded */ static void piix4_ide_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index 7edec5e149..0ab4787658 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -35,6 +35,7 @@ #include "hw/timer/i8254.h" #include "hw/rtc/mc146818rtc.h" #include "hw/ide.h" +#include "hw/ide/pci.h" #include "migration/vmstate.h" #include "sysemu/reset.h" #include "sysemu/runstate.h" @@ -255,10 +256,12 @@ DeviceState *piix4_create(PCIBus *pci_bus, ISABus **i= sa_bus, *isa_bus =3D ISA_BUS(qdev_get_child_bus(dev, "isa.0")); } =20 + pci =3D pci_create_simple(pci_bus, pci->devfn + 1, "piix4-ide"); hd =3D g_new(DriveInfo *, ide_drives); ide_drive_get(hd, ide_drives); - pci_piix4_ide_init(pci_bus, hd, pci->devfn + 1); + pci_ide_create_devs(pci, hd); g_free(hd); + pci_create_simple(pci_bus, pci->devfn + 2, "piix4-usb-uhci"); if (smbus) { *smbus =3D piix4_pm_init(pci_bus, pci->devfn + 3, 0x1100, diff --git a/include/hw/ide.h b/include/hw/ide.h index 883bbaeb9b..21bd8f23f1 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -12,7 +12,6 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int ioba= se2, int isairq, DriveInfo *hd0, DriveInfo *hd1); =20 /* ide-pci.c */ -PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn= ); int pci_piix3_xen_ide_unplug(DeviceState *dev, bool aux); =20 /* ide-mmio.c */ --=20 2.21.1 From nobody Thu May 2 01:09:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1584134724; cv=none; d=zohomail.com; s=zohoarc; b=jKtpsvJr/W3MY69nPm+COVp2lu4ym7fEaleMEAHrjmjMDUdTIxAvLX8G4so5kUxx899G/hM9r+4q8DutsaGZuzHbcldO57GzDFOj6y5C7u3dHXp80yRX2oS98LaTpC99FZkLLlZgvdjw6l0Ky6m2ebKoT0F2rILyrsE/oCxNs24= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584134724; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=5SPIRWZtYiV2tiaVvJhb+OiiBpTA570H7EMEBT/aXG8=; b=W+BaCYlacBDbhdZQ7BhlejUaHM7dkBRT1D9aXHboehyPJ2acr4OKa8Nm9HuuRMA1zpobPTjxoBrWwCBa/xgxJ8xaDMfGY894cROtY3ffdhDxdSIGHKY3Nz7IYpwnyrx6tTL6HTsEstlPLc6h7TqX5P3nLK9SFnJn0WpUmqisoLY= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584134724640321.3070641817462; Fri, 13 Mar 2020 14:25:24 -0700 (PDT) Received: from localhost ([::1]:37672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCro3-0003AV-K1 for importer@patchew.org; Fri, 13 Mar 2020 17:25:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46494) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCrlw-0007hN-Fh for qemu-devel@nongnu.org; Fri, 13 Mar 2020 17:23:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCrlv-0000IL-2v for qemu-devel@nongnu.org; Fri, 13 Mar 2020 17:23:12 -0400 Received: from zero.eik.bme.hu ([152.66.115.2]:57651) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jCrlr-0008Ud-Fl; Fri, 13 Mar 2020 17:23:08 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 03ECA747E1C; Fri, 13 Mar 2020 22:23:06 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 778B0747E14; Fri, 13 Mar 2020 22:23:05 +0100 (CET) Message-Id: <7679b82b4f26fdb16f00c3b130f8e6a807724f73.1584134074.git.balaton@eik.bme.hu> In-Reply-To: References: From: BALATON Zoltan Subject: [PATCH 3/8] hw/ide: Remove now unneded #include "hw/pci/pci.h" from hw/ide.h Date: Fri, 13 Mar 2020 22:14:34 +0100 To: qemu-devel@nongnu.org, qemu-block@nongnu.org X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 152.66.115.2 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , John Snow , Mark Cave-Ayland , hpoussin@reactos.org, Aleksandar Markovic , Paolo Bonzini , philmd@redhat.com, Artyom Tarasenko , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" After previous patches we don't need hw/pci/pci.h any more in hw/ide.h. Some files depended on implicit inclusion by this header which are also fixed up here. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Reviewed-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/ide/ahci_internal.h | 1 + include/hw/ide.h | 1 - include/hw/ide/pci.h | 1 + include/hw/misc/macio/macio.h | 1 + 4 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/ide/ahci_internal.h b/hw/ide/ahci_internal.h index 73424516da..bab0459774 100644 --- a/hw/ide/ahci_internal.h +++ b/hw/ide/ahci_internal.h @@ -27,6 +27,7 @@ #include "hw/ide/ahci.h" #include "hw/ide/internal.h" #include "hw/sysbus.h" +#include "hw/pci/pci.h" =20 #define AHCI_MEM_BAR_SIZE 0x1000 #define AHCI_MAX_PORTS 32 diff --git a/include/hw/ide.h b/include/hw/ide.h index 21bd8f23f1..d52c211f32 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -2,7 +2,6 @@ #define HW_IDE_H =20 #include "hw/isa/isa.h" -#include "hw/pci/pci.h" #include "exec/memory.h" =20 #define MAX_IDE_DEVS 2 diff --git a/include/hw/ide/pci.h b/include/hw/ide/pci.h index a9f2c33e68..98ffa7dfcd 100644 --- a/include/hw/ide/pci.h +++ b/include/hw/ide/pci.h @@ -2,6 +2,7 @@ #define HW_IDE_PCI_H =20 #include "hw/ide/internal.h" +#include "hw/pci/pci.h" =20 #define BM_STATUS_DMAING 0x01 #define BM_STATUS_ERROR 0x02 diff --git a/include/hw/misc/macio/macio.h b/include/hw/misc/macio/macio.h index 070a694eb5..87335a991c 100644 --- a/include/hw/misc/macio/macio.h +++ b/include/hw/misc/macio/macio.h @@ -27,6 +27,7 @@ #define MACIO_H =20 #include "hw/char/escc.h" +#include "hw/pci/pci.h" #include "hw/ide/internal.h" #include "hw/intc/heathrow_pic.h" #include "hw/misc/macio/cuda.h" --=20 2.21.1 From nobody Thu May 2 01:09:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1584134922; cv=none; d=zohomail.com; s=zohoarc; b=VqAxDBjjb/I680oWsbIriV8RMPVgRyQjrs1uvKOU0Uuouq2OSv77+YSv7//dm5Q6k9tjbgMweSSeo6BVoALn9S6jYWzEo27y4nHugAYLdib2+FEl8XlybCz6NfaPrngcIjJHN85IZpaL1aeIl/lHeb4pEiNaLqzVe/SHwL9hYxw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584134922; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=GtcAzG5fsQIeLoHmP5aD7Hsvqf+OUHaniKMrAqW/YFs=; b=kWI9qEp7vQvyOwm/F9oWTLRCb3s08Z9CVFkKWAXOKaEl0lKVxke8ho/Q4OlumcBOhltOItpxMVc7g9G2mMmKT1dwM2cUTXYfMqM7W5tRVqc0iHBMDSiMJbtd7aMq3cx1P2Djn5wxnPgqs80kjbYHcERYw92K8h5v+md3Szqmy54= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584134922032753.3868345584247; Fri, 13 Mar 2020 14:28:42 -0700 (PDT) Received: from localhost ([::1]:37814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCrrE-0007yG-Fx for importer@patchew.org; Fri, 13 Mar 2020 17:28:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46652) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCrlz-0007mx-6n for qemu-devel@nongnu.org; Fri, 13 Mar 2020 17:23:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCrlx-0000QL-1u for qemu-devel@nongnu.org; Fri, 13 Mar 2020 17:23:15 -0400 Received: from zero.eik.bme.hu ([152.66.115.2]:57630) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jCrlr-0008TF-CM; Fri, 13 Mar 2020 17:23:09 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id B314E747E1B; Fri, 13 Mar 2020 22:23:05 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 7C6C1747E13; Fri, 13 Mar 2020 22:23:05 +0100 (CET) Message-Id: In-Reply-To: References: From: BALATON Zoltan Subject: [PATCH 4/8] hw/ide: Move MAX_IDE_BUS define to one header Date: Fri, 13 Mar 2020 22:14:34 +0100 To: qemu-devel@nongnu.org, qemu-block@nongnu.org X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 152.66.115.2 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , John Snow , Mark Cave-Ayland , hpoussin@reactos.org, Aleksandar Markovic , Paolo Bonzini , philmd@redhat.com, Artyom Tarasenko , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" There are several definitions of MAX_IDE_BUS in different boards (some of them unused) with the same value. Move it to include/hw/ide/internal.h to have it in a central place. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Reviewed-by: Markus Armbruster --- hw/alpha/dp264.c | 2 -- hw/hppa/machine.c | 2 -- hw/i386/pc_piix.c | 2 -- hw/mips/mips_fulong2e.c | 1 - hw/mips/mips_malta.c | 4 +--- hw/mips/mips_r4k.c | 4 +--- hw/ppc/mac_newworld.c | 1 - hw/ppc/mac_oldworld.c | 1 - hw/ppc/prep.c | 2 -- hw/sparc64/sun4u.c | 1 - include/hw/ide/internal.h | 2 ++ 11 files changed, 4 insertions(+), 18 deletions(-) diff --git a/hw/alpha/dp264.c b/hw/alpha/dp264.c index 27595767e5..0f58b1b668 100644 --- a/hw/alpha/dp264.c +++ b/hw/alpha/dp264.c @@ -24,8 +24,6 @@ #include "qemu/cutils.h" #include "net/net.h" =20 -#define MAX_IDE_BUS 2 - static uint64_t cpu_alpha_superpage_to_phys(void *opaque, uint64_t addr) { if (((addr >> 41) & 3) =3D=3D 2) { diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index 9175f4b790..1f9a390f99 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -24,8 +24,6 @@ #include "qemu/log.h" #include "net/net.h" =20 -#define MAX_IDE_BUS 2 - static ISABus *hppa_isa_bus(void) { ISABus *isa_bus; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index c399398739..b363a69e2e 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -63,8 +63,6 @@ #include "sysemu/numa.h" #include "hw/mem/nvdimm.h" =20 -#define MAX_IDE_BUS 2 - #ifdef CONFIG_IDE_ISA static const int ide_iobase[MAX_IDE_BUS] =3D { 0x1f0, 0x170 }; static const int ide_iobase2[MAX_IDE_BUS] =3D { 0x3f6, 0x376 }; diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index 639ba2a091..3690b76061 100644 --- a/hw/mips/mips_fulong2e.c +++ b/hw/mips/mips_fulong2e.c @@ -55,7 +55,6 @@ =20 /* fulong 2e has a 512k flash: Winbond W39L040AP70Z */ #define BIOS_SIZE (512 * KiB) -#define MAX_IDE_BUS 2 =20 /* * PMON is not part of qemu and released with BSD license, anyone diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index d380f73d7b..6f51e33e7b 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -40,7 +40,7 @@ #include "sysemu/arch_init.h" #include "qemu/log.h" #include "hw/mips/bios.h" -#include "hw/ide.h" +#include "hw/ide/internal.h" #include "hw/irq.h" #include "hw/loader.h" #include "elf.h" @@ -68,8 +68,6 @@ =20 #define FLASH_SIZE 0x400000 =20 -#define MAX_IDE_BUS 2 - typedef struct { MemoryRegion iomem; MemoryRegion iomem_lo; /* 0 - 0x900 */ diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c index ad8b75e286..2e5372bda0 100644 --- a/hw/mips/mips_r4k.c +++ b/hw/mips/mips_r4k.c @@ -25,7 +25,7 @@ #include "hw/block/flash.h" #include "qemu/log.h" #include "hw/mips/bios.h" -#include "hw/ide.h" +#include "hw/ide/internal.h" #include "hw/loader.h" #include "elf.h" #include "hw/rtc/mc146818rtc.h" @@ -37,8 +37,6 @@ #include "sysemu/runstate.h" #include "qemu/error-report.h" =20 -#define MAX_IDE_BUS 2 - static const int ide_iobase[2] =3D { 0x1f0, 0x170 }; static const int ide_iobase2[2] =3D { 0x3f6, 0x376 }; static const int ide_irq[2] =3D { 14, 15 }; diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index b8189bf7a4..daa1523feb 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -75,7 +75,6 @@ #include "hw/sysbus.h" #include "trace.h" =20 -#define MAX_IDE_BUS 2 #define CFG_ADDR 0xf0000510 #define TBFREQ (100UL * 1000UL * 1000UL) #define CLOCKFREQ (900UL * 1000UL * 1000UL) diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c index 440c406eb4..2478748c78 100644 --- a/hw/ppc/mac_oldworld.c +++ b/hw/ppc/mac_oldworld.c @@ -51,7 +51,6 @@ #include "kvm_ppc.h" #include "exec/address-spaces.h" =20 -#define MAX_IDE_BUS 2 #define CFG_ADDR 0xf0000510 #define TBFREQ 16600000UL #define CLOCKFREQ 266000000UL diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 111cc80867..e1b1549e58 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -56,8 +56,6 @@ /* SMP is not enabled, for now */ #define MAX_CPUS 1 =20 -#define MAX_IDE_BUS 2 - #define CFG_ADDR 0xf0000510 =20 #define KERNEL_LOAD_ADDR 0x01000000 diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index d33e84f831..74acfd39b3 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -66,7 +66,6 @@ #define PBM_PCI_IO_BASE (PBM_SPECIAL_BASE + 0x02000000ULL) #define PROM_FILENAME "openbios-sparc64" #define NVRAM_SIZE 0x2000 -#define MAX_IDE_BUS 2 #define BIOS_CFG_IOPORT 0x510 #define FW_CFG_SPARC64_WIDTH (FW_CFG_ARCH_LOCAL + 0x00) #define FW_CFG_SPARC64_HEIGHT (FW_CFG_ARCH_LOCAL + 0x01) diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index 1bc1fc73e5..1a49d35959 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -27,6 +27,8 @@ typedef struct IDEDMAOps IDEDMAOps; #define TYPE_IDE_BUS "IDE" #define IDE_BUS(obj) OBJECT_CHECK(IDEBus, (obj), TYPE_IDE_BUS) =20 +#define MAX_IDE_BUS 2 + /* Bits of HD_STATUS */ #define ERR_STAT 0x01 #define INDEX_STAT 0x02 --=20 2.21.1 From nobody Thu May 2 01:09:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1584134670; cv=none; d=zohomail.com; s=zohoarc; b=Fl/V4AWkGv6dvk3arbsrrI6Z3DMT7hmHVblxqqWtB2puhGE+GR8mIEWlHMgzoO33+ysrJlR4t6gGzJ7qReUquMLgGFpyw6GQ/+BA91ERgQPubX6f6GWHYEbadnLORmkZC4LFNrneI5ujmIq8/Z3A0rujD/kRlB6AyDxCCn6Oewc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584134670; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=VUni2M05RNKMA0udNSKJlKfAongWxbILkbuAMfB/73w=; b=XOYYjitp+knaov87eExy6DJwiW27yQETGEhSNKg8N4BG31Pwu/th5WltFVgKe7c6vs9G/tEQFxvqStigi3dkpyVCtO8ny+PPfOVpzYMfL3eXqLrIb8m2hbMlDgFIaRa9WBfc4JqDtrfB2yyIMloxupfPiicRrFMWo2hjp4e6u0Q= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584134670418126.77024899623927; Fri, 13 Mar 2020 14:24:30 -0700 (PDT) Received: from localhost ([::1]:37588 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCrnB-00018Y-8Q for importer@patchew.org; Fri, 13 Mar 2020 17:24:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46476) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCrlw-0007gi-3N for qemu-devel@nongnu.org; Fri, 13 Mar 2020 17:23:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCrlu-0000Hs-Pu for qemu-devel@nongnu.org; Fri, 13 Mar 2020 17:23:11 -0400 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:57637) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jCrlr-0008Tt-L6; Fri, 13 Mar 2020 17:23:07 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id CFE84747E17; Fri, 13 Mar 2020 22:23:05 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 80F0D747E15; Fri, 13 Mar 2020 22:23:05 +0100 (CET) Message-Id: <34bdee6ddddd7943b9a68547f46c76f30b9a7e75.1584134074.git.balaton@eik.bme.hu> In-Reply-To: References: From: BALATON Zoltan Subject: [PATCH 5/8] hw/ide/pci.c: Coding style update to fix checkpatch errors Date: Fri, 13 Mar 2020 22:14:34 +0100 To: qemu-devel@nongnu.org, qemu-block@nongnu.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:738:2001:2001::2001 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , John Snow , Mark Cave-Ayland , hpoussin@reactos.org, Aleksandar Markovic , Paolo Bonzini , philmd@redhat.com, Artyom Tarasenko , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Spaces are required around a + operator and if statements should have braces even for single line. Also make it simpler by reversing the condition instead of breaking the loop. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Reviewed-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/ide/pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ide/pci.c b/hw/ide/pci.c index 4fc76c5225..e0c84392e2 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -485,9 +485,9 @@ void pci_ide_create_devs(PCIDevice *dev, DriveInfo **hd= _table) int i; =20 for (i =3D 0; i < 4; i++) { - if (hd_table[i] =3D=3D NULL) - continue; - ide_create_drive(d->bus+bus[i], unit[i], hd_table[i]); + if (hd_table[i]) { + ide_create_drive(d->bus + bus[i], unit[i], hd_table[i]); + } } } =20 --=20 2.21.1 From nobody Thu May 2 01:09:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1584134802; cv=none; d=zohomail.com; s=zohoarc; b=i6mA1gMvdzy4AldMnvGqE3a+8eutLJ32m3WfwjFNdnYF8o4sbwp4YI3kFy1yu1GWI4yp+GwuPnBKQnhvFSCsQTHHL1spWZ30QF62tYQUgXXdnWuIn0OYcAso1QsvknjrZEOJsi1MJE5z3k10nyztelK0/TtBLTBqqHIQtb+NGDU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584134802; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=Irq+lmsKDfjFH+0EXFQdLyErLTheZdgGXyUPpfz+464=; b=KNb8PCSGw9lw3IGlSH3jSooa1BDIl0+IELjTXWZkB1LaOxDXimJDbvYWkVMuIbTrhZlxlFPV2YF+brLTfXULElMIdoXdRZRHvWP+0xkjFGu9oVylRPoA34Z/igl+s8bOCdMKQcBhQd83pNGexwC63imkmW5Xc+WgeyekvfV2Be0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584134802163153.24317691785984; Fri, 13 Mar 2020 14:26:42 -0700 (PDT) Received: from localhost ([::1]:37752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCrpJ-00050Y-0A for importer@patchew.org; Fri, 13 Mar 2020 17:26:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46748) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCrm0-0007s1-Uy for qemu-devel@nongnu.org; Fri, 13 Mar 2020 17:23:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCrly-0000Xd-FA for qemu-devel@nongnu.org; Fri, 13 Mar 2020 17:23:16 -0400 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:57666) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jCrls-00009a-Na; Fri, 13 Mar 2020 17:23:08 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 2FF01747E12; Fri, 13 Mar 2020 22:23:06 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 8537B747E16; Fri, 13 Mar 2020 22:23:05 +0100 (CET) Message-Id: <49bf646a9419c3b20125187a26f8a4fd5f35f399.1584134074.git.balaton@eik.bme.hu> In-Reply-To: References: From: BALATON Zoltan Subject: [PATCH 6/8] hw/ide: Do ide_drive_get() within pci_ide_create_devs() Date: Fri, 13 Mar 2020 22:14:34 +0100 To: qemu-devel@nongnu.org, qemu-block@nongnu.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:738:2001:2001::2001 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , John Snow , Mark Cave-Ayland , hpoussin@reactos.org, Aleksandar Markovic , Paolo Bonzini , philmd@redhat.com, Artyom Tarasenko , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The pci_ide_create_devs() function takes a hd_table parameter but all callers just pass what ide_drive_get() returns so we can do it locally simplifying callers and removing hd_table parameter. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Reviewed-by: Markus Armbruster --- hw/alpha/dp264.c | 13 +++---------- hw/i386/pc_piix.c | 9 +++++---- hw/ide/pci.c | 5 +++-- hw/isa/piix4.c | 10 ++-------- hw/mips/mips_fulong2e.c | 4 +--- hw/mips/mips_malta.c | 2 +- hw/sparc64/sun4u.c | 6 +----- include/hw/ide/pci.h | 2 +- include/hw/southbridge/piix.h | 3 +-- 9 files changed, 18 insertions(+), 36 deletions(-) diff --git a/hw/alpha/dp264.c b/hw/alpha/dp264.c index 0f58b1b668..e23172f177 100644 --- a/hw/alpha/dp264.c +++ b/hw/alpha/dp264.c @@ -15,7 +15,6 @@ #include "qemu/error-report.h" #include "sysemu/sysemu.h" #include "hw/rtc/mc146818rtc.h" -#include "hw/ide.h" #include "hw/ide/pci.h" #include "hw/timer/i8254.h" #include "hw/isa/superio.h" @@ -56,6 +55,7 @@ static void clipper_init(MachineState *machine) const char *initrd_filename =3D machine->initrd_filename; AlphaCPU *cpus[4]; PCIBus *pci_bus; + PCIDevice *pci_dev; ISABus *isa_bus; qemu_irq rtc_irq; long size, i; @@ -98,15 +98,8 @@ static void clipper_init(MachineState *machine) isa_create_simple(isa_bus, TYPE_SMC37C669_SUPERIO); =20 /* IDE disk setup. */ - { - DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; - PCIDevice *pci_dev; - - ide_drive_get(hd, ARRAY_SIZE(hd)); - - pci_dev =3D pci_create_simple(pci_bus, -1, "cmd646-ide"); - pci_ide_create_devs(pci_dev, hd); - } + pci_dev =3D pci_create_simple(pci_bus, -1, "cmd646-ide"); + pci_ide_create_devs(pci_dev); =20 /* Load PALcode. Given that this is not "real" cpu palcode, but one explicitly written for the emulation, we might as diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index b363a69e2e..a7a696d0c8 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -84,7 +84,6 @@ static void pc_init1(MachineState *machine, int piix3_devfn =3D -1; qemu_irq smi_irq; GSIState *gsi_state; - DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; BusState *idebus[MAX_IDE_BUS]; ISADevice *rtc_state; MemoryRegion *ram_memory; @@ -238,20 +237,22 @@ static void pc_init1(MachineState *machine, =20 pc_nic_init(pcmc, isa_bus, pci_bus); =20 - ide_drive_get(hd, ARRAY_SIZE(hd)); if (pcmc->pci_enabled) { PCIDevice *dev; =20 dev =3D pci_create_simple(pci_bus, piix3_devfn + 1, xen_enabled() ? "piix3-ide-xen" : "piix3-i= de"); - pci_ide_create_devs(dev, hd); + pci_ide_create_devs(dev); idebus[0] =3D qdev_get_child_bus(&dev->qdev, "ide.0"); idebus[1] =3D qdev_get_child_bus(&dev->qdev, "ide.1"); pc_cmos_init(pcms, idebus[0], idebus[1], rtc_state); } #ifdef CONFIG_IDE_ISA -else { + else { + DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; int i; + + ide_drive_get(hd, ARRAY_SIZE(hd)); for (i =3D 0; i < MAX_IDE_BUS; i++) { ISADevice *dev; char busname[] =3D "ide.0"; diff --git a/hw/ide/pci.c b/hw/ide/pci.c index e0c84392e2..03d6eef592 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -476,14 +476,15 @@ const VMStateDescription vmstate_ide_pci =3D { } }; =20 -/* hd_table must contain 4 block drivers */ -void pci_ide_create_devs(PCIDevice *dev, DriveInfo **hd_table) +void pci_ide_create_devs(PCIDevice *dev) { PCIIDEState *d =3D PCI_IDE(dev); + DriveInfo *hd_table[MAX_IDE_BUS * MAX_IDE_DEVS]; static const int bus[4] =3D { 0, 0, 1, 1 }; static const int unit[4] =3D { 0, 1, 0, 1 }; int i; =20 + ide_drive_get(hd_table, ARRAY_SIZE(hd_table)); for (i =3D 0; i < 4; i++) { if (hd_table[i]) { ide_create_drive(d->bus + bus[i], unit[i], hd_table[i]); diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index 0ab4787658..13fa1660c3 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -241,11 +241,8 @@ static void piix4_register_types(void) =20 type_init(piix4_register_types) =20 -DeviceState *piix4_create(PCIBus *pci_bus, ISABus **isa_bus, - I2CBus **smbus, size_t ide_buses) +DeviceState *piix4_create(PCIBus *pci_bus, ISABus **isa_bus, I2CBus **smbu= s) { - size_t ide_drives =3D ide_buses * MAX_IDE_DEVS; - DriveInfo **hd; PCIDevice *pci; DeviceState *dev; =20 @@ -257,10 +254,7 @@ DeviceState *piix4_create(PCIBus *pci_bus, ISABus **is= a_bus, } =20 pci =3D pci_create_simple(pci_bus, pci->devfn + 1, "piix4-ide"); - hd =3D g_new(DriveInfo *, ide_drives); - ide_drive_get(hd, ide_drives); - pci_ide_create_devs(pci, hd); - g_free(hd); + pci_ide_create_devs(pci); =20 pci_create_simple(pci_bus, pci->devfn + 2, "piix4-usb-uhci"); if (smbus) { diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index 3690b76061..508dc57737 100644 --- a/hw/mips/mips_fulong2e.c +++ b/hw/mips/mips_fulong2e.c @@ -238,7 +238,6 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus,= int slot, qemu_irq intc, { qemu_irq *i8259; ISABus *isa_bus; - DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; PCIDevice *dev; =20 isa_bus =3D vt82c686b_isa_init(pci_bus, PCI_DEVFN(slot, 0)); @@ -258,8 +257,7 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus,= int slot, qemu_irq intc, isa_create_simple(isa_bus, TYPE_VT82C686B_SUPERIO); =20 dev =3D pci_create_simple(pci_bus, PCI_DEVFN(slot, 1), "via-ide"); - ide_drive_get(hd, ARRAY_SIZE(hd)); - pci_ide_create_devs(dev, hd); + pci_ide_create_devs(dev); =20 pci_create_simple(pci_bus, PCI_DEVFN(slot, 2), "vt82c686b-usb-uhci"); pci_create_simple(pci_bus, PCI_DEVFN(slot, 3), "vt82c686b-usb-uhci"); diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index 6f51e33e7b..1da5271922 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -1401,7 +1401,7 @@ void mips_malta_init(MachineState *machine) pci_bus =3D gt64120_register(s->i8259); =20 /* Southbridge */ - dev =3D piix4_create(pci_bus, &isa_bus, &smbus, MAX_IDE_BUS); + dev =3D piix4_create(pci_bus, &isa_bus, &smbus); =20 /* Interrupt controller */ qdev_connect_gpio_out_named(dev, "intr", 0, i8259_irq); diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 74acfd39b3..329e82c0f0 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -50,7 +50,6 @@ #include "hw/sparc/sparc64.h" #include "hw/nvram/fw_cfg.h" #include "hw/sysbus.h" -#include "hw/ide.h" #include "hw/ide/pci.h" #include "hw/loader.h" #include "hw/fw-path-provider.h" @@ -562,7 +561,6 @@ static void sun4uv_init(MemoryRegion *address_space_mem, PCIBus *pci_bus, *pci_busA, *pci_busB; PCIDevice *ebus, *pci_dev; SysBusDevice *s; - DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; DeviceState *iommu, *dev; FWCfgState *fw_cfg; NICInfo *nd; @@ -662,12 +660,10 @@ static void sun4uv_init(MemoryRegion *address_space_m= em, qemu_macaddr_default_if_unset(&macaddr); } =20 - ide_drive_get(hd, ARRAY_SIZE(hd)); - pci_dev =3D pci_create(pci_busA, PCI_DEVFN(3, 0), "cmd646-ide"); qdev_prop_set_uint32(&pci_dev->qdev, "secondary", 1); qdev_init_nofail(&pci_dev->qdev); - pci_ide_create_devs(pci_dev, hd); + pci_ide_create_devs(pci_dev); =20 /* Map NVRAM into I/O (ebus) space */ nvram =3D m48t59_init(NULL, 0, 0, NVRAM_SIZE, 1968, 59); diff --git a/include/hw/ide/pci.h b/include/hw/ide/pci.h index 98ffa7dfcd..dd504e5a0b 100644 --- a/include/hw/ide/pci.h +++ b/include/hw/ide/pci.h @@ -63,7 +63,7 @@ static inline IDEState *bmdma_active_if(BMDMAState *bmdma) void bmdma_init(IDEBus *bus, BMDMAState *bm, PCIIDEState *d); void bmdma_cmd_writeb(BMDMAState *bm, uint32_t val); extern MemoryRegionOps bmdma_addr_ioport_ops; -void pci_ide_create_devs(PCIDevice *dev, DriveInfo **hd_table); +void pci_ide_create_devs(PCIDevice *dev); =20 extern const VMStateDescription vmstate_ide_pci; extern const MemoryRegionOps pci_ide_cmd_le_ops; diff --git a/include/hw/southbridge/piix.h b/include/hw/southbridge/piix.h index 152628c6d9..02bd741209 100644 --- a/include/hw/southbridge/piix.h +++ b/include/hw/southbridge/piix.h @@ -68,7 +68,6 @@ extern PCIDevice *piix4_dev; =20 PIIX3State *piix3_create(PCIBus *pci_bus, ISABus **isa_bus); =20 -DeviceState *piix4_create(PCIBus *pci_bus, ISABus **isa_bus, - I2CBus **smbus, size_t ide_buses); +DeviceState *piix4_create(PCIBus *pci_bus, ISABus **isa_bus, I2CBus **smbu= s); =20 #endif --=20 2.21.1 From nobody Thu May 2 01:09:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1584134809; cv=none; d=zohomail.com; s=zohoarc; b=AAfZZXQCDRzzT8kkRmLW3LautJHDvmdyCAhxERcyaoXPXSAiURklPzPMVOoE3wjcgEIrIWxYx2fQ3XSGNUXuv7hEJlP6r4AJQMhoyg2cHwzrT7hQ8lz0CN2asYBKTxO00r7DCwTpBZm5x2qNPMYhAuvmcmZbJ34X846Hq54/XC8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584134809; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=ysfSLMIo2r8N4JRohBu6AF/IMSjTUmCcP302OFolCbE=; b=h/W3WspLblluvjT4LDlE+y/YqJLm5vkUctAnG/d2sf3EKZ0jQ4EOhkHIN4+aupSIFQolLIYoLwSyENDD/ngIEBWP/mpAOxtBomwvvH/wTWfyGGkkAXkCC6wguacWxRdcXrkllhmtXG2DSnB4Ihf02gTj8VCPC8jjcjYJ0PU/cUg= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584134809117938.4042015403251; Fri, 13 Mar 2020 14:26:49 -0700 (PDT) Received: from localhost ([::1]:37754 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCrpQ-00058k-4W for importer@patchew.org; Fri, 13 Mar 2020 17:26:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46549) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCrlx-0007jG-HU for qemu-devel@nongnu.org; Fri, 13 Mar 2020 17:23:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCrlv-0000Kd-V7 for qemu-devel@nongnu.org; Fri, 13 Mar 2020 17:23:13 -0400 Received: from zero.eik.bme.hu ([152.66.115.2]:57667) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jCrls-00009c-Py; Fri, 13 Mar 2020 17:23:08 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 1E989747E04; Fri, 13 Mar 2020 22:23:06 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 89B66747E0F; Fri, 13 Mar 2020 22:23:05 +0100 (CET) Message-Id: In-Reply-To: References: From: BALATON Zoltan Subject: [PATCH 7/8] hw/ide: Move MAX_IDE_DEVS define to hw/ide/internal.h Date: Fri, 13 Mar 2020 22:14:34 +0100 To: qemu-devel@nongnu.org, qemu-block@nongnu.org X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 152.66.115.2 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , John Snow , Mark Cave-Ayland , hpoussin@reactos.org, Aleksandar Markovic , Paolo Bonzini , philmd@redhat.com, Artyom Tarasenko , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" We can move it next to the MAX_IDE_BUS define now that less files use it. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Reviewed-by: Markus Armbruster --- include/hw/ide.h | 2 -- include/hw/ide/internal.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/hw/ide.h b/include/hw/ide.h index d52c211f32..c5ce5da4f4 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -4,8 +4,6 @@ #include "hw/isa/isa.h" #include "exec/memory.h" =20 -#define MAX_IDE_DEVS 2 - /* ide-isa.c */ ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq, DriveInfo *hd0, DriveInfo *hd1); diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index 1a49d35959..fd3cae4acf 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -28,6 +28,7 @@ typedef struct IDEDMAOps IDEDMAOps; #define IDE_BUS(obj) OBJECT_CHECK(IDEBus, (obj), TYPE_IDE_BUS) =20 #define MAX_IDE_BUS 2 +#define MAX_IDE_DEVS 2 =20 /* Bits of HD_STATUS */ #define ERR_STAT 0x01 --=20 2.21.1 From nobody Thu May 2 01:09:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1584134888; cv=none; d=zohomail.com; s=zohoarc; b=BifHBKswGNifD1LpA2cedLD13HfJrH989Go6MRMapvsXur2Xi5bQ0y2ZrFW2HBnhyLTRiMB7TjMmY+hIqN94qQMqYmL+AOKzlyn8skjX27bYy9NsEcm0m5OsAwIy/gwHVFDCYKeCxQk1YzvPRyGODpWXrfPJBpnLdMpoc4ww2iI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584134888; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=YpgeYmoem4nR2fPWhU9CAIm6n35rQTWsrnZtCmwi/CI=; b=hXxqGCFZd6U92CFBjCebH8hMnzfqIyC7bWTJWkcS1HC62yqULEiCE1vOs/QzffXEJ5VQMsxgR2I6HTbxAgbzlmCvY9moQlvGYFXhV/I+tff7mdRiG8EJSRdmiRQ+7HqhuH57m59FdjB0iOxwdEozBj/gWwn68L3rz/BBIHJInmA= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584134888896230.97406628775877; Fri, 13 Mar 2020 14:28:08 -0700 (PDT) Received: from localhost ([::1]:37812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCrqh-0007Jl-O2 for importer@patchew.org; Fri, 13 Mar 2020 17:28:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46593) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCrly-0007kf-3r for qemu-devel@nongnu.org; Fri, 13 Mar 2020 17:23:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCrlw-0000M4-9r for qemu-devel@nongnu.org; Fri, 13 Mar 2020 17:23:14 -0400 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:57664) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jCrls-00009P-Fb; Fri, 13 Mar 2020 17:23:08 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 2AC58747E1D; Fri, 13 Mar 2020 22:23:06 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 8D7BE747E18; Fri, 13 Mar 2020 22:23:05 +0100 (CET) Message-Id: In-Reply-To: References: From: BALATON Zoltan Subject: [PATCH 8/8] hw/ide: Remove unneeded inclusion of hw/ide.h Date: Fri, 13 Mar 2020 22:14:34 +0100 To: qemu-devel@nongnu.org, qemu-block@nongnu.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:738:2001:2001::2001 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , John Snow , Mark Cave-Ayland , hpoussin@reactos.org, Aleksandar Markovic , Paolo Bonzini , philmd@redhat.com, Artyom Tarasenko , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" After previous clean ups we can drop direct inclusion of hw/ide.h from several places. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Reviewed-by: Markus Armbruster --- hw/hppa/hppa_sys.h | 1 - hw/hppa/machine.c | 1 - hw/i386/pc_piix.c | 1 - hw/isa/piix4.c | 1 - hw/mips/mips_fulong2e.c | 1 - hw/ppc/mac_newworld.c | 1 - hw/ppc/mac_oldworld.c | 1 - hw/ppc/prep.c | 1 - 8 files changed, 8 deletions(-) diff --git a/hw/hppa/hppa_sys.h b/hw/hppa/hppa_sys.h index 4d08501464..0b18271cc9 100644 --- a/hw/hppa/hppa_sys.h +++ b/hw/hppa/hppa_sys.h @@ -5,7 +5,6 @@ =20 #include "hw/pci/pci.h" #include "hw/pci/pci_host.h" -#include "hw/ide.h" #include "hw/boards.h" #include "hw/intc/i8259.h" =20 diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index 1f9a390f99..d1fbf781c5 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -13,7 +13,6 @@ #include "sysemu/reset.h" #include "sysemu/sysemu.h" #include "hw/rtc/mc146818rtc.h" -#include "hw/ide.h" #include "hw/timer/i8254.h" #include "hw/char/serial.h" #include "hw/net/lasi_82596.h" diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index a7a696d0c8..ac78b07451 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -38,7 +38,6 @@ #include "hw/pci/pci_ids.h" #include "hw/usb.h" #include "net/net.h" -#include "hw/ide.h" #include "hw/ide/pci.h" #include "hw/irq.h" #include "sysemu/kvm.h" diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index 13fa1660c3..136a763e3f 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -34,7 +34,6 @@ #include "hw/dma/i8257.h" #include "hw/timer/i8254.h" #include "hw/rtc/mc146818rtc.h" -#include "hw/ide.h" #include "hw/ide/pci.h" #include "migration/vmstate.h" #include "sysemu/reset.h" diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index 508dc57737..ab6634d538 100644 --- a/hw/mips/mips_fulong2e.c +++ b/hw/mips/mips_fulong2e.c @@ -36,7 +36,6 @@ #include "audio/audio.h" #include "qemu/log.h" #include "hw/loader.h" -#include "hw/ide.h" #include "hw/ide/pci.h" #include "elf.h" #include "hw/isa/vt82c686.h" diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index daa1523feb..dfe5aeab0a 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -62,7 +62,6 @@ #include "hw/char/escc.h" #include "hw/misc/macio/macio.h" #include "hw/ppc/openpic.h" -#include "hw/ide.h" #include "hw/loader.h" #include "hw/fw-path-provider.h" #include "elf.h" diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c index 2478748c78..4c1b1f35a1 100644 --- a/hw/ppc/mac_oldworld.c +++ b/hw/ppc/mac_oldworld.c @@ -41,7 +41,6 @@ #include "hw/nvram/fw_cfg.h" #include "hw/char/escc.h" #include "hw/misc/macio/macio.h" -#include "hw/ide.h" #include "hw/loader.h" #include "hw/fw-path-provider.h" #include "elf.h" diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index e1b1549e58..52bded7e5e 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -37,7 +37,6 @@ #include "hw/boards.h" #include "qemu/error-report.h" #include "qemu/log.h" -#include "hw/ide.h" #include "hw/irq.h" #include "hw/loader.h" #include "hw/rtc/mc146818rtc.h" --=20 2.21.1