diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-01-29 17:45:03 +0100 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2024-03-12 12:04:24 +0100 |
commit | 794511bc51bc89f384063103653e5f40c75cd49e (patch) | |
tree | 40a3bfeacf2c870cb079db006e9460ef1fd977d6 /hw/ppc/spapr.c | |
parent | 074bd799e73a23b0ce05ed45f2668ceb31db144e (diff) |
target/ppc: Prefer fast cpu_env() over slower CPU QOM cast macro
Mechanical patch produced running the command documented
in scripts/coccinelle/cpu_env.cocci_template header.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240129164514.73104-22-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'hw/ppc/spapr.c')
-rw-r--r-- | hw/ppc/spapr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index f8980b62ec..394091830d 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3481,8 +3481,7 @@ static void spapr_machine_finalizefn(Object *obj) void spapr_do_system_reset_on_cpu(CPUState *cs, run_on_cpu_data arg) { SpaprMachineState *spapr = SPAPR_MACHINE(qdev_get_machine()); - PowerPCCPU *cpu = POWERPC_CPU(cs); - CPUPPCState *env = &cpu->env; + CPUPPCState *env = cpu_env(cs); cpu_synchronize_state(cs); /* If FWNMI is inactive, addr will be -1, which will deliver to 0x100 */ |