[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 7/7] hw/isa/piix3: Resolve redundant TYPE_PIIX3_XEN_DEVICE
From: |
Bernhard Beschow |
Subject: |
[PATCH v4 7/7] hw/isa/piix3: Resolve redundant TYPE_PIIX3_XEN_DEVICE |
Date: |
Mon, 3 Apr 2023 09:41:24 +0200 |
During the last patches, TYPE_PIIX3_XEN_DEVICE turned into a clone of
TYPE_PIIX3_DEVICE. Remove this redundancy.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Tested-by: Chuck Zmudzinski <brchuckz@aol.com>
Message-Id: <20230312120221.99183-7-shentey@gmail.com>
---
include/hw/southbridge/piix.h | 1 -
hw/i386/pc_piix.c | 5 ++---
hw/isa/piix3.c | 15 ---------------
3 files changed, 2 insertions(+), 19 deletions(-)
diff --git a/include/hw/southbridge/piix.h b/include/hw/southbridge/piix.h
index 0bf48e936d..51be04e984 100644
--- a/include/hw/southbridge/piix.h
+++ b/include/hw/southbridge/piix.h
@@ -64,7 +64,6 @@ DECLARE_INSTANCE_CHECKER(PIIX3State, PIIX3_PCI_DEVICE,
TYPE_PIIX3_PCI_DEVICE)
#define TYPE_PIIX3_DEVICE "PIIX3"
-#define TYPE_PIIX3_XEN_DEVICE "PIIX3-xen"
#define TYPE_PIIX4_PCI_DEVICE "piix4-isa"
#endif
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 1b70470dcd..7ca0d6d14e 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -237,8 +237,6 @@ static void pc_init1(MachineState *machine,
if (pcmc->pci_enabled) {
PIIX3State *piix3;
PCIDevice *pci_dev;
- const char *type = xen_enabled() ? TYPE_PIIX3_XEN_DEVICE
- : TYPE_PIIX3_DEVICE;
pci_bus = i440fx_init(pci_type,
i440fx_host,
@@ -251,7 +249,8 @@ static void pc_init1(MachineState *machine,
: pc_pci_slot_get_pirq);
pcms->bus = pci_bus;
- pci_dev = pci_create_simple_multifunction(pci_bus, -1, true, type);
+ pci_dev = pci_create_simple_multifunction(pci_bus, -1, true,
+ TYPE_PIIX3_DEVICE);
if (xen_enabled()) {
pci_device_set_intx_routing_notifier(
diff --git a/hw/isa/piix3.c b/hw/isa/piix3.c
index 418940139d..0d6992af67 100644
--- a/hw/isa/piix3.c
+++ b/hw/isa/piix3.c
@@ -29,7 +29,6 @@
#include "hw/southbridge/piix.h"
#include "hw/irq.h"
#include "hw/isa/isa.h"
-#include "hw/xen/xen.h"
#include "sysemu/runstate.h"
#include "migration/vmstate.h"
#include "hw/acpi/acpi_aml_interface.h"
@@ -366,24 +365,10 @@ static const TypeInfo piix3_info = {
.class_init = piix3_class_init,
};
-static void piix3_xen_class_init(ObjectClass *klass, void *data)
-{
- PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
-
- k->realize = piix3_realize;
-}
-
-static const TypeInfo piix3_xen_info = {
- .name = TYPE_PIIX3_XEN_DEVICE,
- .parent = TYPE_PIIX3_PCI_DEVICE,
- .class_init = piix3_xen_class_init,
-};
-
static void piix3_register_types(void)
{
type_register_static(&piix3_pci_type_info);
type_register_static(&piix3_info);
- type_register_static(&piix3_xen_info);
}
type_init(piix3_register_types)
--
2.40.0
- [PATCH v4 0/7] Resolve TYPE_PIIX3_XEN_DEVICE, Bernhard Beschow, 2023/04/03
- [PATCH v4 1/7] include/hw/xen/xen: Rename xen_piix3_set_irq() to xen_intx_set_irq(), Bernhard Beschow, 2023/04/03
- [PATCH v4 2/7] hw/pci/pci.c: Don't leak PCIBus::irq_count[] in pci_bus_irqs(), Bernhard Beschow, 2023/04/03
- [PATCH v4 7/7] hw/isa/piix3: Resolve redundant TYPE_PIIX3_XEN_DEVICE,
Bernhard Beschow <=
- [PATCH v4 3/7] hw/isa/piix3: Reuse piix3_realize() in piix3_xen_realize(), Bernhard Beschow, 2023/04/03
- [PATCH v4 4/7] hw/isa/piix3: Wire up Xen PCI IRQ handling outside of PIIX3, Bernhard Beschow, 2023/04/03
- [PATCH v4 5/7] hw/isa/piix3: Avoid Xen-specific variant of piix3_write_config(), Bernhard Beschow, 2023/04/03
- [PATCH v4 6/7] hw/isa/piix3: Resolve redundant k->config_write assignments, Bernhard Beschow, 2023/04/03
- Re: [PATCH v4 0/7] Resolve TYPE_PIIX3_XEN_DEVICE, Michael S. Tsirkin, 2023/04/21