diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-01-18 22:57:28 +1000 |
---|---|---|
committer | Nicholas Piggin <npiggin@gmail.com> | 2024-02-23 23:24:42 +1000 |
commit | aea75803a4da88a09526c86f79bbbcdd40d664c2 (patch) | |
tree | c8c4c140f38542a1855bda04dddb14b1a1f8fa21 /hw | |
parent | 6cd1da55e8626016a7a74134badee299889a00c0 (diff) | |
download | qemu-aea75803a4da88a09526c86f79bbbcdd40d664c2.zip qemu-aea75803a4da88a09526c86f79bbbcdd40d664c2.tar.gz qemu-aea75803a4da88a09526c86f79bbbcdd40d664c2.tar.bz2 |
hw/ppc/spapr_hcall: Allow elision of softmmu_resize_hpt_prep
Check tcg_enabled() before calling softmmu_resize_hpt_prepare()
and softmmu_resize_hpt_commit() to allow the compiler to elide
their calls. The stubs are then unnecessary, remove them.
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ppc/spapr_hcall.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index fcefd1d..0d7d523 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_hcall.c @@ -123,9 +123,11 @@ static target_ulong h_resize_hpt_prepare(PowerPCCPU *cpu, if (kvm_enabled()) { return H_HARDWARE; + } else if (tcg_enabled()) { + return softmmu_resize_hpt_prepare(cpu, spapr, shift); + } else { + g_assert_not_reached(); } - - return softmmu_resize_hpt_prepare(cpu, spapr, shift); } static void do_push_sregs_to_kvm_pr(CPUState *cs, run_on_cpu_data data) @@ -191,9 +193,11 @@ static target_ulong h_resize_hpt_commit(PowerPCCPU *cpu, if (kvm_enabled()) { return H_HARDWARE; + } else if (tcg_enabled()) { + return softmmu_resize_hpt_commit(cpu, spapr, flags, shift); + } else { + g_assert_not_reached(); } - - return softmmu_resize_hpt_commit(cpu, spapr, flags, shift); } |