Keep cpu_common_*() pattern for publicly exposed common methods used by target code. Use cpu_exec_*() pattern for internal ones, mostly to distinct between system / user mode.
Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Message-Id: <[email protected]> --- include/hw/core/cpu.h | 4 +++- hw/core/cpu-common.c | 4 ++-- target/ppc/cpu_init.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 7b7cf330cde..81af7b9ee1a 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -1180,7 +1180,9 @@ void qemu_process_cpu_events(CPUState *cpu); /** cpu_common_realize: CPU DeviceRealize common handler */ bool cpu_common_realize(CPUState *cpu, Error **errp); -void cpu_exec_unrealizefn(CPUState *cpu); +/** cpu_common_realize: CPU DeviceUnrealize common handler */ +void cpu_common_unrealize(CPUState *cpu); + void cpu_exec_reset_hold(CPUState *cpu); extern const VMStateDescription vmstate_cpu_common; diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index 732e32fade2..59cd489b713 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -284,10 +284,10 @@ static void cpu_common_unrealizefn(DeviceState *dev) #endif /* NOTE: latest generic point before the cpu is fully unrealized */ - cpu_exec_unrealizefn(cpu); + cpu_common_unrealize(cpu); } -void cpu_exec_unrealizefn(CPUState *cpu) +void cpu_common_unrealize(CPUState *cpu) { cpu_vmstate_unregister(cpu); diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index b07e9c3ff9c..e3a1075aad3 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -6956,7 +6956,7 @@ static void ppc_cpu_realize(DeviceState *dev, Error **errp) return; unrealize: - cpu_exec_unrealizefn(cs); + cpu_common_unrealize(cs); } static void ppc_cpu_unrealize(DeviceState *dev) -- 2.53.0
