[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 15/42] hw/isa/piix3: Prefer pci_address_space() over get_system_m
From: |
Bernhard Beschow |
Subject: |
[PATCH 15/42] hw/isa/piix3: Prefer pci_address_space() over get_system_memory() |
Date: |
Thu, 1 Sep 2022 18:25:46 +0200 |
get_system_memory() accesses global state while pci_address_space() uses
whatever has been passed to the device instance, so avoid the global.
Moreover, PIIX4 uses pci_address_space() here as well.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
hw/isa/piix3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/isa/piix3.c b/hw/isa/piix3.c
index 0350f70706..f8fcd47e24 100644
--- a/hw/isa/piix3.c
+++ b/hw/isa/piix3.c
@@ -302,7 +302,7 @@ static void pci_piix3_realize(PCIDevice *dev, Error **errp)
PCIBus *pci_bus = pci_get_bus(dev);
ISABus *isa_bus;
- isa_bus = isa_bus_new(DEVICE(d), get_system_memory(),
+ isa_bus = isa_bus_new(DEVICE(d), pci_address_space(dev),
pci_address_space_io(dev), errp);
if (!isa_bus) {
return;
--
2.37.3
- [PATCH 11/42] hw/isa/piix3: Remove extra ';' outside of functions, (continued)
- [PATCH 11/42] hw/isa/piix3: Remove extra ';' outside of functions, Bernhard Beschow, 2022/09/01
- [PATCH 09/42] hw/isa/piix3: Create IDE controller in host device, Bernhard Beschow, 2022/09/01
- [PATCH 12/42] hw/isa/piix3: Remove unused include, Bernhard Beschow, 2022/09/01
- [PATCH 14/42] hw/isa/piix3: Modernize reset handling, Bernhard Beschow, 2022/09/01
- [PATCH 13/42] hw/isa/piix3: Add size constraints to rcr_ops, Bernhard Beschow, 2022/09/01
- [PATCH 16/42] hw/isa/piix3: Allow board to provide PCI interrupt routes, Bernhard Beschow, 2022/09/01
- [PATCH 15/42] hw/isa/piix3: Prefer pci_address_space() over get_system_memory(),
Bernhard Beschow <=
- [PATCH 17/42] hw/isa/piix3: Resolve redundant PIIX_NUM_PIC_IRQS, Bernhard Beschow, 2022/09/01
- [PATCH 20/42] hw/isa/piix3: Prefix pci_slot_get_pirq() with "piix3_", Bernhard Beschow, 2022/09/01
- [PATCH 18/42] hw/isa/piix3: Rename pci_piix3_props for sharing with PIIX4, Bernhard Beschow, 2022/09/01
- [PATCH 23/42] meson: Fix dependencies of piix4 southbridge, Bernhard Beschow, 2022/09/01
- [PATCH 19/42] hw/isa/piix3: Rename piix3_reset() for sharing with PIIX4, Bernhard Beschow, 2022/09/01
- [PATCH 22/42] hw/mips/malta: Reuse dev variable, Bernhard Beschow, 2022/09/01
- [PATCH 32/42] hw/isa/piix4: Rename wrongly named method, Bernhard Beschow, 2022/09/01