[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/46] hw/mips/gt64xxx_pci: Accumulate address space changes
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 03/46] hw/mips/gt64xxx_pci: Accumulate address space changes |
Date: |
Fri, 13 Jan 2023 16:44:49 +0100 |
Single registers access in ISD can produce multiple changes
in the address spaces. To reduce computational effort,
accumulate these as a single memory transaction.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230104133935.4639-5-philmd@linaro.org>
---
hw/mips/gt64xxx_pci.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/mips/gt64xxx_pci.c b/hw/mips/gt64xxx_pci.c
index 164866cf3e..65416c7b27 100644
--- a/hw/mips/gt64xxx_pci.c
+++ b/hw/mips/gt64xxx_pci.c
@@ -282,6 +282,8 @@ static void gt64120_isd_mapping(GT64120State *s)
hwaddr start = ((hwaddr)s->regs[GT_ISD] << 21) & 0xFFFE00000ull;
hwaddr length = 0x1000;
+ memory_region_transaction_begin();
+
if (s->ISD_length) {
memory_region_del_subregion(get_system_memory(), &s->ISD_mem);
}
@@ -292,10 +294,14 @@ static void gt64120_isd_mapping(GT64120State *s)
s->ISD_start = start;
s->ISD_length = length;
memory_region_add_subregion(get_system_memory(), s->ISD_start,
&s->ISD_mem);
+
+ memory_region_transaction_commit();
}
static void gt64120_pci_mapping(GT64120State *s)
{
+ memory_region_transaction_begin();
+
/* Update PCI0IO mapping */
if ((s->regs[GT_PCI0IOLD] & 0x7f) <= s->regs[GT_PCI0IOHD]) {
/* Unmap old IO address */
@@ -354,6 +360,8 @@ static void gt64120_pci_mapping(GT64120State *s)
&s->PCI0M1_mem);
}
}
+
+ memory_region_transaction_commit();
}
static int gt64120_post_load(void *opaque, int version_id)
--
2.38.1
- [PULL 00/46] MIPS patches for 2023-01-13, Philippe Mathieu-Daudé, 2023/01/13
- [PULL 01/46] hw/mips/malta: Split FPGA LEDs/ASCII display updates, Philippe Mathieu-Daudé, 2023/01/13
- [PULL 02/46] hw/mips/malta: Trace FPGA LEDs/ASCII display updates, Philippe Mathieu-Daudé, 2023/01/13
- [PULL 03/46] hw/mips/gt64xxx_pci: Accumulate address space changes,
Philippe Mathieu-Daudé <=
- [PULL 04/46] hw/mips/gt64xxx_pci: Endian-swap using PCI_HOST_BRIDGE MemoryRegionOps, Philippe Mathieu-Daudé, 2023/01/13
- [PULL 05/46] hw/mips/Kconfig: Introduce CONFIG_GT64120 to select gt64xxx_pci.c, Philippe Mathieu-Daudé, 2023/01/13
- [PULL 06/46] hw/mips/gt64xxx_pci: Let the GT64120 manage the lower 512MiB hole, Philippe Mathieu-Daudé, 2023/01/13
- [PULL 07/46] hw/mips/gt64xxx_pci: Manage endian bits with the RegisterFields API, Philippe Mathieu-Daudé, 2023/01/13
- [PULL 13/46] hw/mips/bootloader: Handle buffers as opaque arrays, Philippe Mathieu-Daudé, 2023/01/13
- [PULL 09/46] hw/mips/malta: Explicit GT64120 endianness upon device creation, Philippe Mathieu-Daudé, 2023/01/13
- [PULL 10/46] hw/mips/meson: Make gt64xxx_pci.c endian-agnostic, Philippe Mathieu-Daudé, 2023/01/13
- [PULL 11/46] hw/mips/gt64xxx_pci: Move it to hw/pci-host/, Philippe Mathieu-Daudé, 2023/01/13
- [PULL 14/46] hw/mips/bootloader: Implement nanoMIPS NOP opcode generator, Philippe Mathieu-Daudé, 2023/01/13
- [PULL 08/46] hw/mips/gt64xxx_pci: Add a 'cpu-little-endian' qdev property, Philippe Mathieu-Daudé, 2023/01/13