提交 ba7d3d18 编写于 作者: A Alex Bennée

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: NAlex Bennée <alex.bennee@linaro.org>
Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
上级 1f5c00cf
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册