[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 27/66] hw/pci-host/i440fx: Move i440fx_realize() into PCII440FXSta
From: |
Michael S. Tsirkin |
Subject: |
[PULL 27/66] hw/pci-host/i440fx: Move i440fx_realize() into PCII440FXState section |
Date: |
Mon, 10 Jul 2023 19:03:42 -0400 |
From: Bernhard Beschow <shentey@gmail.com>
i440fx_realize() realizes the PCI device inside the host bridge
(PCII440FXState), but is implemented between i440fx_pcihost_realize() and
i440fx_init() which deal with the host bridge itself (I440FXState). Since we
want to append i440fx_init() to i440fx_pcihost_realize() later let's move
i440fx_realize() out of the way.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230630073720.21297-12-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/pci-host/i440fx.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/hw/pci-host/i440fx.c b/hw/pci-host/i440fx.c
index 0b76fe71af..e84fcd50b6 100644
--- a/hw/pci-host/i440fx.c
+++ b/hw/pci-host/i440fx.c
@@ -65,6 +65,15 @@ struct I440FXState {
*/
#define I440FX_COREBOOT_RAM_SIZE 0x57
+static void i440fx_realize(PCIDevice *dev, Error **errp)
+{
+ dev->config[I440FX_SMRAM] = 0x02;
+
+ if (object_property_get_bool(qdev_get_machine(), "iommu", NULL)) {
+ warn_report("i440fx doesn't support emulated iommu");
+ }
+}
+
static void i440fx_update_memory_mappings(PCII440FXState *d)
{
int i;
@@ -229,15 +238,6 @@ static void i440fx_pcihost_realize(DeviceState *dev, Error
**errp)
memory_region_add_coalescing(&phb->conf_mem, 0, 4);
}
-static void i440fx_realize(PCIDevice *dev, Error **errp)
-{
- dev->config[I440FX_SMRAM] = 0x02;
-
- if (object_property_get_bool(qdev_get_machine(), "iommu", NULL)) {
- warn_report("i440fx doesn't support emulated iommu");
- }
-}
-
PCIBus *i440fx_init(const char *pci_type,
DeviceState *dev,
MemoryRegion *address_space_mem,
--
MST
- [PULL 17/66] hw/i386/pc_q35: Resolve redundant q35_host variable, (continued)
- [PULL 17/66] hw/i386/pc_q35: Resolve redundant q35_host variable, Michael S. Tsirkin, 2023/07/10
- [PULL 18/66] hw/pci-host/q35: Fix double, contradicting .endianness assignment, Michael S. Tsirkin, 2023/07/10
- [PULL 19/66] hw/pci-host/q35: Initialize PCMachineState::bus in board code, Michael S. Tsirkin, 2023/07/10
- [PULL 21/66] hw/pci-host/q35: Initialize PCI_HOST_BYPASS_IOMMU property from board code, Michael S. Tsirkin, 2023/07/10
- [PULL 22/66] hw/pci-host/q35: Make some property name macros reusable by i440fx, Michael S. Tsirkin, 2023/07/10
- [PULL 23/66] hw/i386/pc_piix: Turn some local variables into initializers, Michael S. Tsirkin, 2023/07/10
- [PULL 20/66] hw/pci/pci_host: Introduce PCI_HOST_BYPASS_IOMMU macro, Michael S. Tsirkin, 2023/07/10
- [PULL 24/66] hw/pci-host/i440fx: Add "i440fx" child property in board code, Michael S. Tsirkin, 2023/07/10
- [PULL 25/66] hw/pci-host/i440fx: Replace magic values by existing constants, Michael S. Tsirkin, 2023/07/10
- [PULL 26/66] hw/pci-host/i440fx: Have common names for some local variables, Michael S. Tsirkin, 2023/07/10
- [PULL 27/66] hw/pci-host/i440fx: Move i440fx_realize() into PCII440FXState section,
Michael S. Tsirkin <=
- [PULL 28/66] hw/pci-host/i440fx: Make MemoryRegion pointers accessible as properties, Michael S. Tsirkin, 2023/07/10
- [PULL 29/66] hw/pci-host/i440fx: Add PCI_HOST_PROP_IO_MEM property, Michael S. Tsirkin, 2023/07/10
- [PULL 30/66] hw/pci-host/i440fx: Add PCI_HOST_{ABOVE, BELOW}_4G_MEM_SIZE properties, Michael S. Tsirkin, 2023/07/10
- [PULL 31/66] hw/pci-host/i440fx: Add I440FX_HOST_PROP_PCI_TYPE property, Michael S. Tsirkin, 2023/07/10
- [PULL 32/66] hw/pci-host/i440fx: Resolve i440fx_init(), Michael S. Tsirkin, 2023/07/10
- [PULL 33/66] hw/i386/pc_piix: Move i440fx' realize near its qdev_new(), Michael S. Tsirkin, 2023/07/10
- [PULL 34/66] hw/pci/pci: Remove multifunction parameter from pci_create_simple_multifunction(), Michael S. Tsirkin, 2023/07/10
- [PULL 35/66] hw/pci/pci: Remove multifunction parameter from pci_new_multifunction(), Michael S. Tsirkin, 2023/07/10
- [PULL 36/66] pcie: Release references of virtual functions, Michael S. Tsirkin, 2023/07/10
- [PULL 37/66] vdpa: Return -EIO if device ack is VIRTIO_NET_ERR in _load_mac(), Michael S. Tsirkin, 2023/07/10