target/hppa: Avoid async_safe_run_on_cpu on uniprocessor system

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2023-11-01 09:56:42 -07:00
parent eb25d10f4d
commit 34a0d9eefe

View File

@ -480,6 +480,7 @@ void HELPER(ptlb)(CPUHPPAState *env, target_ulong addr)
{ {
CPUState *src = env_cpu(env); CPUState *src = env_cpu(env);
CPUState *cpu; CPUState *cpu;
bool wait = false;
trace_hppa_tlb_ptlb(env); trace_hppa_tlb_ptlb(env);
run_on_cpu_data data = RUN_ON_CPU_TARGET_PTR(addr); run_on_cpu_data data = RUN_ON_CPU_TARGET_PTR(addr);
@ -487,9 +488,14 @@ void HELPER(ptlb)(CPUHPPAState *env, target_ulong addr)
CPU_FOREACH(cpu) { CPU_FOREACH(cpu) {
if (cpu != src) { if (cpu != src) {
async_run_on_cpu(cpu, ptlb_work, data); async_run_on_cpu(cpu, ptlb_work, data);
wait = true;
} }
} }
async_safe_run_on_cpu(src, ptlb_work, data); if (wait) {
async_safe_run_on_cpu(src, ptlb_work, data);
} else {
ptlb_work(src, data);
}
} }
void hppa_ptlbe(CPUHPPAState *env) void hppa_ptlbe(CPUHPPAState *env)