From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Stefano Stabellini" <sstabellini@kernel.org>,
xen-devel@lists.xenproject.org,
"Bernhard Beschow" <shentey@gmail.com>,
"Thomas Huth" <thuth@redhat.com>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Igor Mammedov" <imammedo@redhat.com>,
"Anthony Perard" <anthony.perard@citrix.com>,
"Ani Sinha" <anisinha@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Aurelien Jarno" <aurelien@aurel32.net>,
"Hervé Poussineau" <hpoussin@reactos.org>
Subject: [RFC PATCH-for-9.1 28/29] hw/i386/pc: Rename pc_init1() -> pc_piix_init()
Date: Thu, 28 Mar 2024 16:54:36 +0100 [thread overview]
Message-ID: <20240328155439.58719-29-philmd@linaro.org> (raw)
In-Reply-To: <20240328155439.58719-1-philmd@linaro.org>
pc_init1() is specific to the isapc and i440fx/piix machines,
rename it as pc_piix_init(). Expose it in "hw/i386/pc.h" to
be able to call it externally (see next patch).
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/i386/pc.h | 1 +
hw/i386/pc_piix.c | 8 ++++----
hw/isa/piix.c | 2 +-
hw/pci-host/i440fx.c | 2 +-
4 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 6510914803..9a11835b7e 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -163,6 +163,7 @@ void pc_basic_device_init(struct PCMachineState *pcms,
bool create_fdctrl,
uint32_t hpet_irqs);
void pc_nic_init(PCMachineClass *pcmc, ISABus *isa_bus, PCIBus *pci_bus);
+void pc_piix_init(MachineState *machine, const char *pci_type);
void pc_i8259_create(ISABus *isa_bus, qemu_irq *i8259_irqs);
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 4f07476cfa..4a3ae72fe4 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -111,7 +111,7 @@ static bool gigabyte_align(PCMachineState *pcms)
}
/* PC hardware initialisation */
-static void pc_init1(MachineState *machine, const char *pci_type)
+void pc_piix_init(MachineState *machine, const char *pci_type)
{
PCMachineState *pcms = PC_MACHINE(machine);
PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
@@ -437,7 +437,7 @@ static void pc_set_south_bridge(Object *obj, int value, Error **errp)
#ifdef CONFIG_ISAPC
static void pc_init_isa(MachineState *machine)
{
- pc_init1(machine, NULL);
+ pc_piix_init(machine, NULL);
}
#endif
@@ -447,7 +447,7 @@ static void pc_xen_hvm_init_pci(MachineState *machine)
const char *pci_type = xen_igd_gfx_pt_enabled() ?
TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE : TYPE_I440FX_PCI_DEVICE;
- pc_init1(machine, pci_type);
+ pc_piix_init(machine, pci_type);
}
static void pc_xen_hvm_init(MachineState *machine)
@@ -472,7 +472,7 @@ static void pc_xen_hvm_init(MachineState *machine)
if (compat) { \
compat(machine); \
} \
- pc_init1(machine, TYPE_I440FX_PCI_DEVICE); \
+ pc_piix_init(machine, TYPE_I440FX_PCI_DEVICE); \
} \
DEFINE_PC_MACHINE(suffix, name, pc_init_##suffix, optionfn, \
TYPE_PC_PCI_MACHINE)
diff --git a/hw/isa/piix.c b/hw/isa/piix.c
index 2d30711b17..14dc9e78be 100644
--- a/hw/isa/piix.c
+++ b/hw/isa/piix.c
@@ -432,7 +432,7 @@ static void pci_piix_class_init(ObjectClass *klass, void *data)
k->class_id = PCI_CLASS_BRIDGE_ISA;
/*
* Reason: part of PIIX southbridge, needs to be wired up by e.g.
- * pc_piix.c's pc_init1()
+ * pc_piix.c's pc_piix_init()
*/
dc->user_creatable = false;
device_class_set_props(dc, pci_piix_props);
diff --git a/hw/pci-host/i440fx.c b/hw/pci-host/i440fx.c
index add99e4f76..9f47d5507a 100644
--- a/hw/pci-host/i440fx.c
+++ b/hw/pci-host/i440fx.c
@@ -374,7 +374,7 @@ static void i440fx_pcihost_class_init(ObjectClass *klass, void *data)
dc->realize = i440fx_pcihost_realize;
dc->fw_name = "pci";
device_class_set_props(dc, i440fx_props);
- /* Reason: needs to be wired up by pc_init1 */
+ /* Reason: needs to be wired up by pc_piix_init */
dc->user_creatable = false;
object_class_property_add(klass, PCI_HOST_PROP_PCI_HOLE_START, "uint32",
--
2.41.0
next prev parent reply other threads:[~2024-03-28 16:01 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-28 15:54 [RFC PATCH-for-9.1 00/29] hw/i386/pc: Decouple ISA vs PCI-based machines Philippe Mathieu-Daudé
2024-03-28 15:54 ` [RFC PATCH-for-9.1 01/29] hw/i386/pc: Declare CPU QOM types using DEFINE_TYPES() macro Philippe Mathieu-Daudé
2024-03-28 15:54 ` [RFC PATCH-for-9.1 02/29] hw/i386/pc: Extract pc_machine_is_pci_enabled() helper Philippe Mathieu-Daudé
2024-03-28 15:54 ` [RFC PATCH-for-9.1 03/29] hw/i386/pc: Pass base machine type as argument to DEFINE_PC_MACHINE() Philippe Mathieu-Daudé
2024-03-28 15:54 ` [RFC PATCH-for-9.1 04/29] hw/i386/pc: Introduce PC_PCI_MACHINE QOM type Philippe Mathieu-Daudé
2024-03-28 15:54 ` [RFC PATCH-for-9.1 05/29] hw/i386/pc: Remove PCMachineClass::pci_enabled field Philippe Mathieu-Daudé
2024-03-28 15:54 ` [RFC PATCH-for-9.1 06/29] hw/i386/pc: Move pci_root_uid field to PcPciMachineClass Philippe Mathieu-Daudé
2024-03-28 15:54 ` [RFC PATCH-for-9.1 07/29] hw/i386/pc: Call fw_cfg_add_extra_pci_roots() in pc_pci_machine_done() Philippe Mathieu-Daudé
2024-03-28 15:54 ` [RFC PATCH-for-9.1 08/29] hw/i386/pc: Move CXLState to PcPciMachineState Philippe Mathieu-Daudé
2024-04-01 16:05 ` Jonathan Cameron via
2024-03-28 15:54 ` [RFC PATCH-for-9.1 09/29] hw/i386/pc: Pass PCMachineState argument to acpi_setup() Philippe Mathieu-Daudé
2024-03-28 18:45 ` BALATON Zoltan
2024-03-29 10:23 ` Philippe Mathieu-Daudé
2024-04-06 10:38 ` Bernhard Beschow
2024-03-28 15:54 ` [RFC PATCH-for-9.1 10/29] hw/i386/pc: Remove PCMachineClass::has_acpi_build field Philippe Mathieu-Daudé
2024-03-28 15:54 ` [RFC PATCH-for-9.1 11/29] hw/i386/pc: Move acpi_setup() call to pc_pci_machine_done() Philippe Mathieu-Daudé
2024-03-28 15:54 ` [RFC PATCH-for-9.1 12/29] hw/i386/pc: Move acpi_build_enabled to PcPciMachineState Philippe Mathieu-Daudé
2024-03-28 15:54 ` [RFC PATCH-for-9.1 13/29] hw/i386/pc: Remove non-PCI code from pc_system_firmware_init() Philippe Mathieu-Daudé
2024-03-28 18:50 ` BALATON Zoltan
2024-04-06 10:35 ` Bernhard Beschow
2024-03-28 15:54 ` [RFC PATCH-for-9.1 14/29] hw/i386/pc: Move pc_system_flash_create() to pc_pci_machine_initfn() Philippe Mathieu-Daudé
2024-03-28 18:52 ` BALATON Zoltan
2024-03-28 15:54 ` [RFC PATCH-for-9.1 15/29] hw/i386/pc: Move FW/pflash related fields to PcPciMachineState Philippe Mathieu-Daudé
2024-03-28 15:54 ` [RFC PATCH-for-9.1 16/29] hw/i386/pc: Move south-bridge related fields to PcPciMachine Philippe Mathieu-Daudé
2024-03-28 15:54 ` [RFC PATCH-for-9.1 17/29] hw/i386/pc: Inline gigabyte_align() Philippe Mathieu-Daudé
2024-03-28 15:54 ` [RFC PATCH-for-9.1 18/29] hw/i386/pc: Inline has_reserved_memory() Philippe Mathieu-Daudé
2024-03-28 15:54 ` [RFC PATCH-for-9.1 19/29] hw/i386/pc: Pass PcPciMachineState argument to CXL helpers Philippe Mathieu-Daudé
2024-03-28 15:54 ` [RFC PATCH-for-9.1 20/29] hw/i386/pc: Pass PcPciMachineState argument to pc_pci_hole64_start() Philippe Mathieu-Daudé
2024-03-28 15:54 ` [RFC PATCH-for-9.1 21/29] hw/i386/fw_cfg: Include missing 'qapi-types-machine.h' header Philippe Mathieu-Daudé
2024-03-28 15:54 ` [RFC PATCH-for-9.1 22/29] hw/i386/fw_cfg: Define fw_cfg_build_smbios() stub Philippe Mathieu-Daudé
2024-03-28 15:54 ` [RFC PATCH-for-9.1 23/29] hw/i386/fw_cfg: Inline smbios_defaults() Philippe Mathieu-Daudé
2024-03-28 15:54 ` [RFC PATCH-for-9.1 24/29] hw/i386/fw_cfg: Inline smbios_legacy_mode() Philippe Mathieu-Daudé
2024-03-28 15:54 ` [RFC PATCH-for-9.1 25/29] hw/i386/fw_cfg: Replace smbios_defaults() by !smbios_legacy_mode() Philippe Mathieu-Daudé
2024-03-28 15:54 ` [RFC PATCH-for-9.1 26/29] hw/i386/fw_cfg: Factor fw_cfg_build_smbios_legacy() out Philippe Mathieu-Daudé
2024-03-28 15:54 ` [RFC PATCH-for-9.1 27/29] hw/i386/pc: Call fw_cfg_build_smbios_legacy() in pc_machine_done() Philippe Mathieu-Daudé
2024-03-28 15:54 ` Philippe Mathieu-Daudé [this message]
2024-03-28 15:54 ` [RFC PATCH-for-9.1 29/29] hw/i386/pc: Move ISA-only PC machine to pc_isa.c Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240328155439.58719-29-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=anisinha@redhat.com \
--cc=anthony.perard@citrix.com \
--cc=aurelien@aurel32.net \
--cc=eduardo@habkost.net \
--cc=hpoussin@reactos.org \
--cc=imammedo@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=shentey@gmail.com \
--cc=sstabellini@kernel.org \
--cc=thuth@redhat.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).