[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/8] hw/pci-host/designware: Add 'host_mem' variable for clarity
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 3/8] hw/pci-host/designware: Add 'host_mem' variable for clarity |
Date: |
Thu, 12 Oct 2023 14:18:51 +0200 |
designware_pcie_root_realize() uses get_system_memory()
as the "host side memory region", as opposed to the "PCI
side" one. Introduce the 'host_mem' variable for clarity.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/pci-host/designware.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/pci-host/designware.c b/hw/pci-host/designware.c
index 692e0731cd..bacb2bdb2d 100644
--- a/hw/pci-host/designware.c
+++ b/hw/pci-host/designware.c
@@ -393,6 +393,7 @@ static void designware_pcie_root_realize(PCIDevice *dev,
Error **errp)
{
DesignwarePCIERoot *root = DESIGNWARE_PCIE_ROOT(dev);
DesignwarePCIEHost *host = designware_pcie_root_to_host(root);
+ MemoryRegion *host_mem = get_system_memory();
MemoryRegion *address_space = &host->pci.memory;
PCIBridge *br = PCI_BRIDGE(dev);
DesignwarePCIEViewport *viewport;
@@ -433,7 +434,7 @@ static void designware_pcie_root_realize(PCIDevice *dev,
Error **errp)
viewport->cr[0] = DESIGNWARE_PCIE_ATU_TYPE_MEM;
source = &host->pci.address_space_root;
- destination = get_system_memory();
+ destination = host_mem;
direction = "Inbound";
/*
@@ -458,7 +459,7 @@ static void designware_pcie_root_realize(PCIDevice *dev,
Error **errp)
destination = &host->pci.memory;
direction = "Outbound";
- source = get_system_memory();
+ source = host_mem;
/*
* Configure MemoryRegion implementing CPU -> PCI memory
--
2.41.0
- [PATCH 0/8] hw/pci-host/designware: QOM shuffling (Host bridge <-> Root function), Philippe Mathieu-Daudé, 2023/10/12
- [PATCH 1/8] hw/pci-host/designware: Declare CPU QOM types using DEFINE_TYPES() macro, Philippe Mathieu-Daudé, 2023/10/12
- [PATCH 2/8] hw/pci-host/designware: Initialize root function in host bridge realize, Philippe Mathieu-Daudé, 2023/10/12
- [PATCH 3/8] hw/pci-host/designware: Add 'host_mem' variable for clarity,
Philippe Mathieu-Daudé <=
- [PATCH 4/8] hw/pci-host/designware: Hoist host controller in root function #0, Philippe Mathieu-Daudé, 2023/10/12
- [PATCH 5/8] hw/pci-host/designware: Keep host reference in DesignwarePCIEViewport, Philippe Mathieu-Daudé, 2023/10/12
- [PATCH 6/8] hw/pci-host/designware: Move viewports from root func to host bridge, Philippe Mathieu-Daudé, 2023/10/12
- [PATCH 7/8] hw/pci-host/designware: Move MSI registers from root func to host bridge, Philippe Mathieu-Daudé, 2023/10/12
- [PATCH 8/8] hw/pci-host/designware: Create ViewPorts during host bridge realization, Philippe Mathieu-Daudé, 2023/10/12
- Re: [PATCH 0/8] hw/pci-host/designware: QOM shuffling (Host bridge <-> Root function), Peter Maydell, 2023/10/27