@samitouri / QOSamiQemu / commits / 104e8391dd

system/memory: Rename cpu_exec_init_all() -> machine_memory_init()

cpu_exec_init_all() is system specific: it initializes globals for the memory subsystem. Rename it as machine_memory_init() and restrict its declaration to 'system/' namespace. Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20260616153754.93545-3-philmd@oss.qualcomm.com>

Philippe Mathieu-Daudé committed Jun 16, 2026 at 10:13 UTC 104e8391dd908399e44a9e55ba134ee493907996
4 files changed +5 -3
include/exec/cpu-common.h
-1
@@ -18,7 +18,6 @@
18 #define EXCP_YIELD 0x10004 /* cpu wants to yield timeslice to another */
19 #define EXCP_ATOMIC 0x10005 /* stop-the-world and emulate atomic */
20
21 -void cpu_exec_init_all(void);
21 void cpu_exec_step_atomic(CPUState *cpu);
22
23 #define REAL_HOST_PAGE_ALIGN(addr) ROUND_UP((addr), qemu_real_host_page_size())
system/memory-internal.h
+2
@@ -14,6 +14,8 @@
14 #ifndef MEMORY_INTERNAL_H
15 #define MEMORY_INTERNAL_H
16
17 +void machine_memory_init(void);
18 +
19 static inline AddressSpaceDispatch *flatview_to_dispatch(FlatView *fv)
20 {
21 return fv->dispatch;
system/physmem.c
+1 -1
@@ -3592,7 +3592,7 @@ void address_space_register_map_client(AddressSpace *as, QEMUBH *bh)
3592 }
3593 }
3594
3595 -void cpu_exec_init_all(void)
3595 +void machine_memory_init(void)
3596 {
3597 qemu_mutex_init(&ram_list.mutex);
3598 /* The data structures we set up here depend on knowing the page size,
system/vl.c
+2 -1
@@ -143,6 +143,7 @@
143 #include "system/iothread.h"
144 #include "qemu/guest-random.h"
145 #include "qemu/keyval.h"
146 +#include "memory-internal.h"
147
148 #define MAX_VIRTIO_CONSOLES 1
149
@@ -2217,7 +2218,7 @@ static void qemu_create_machine(QDict *qdict)
2218 }
2219 }
2220
2220 - cpu_exec_init_all();
2221 + machine_memory_init();
2222
2223 /*
2224 * Get the default machine options from the machine if it is not already