[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/56] hw/pci-host/designware: Add 'host_mem' variable for clarity
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 02/56] hw/pci-host/designware: Add 'host_mem' variable for clarity |
Date: |
Wed, 11 Sep 2024 14:13:27 +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>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Gustavo Romero <gustavo.romero@linaro.org>
Message-Id: <20231012121857.31873-4-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 c8ec5e8ba9..5d0f2ad703 100644
--- a/hw/pci-host/designware.c
+++ b/hw/pci-host/designware.c
@@ -395,6 +395,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;
@@ -435,7 +436,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";
/*
@@ -460,7 +461,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.45.2
- [PULL 00/56] Misc HW & UI patches, Philippe Mathieu-Daudé, 2024/09/11
- [PULL 01/56] hw/pci-host/designware: Declare CPU QOM types using DEFINE_TYPES() macro, Philippe Mathieu-Daudé, 2024/09/11
- [PULL 02/56] hw/pci-host/designware: Add 'host_mem' variable for clarity,
Philippe Mathieu-Daudé <=
- [PULL 03/56] hw/intc/loongson_ipi: Remove unused headers, Philippe Mathieu-Daudé, 2024/09/11
- [PULL 04/56] hw/sh4: Remove the deprecated SHIX machine, Philippe Mathieu-Daudé, 2024/09/11
- [PULL 05/56] hw/block: Remove TC58128 NAND EEPROM, Philippe Mathieu-Daudé, 2024/09/11
- [PULL 09/56] buildsys: Remove CRIS cross container, Philippe Mathieu-Daudé, 2024/09/11
- [PULL 08/56] tests/tcg: Remove CRIS bare test files, Philippe Mathieu-Daudé, 2024/09/11
- [PULL 07/56] tests/tcg: Remove CRIS libc test files, Philippe Mathieu-Daudé, 2024/09/11
- [PULL 06/56] hw/sh4: Remove sh7750_register_io_device() helper, Philippe Mathieu-Daudé, 2024/09/11
- [PULL 10/56] linux-user: Remove support for CRIS target, Philippe Mathieu-Daudé, 2024/09/11
- [PULL 11/56] hw/cris: Remove the axis-dev88 machine, Philippe Mathieu-Daudé, 2024/09/11
- [PULL 12/56] hw/cris: Remove image loader helper, Philippe Mathieu-Daudé, 2024/09/11