system/memory: Rename cpu_exec_init_all() -> machine_memory_init()
cover system/memory: Rename cpu_exec_init_all() -> machine_memory_init()
Make sense of cpu_exec_init_all() name, renaming it and reduce its scope.
Philippe Mathieu-Daudé (2):
system/memory: Remove unnecessary CONFIG_USER_ONLY guards system/memory: Rename cpu_exec_init_all() -> machine_memory_init()
include/exec/cpu-common.h | 1 - system/memory-internal.h | 4 ++-- system/physmem.c | 2 +- system/vl.c | 3 ++- 4 files changed, 5 insertions(+), 5 deletions(-)
Signature · 1 line
2.53.0
PATCH 1/2 system/memory: Remove unnecessary CONFIG_USER_ONLY guards
This header is only used when building system units, checking for CONFIG_USER_ONLY is pointless.
--- system/memory-internal.h | 2 -- 1 file changed, 2 deletions(-)
system/memory-internal.h +0 -2
@@ -14,7 +14,6 @@#ifndef MEMORY_INTERNAL_H #define MEMORY_INTERNAL_H -#ifndef CONFIG_USER_ONLYstatic inline AddressSpaceDispatch *flatview_to_dispatch (FlatView *fv) {return fv->dispatch;
@@ -57,4 +56,3 @@ static inline MemOp devend_memop(enum device_endian end) }#endif -#endif
Signature · 1 line
2.53.0
Re: [PATCH 1/2] system/memory: Remove unnecessary CONFIG_USER_ONLY guards
Quoted 21 lines · Philippe Mathieu-Daudé
This header is only used when building system units, checking for
CONFIG_USER_ONLYis pointless.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- system/memory-internal.h | 2 -- 1 file changed, 2 deletions(-)system/memory-internal.h +0
-1@@ -14,7 +14,6 @@#ifndef MEMORY_INTERNAL_H #define MEMORY_INTERNAL_H -#ifndef CONFIG_USER_ONLYstatic inline AddressSpaceDispatch *flatview_to_dispatch (FlatView *fv) {return fv->dispatch;
system/memory-internal.h static inline MemOp devend_memop(enum device_endian end) · line 60
Quoted 4 lines
system/memory-internal.h +0
-1@@ -57,4 +56,3 @@ static inline MemOp devend_memop(enum device_endian end) }#endif -#endif
r~
PATCH 2/2 system/memory: Rename cpu_exec_init_all() -> machine_memory_init()
In reply to Philippe Mathieu-Daudé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.
--- include/exec/cpu-common.h | 1 - system/memory-internal.h | 2 ++ system/physmem.c | 2 +- system/vl.c | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-)
include/exec/cpu-common.h +0 -1
@@ -21,7 +21,6 @@#define EXCP_YIELD 0x10004/* cpu wants to yield timeslice to another */ #define EXCP_ATOMIC 0x10005/* stop-the-world and emulate atomic */ -void cpu_exec_init_all (void );void cpu_exec_step_atomic (CPUState *cpu);#define REAL_HOST_PAGE_ALIGN (addr) ROUND_UP((addr), qemu_real_host_page_size())
system/memory-internal.h +2 -0
@@ -14,6 +14,8 @@#ifndef MEMORY_INTERNAL_H #define MEMORY_INTERNAL_H +void machine_memory_init (void ); +static inline AddressSpaceDispatch *flatview_to_dispatch (FlatView *fv) {return fv->dispatch;
system/physmem.c +1 -1
@@ -3600,7 +3600,7 @@ void address_space_register_map_client(AddressSpace *as, QEMUBH *bh) } } -void cpu_exec_init_all (void ) +void machine_memory_init (void ) {qemu_mutex_init (&ram_list.mutex);/* The data structures we set up here depend on knowing the page size,
system/vl.c +2 -1
@@ -143,6 +143,7 @@#include "system/iothread.h" #include "qemu/guest-random.h" #include "qemu/keyval.h" +#include "memory-internal.h" #define MAX_VIRTIO_CONSOLES 1
@@ -2217,7 +2218,7 @@ static void qemu_create_machine(QDict *qdict) } } -cpu_exec_init_all (); +machine_memory_init ();/* * Get the default machine options from the machine if it is not already
Signature · 1 line
2.53.0
Quoted 11 lines · Philippe Mathieu-Daudé
cpu_exec_init_all()is system specific: it initializes globals for the memory subsystem. Rename it asmachine_memory_init()and restrict its declaration to 'system/' namespace.Signed-off-by Philippe Mathieu-Daudé<[email protected]>--- include/exec/cpu-common.h | 1 - system/memory-internal.h | 2 ++ system/physmem.c | 2 +- system/vl.c | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-)
r~
Philippe Mathieu-Daudé
AppliedQuoted 6 lines · Philippe Mathieu-Daudé
Make sense of
cpu_exec_init_all()name, renaming it and reduce its scope.Philippe Mathieu-Daudé (2):
system/memory: Remove unnecessaryCONFIG_USER_ONLYguards system/memory: Renamecpu_exec_init_all()->machine_memory_init()
Queued, thanks.