[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 01/10] softmmu/ioport: Move portio_list_init() in front of por
From: |
Bernhard Beschow |
Subject: |
[PATCH v2 01/10] softmmu/ioport: Move portio_list_init() in front of portio_list_add() |
Date: |
Thu, 26 Jan 2023 22:17:31 +0100 |
This is a preparation for the next patch to keep its diff smaller.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
softmmu/ioport.c | 41 ++++++++++++++++++++---------------------
1 file changed, 20 insertions(+), 21 deletions(-)
diff --git a/softmmu/ioport.c b/softmmu/ioport.c
index cb8adb0b93..215344467b 100644
--- a/softmmu/ioport.c
+++ b/softmmu/ioport.c
@@ -113,27 +113,6 @@ uint32_t cpu_inl(uint32_t addr)
return val;
}
-void portio_list_init(PortioList *piolist,
- Object *owner,
- const MemoryRegionPortio *callbacks,
- void *opaque, const char *name)
-{
- unsigned n = 0;
-
- while (callbacks[n].size) {
- ++n;
- }
-
- piolist->ports = callbacks;
- piolist->nr = 0;
- piolist->regions = g_new0(MemoryRegion *, n);
- piolist->address_space = NULL;
- piolist->opaque = opaque;
- piolist->owner = owner;
- piolist->name = name;
- piolist->flush_coalesced_mmio = false;
-}
-
void portio_list_set_flush_coalesced(PortioList *piolist)
{
piolist->flush_coalesced_mmio = true;
@@ -250,6 +229,26 @@ static void portio_list_add_1(PortioList *piolist,
++piolist->nr;
}
+void portio_list_init(PortioList *piolist, Object *owner,
+ const MemoryRegionPortio *callbacks,
+ void *opaque, const char *name)
+{
+ unsigned n = 0;
+
+ while (callbacks[n].size) {
+ ++n;
+ }
+
+ piolist->ports = callbacks;
+ piolist->nr = 0;
+ piolist->regions = g_new0(MemoryRegion *, n);
+ piolist->address_space = NULL;
+ piolist->opaque = opaque;
+ piolist->owner = owner;
+ piolist->name = name;
+ piolist->flush_coalesced_mmio = false;
+}
+
void portio_list_add(PortioList *piolist,
MemoryRegion *address_space,
uint32_t start)
--
2.39.1
- [PATCH v2 00/10] Resolve isabus global, Bernhard Beschow, 2023/01/26
- [PATCH v2 01/10] softmmu/ioport: Move portio_list_init() in front of portio_list_add(),
Bernhard Beschow <=
- [PATCH v2 04/10] hw/ide/piix: Disuse isa_get_irq(), Bernhard Beschow, 2023/01/26
- [PATCH v2 03/10] softmmu/ioport: Remove unused functions, Bernhard Beschow, 2023/01/26
- [PATCH v2 02/10] softmmu/ioport: Merge portio_list_add() into portio_list_init(), Bernhard Beschow, 2023/01/26
- [PATCH v2 07/10] hw/ide/piix: Require an ISABus only for user-created instances, Bernhard Beschow, 2023/01/26
- [PATCH v2 09/10] hw/isa: Remove use of global isa bus, Bernhard Beschow, 2023/01/26
- [PATCH v2 05/10] Revert "hw/ide: Fix crash when plugging a piix3-ide device into the x-remote machine", Bernhard Beschow, 2023/01/26
- [PATCH v2 06/10] hw/ide/pci: Add PCIIDEState::isa_irqs[], Bernhard Beschow, 2023/01/26
- [PATCH v2 08/10] hw/ide: Let ide_init_ioport() take a MemoryRegion argument instead of ISADevice, Bernhard Beschow, 2023/01/26