Skip to content
Snippets Groups Projects
Commit ba7d3d18 authored by Alex Bennée's avatar Alex Bennée
Browse files

cpu_common_reset: wrap TCG specific code in tcg_enabled()


Both the cpu->tb_jmp_cache and SoftMMU TLB structures are only used
when running TCG code so we might as well skip them for anything else.

Signed-off-by: default avatarAlex Bennée <alex.bennee@linaro.org>
Reviewed-by: default avatarEduardo Habkost <ehabkost@redhat.com>
parent 1f5c00cf
No related branches found
No related tags found
No related merge requests found
......@@ -270,13 +270,15 @@ static void cpu_common_reset(CPUState *cpu)
cpu->exception_index = -1;
cpu->crash_occurred = false;
for (i = 0; i < TB_JMP_CACHE_SIZE; ++i) {
atomic_set(&cpu->tb_jmp_cache[i], NULL);
}
if (tcg_enabled()) {
for (i = 0; i < TB_JMP_CACHE_SIZE; ++i) {
atomic_set(&cpu->tb_jmp_cache[i], NULL);
}
#ifdef CONFIG_SOFTMMU
tlb_flush(cpu, 0);
tlb_flush(cpu, 0);
#endif
}
}
static bool cpu_common_has_work(CPUState *cs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment