Skip to content

Commit

Permalink
target/hppa: Avoid async_safe_run_on_cpu on uniprocessor system
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
rth7680 committed Nov 7, 2023
1 parent eb25d10 commit 34a0d9e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion target/hppa/mem_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,16 +480,22 @@ void HELPER(ptlb)(CPUHPPAState *env, target_ulong addr)
{
CPUState *src = env_cpu(env);
CPUState *cpu;
bool wait = false;

trace_hppa_tlb_ptlb(env);
run_on_cpu_data data = RUN_ON_CPU_TARGET_PTR(addr);

CPU_FOREACH(cpu) {
if (cpu != src) {
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)
Expand Down

0 comments on commit 34a0d9e

Please sign in to comment.