mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
target/arm: Restrict SoftMMU mmu_index() to TCG
Move arm_cpu_mmu_index() within CONFIG_TCG #ifdef'ry, convert CPUClass::mmu_index() to TCGCPUOps::mmu_index(). Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20250401080938.32278-5-philmd@linaro.org>
This commit is contained in:
committed by
Richard Henderson
parent
6ea8bce7ee
commit
61dc4d0da8
+7
-6
@@ -121,6 +121,12 @@ void arm_restore_state_to_opc(CPUState *cs,
|
||||
env->exception.syndrome = data[2] << ARM_INSN_START_WORD2_SHIFT;
|
||||
}
|
||||
}
|
||||
|
||||
int arm_cpu_mmu_index(CPUState *cs, bool ifetch)
|
||||
{
|
||||
return arm_env_mmu_index(cpu_env(cs));
|
||||
}
|
||||
|
||||
#endif /* CONFIG_TCG */
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
@@ -144,11 +150,6 @@ static bool arm_cpu_has_work(CPUState *cs)
|
||||
}
|
||||
#endif /* !CONFIG_USER_ONLY */
|
||||
|
||||
static int arm_cpu_mmu_index(CPUState *cs, bool ifetch)
|
||||
{
|
||||
return arm_env_mmu_index(cpu_env(cs));
|
||||
}
|
||||
|
||||
void arm_register_pre_el_change_hook(ARMCPU *cpu, ARMELChangeHookFn *hook,
|
||||
void *opaque)
|
||||
{
|
||||
@@ -2674,6 +2675,7 @@ static const TCGCPUOps arm_tcg_ops = {
|
||||
.synchronize_from_tb = arm_cpu_synchronize_from_tb,
|
||||
.debug_excp_handler = arm_debug_excp_handler,
|
||||
.restore_state_to_opc = arm_restore_state_to_opc,
|
||||
.mmu_index = arm_cpu_mmu_index,
|
||||
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
.record_sigsegv = arm_cpu_record_sigsegv,
|
||||
@@ -2708,7 +2710,6 @@ static void arm_cpu_class_init(ObjectClass *oc, void *data)
|
||||
&acc->parent_phases);
|
||||
|
||||
cc->class_by_name = arm_cpu_class_by_name;
|
||||
cc->mmu_index = arm_cpu_mmu_index;
|
||||
cc->dump_state = arm_cpu_dump_state;
|
||||
cc->set_pc = arm_cpu_set_pc;
|
||||
cc->get_pc = arm_cpu_get_pc;
|
||||
|
||||
@@ -373,6 +373,7 @@ void arm_cpu_synchronize_from_tb(CPUState *cs, const TranslationBlock *tb);
|
||||
|
||||
/* Our implementation of TCGCPUOps::cpu_exec_halt */
|
||||
bool arm_cpu_exec_halt(CPUState *cs);
|
||||
int arm_cpu_mmu_index(CPUState *cs, bool ifetch);
|
||||
#endif /* CONFIG_TCG */
|
||||
|
||||
typedef enum ARMFPRounding {
|
||||
|
||||
@@ -237,6 +237,7 @@ static const TCGCPUOps arm_v7m_tcg_ops = {
|
||||
.synchronize_from_tb = arm_cpu_synchronize_from_tb,
|
||||
.debug_excp_handler = arm_debug_excp_handler,
|
||||
.restore_state_to_opc = arm_restore_state_to_opc,
|
||||
.mmu_index = arm_cpu_mmu_index,
|
||||
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
.record_sigsegv = arm_cpu_record_sigsegv,
|
||||
|
||||
Reference in New Issue
Block a user