]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
target/mips: Restrict mmu_init() to TCG
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Sun, 18 Apr 2021 14:25:49 +0000 (16:25 +0200)
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>
Sun, 2 May 2021 14:49:35 +0000 (16:49 +0200)
mmu_init() is only required by TCG accelerator.
Restrict its declaration and call to TCG.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210428170410.479308-21-f4bug@amsat.org>

target/mips/cpu.c
target/mips/internal.h
target/mips/tcg/tcg-internal.h

index a751c958329b02f8f5c9c9c041f6dc49fa2e7c2d..c3159e3d7f3a0ef1e324c654d2b0177202eb5751 100644 (file)
@@ -708,7 +708,7 @@ static void mips_cpu_realizefn(DeviceState *dev, Error **errp)
 
     env->exception_base = (int32_t)0xBFC00000;
 
-#ifndef CONFIG_USER_ONLY
+#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY)
     mmu_init(env, env->cpu_model);
 #endif
     fpu_init(env, env->cpu_model);
index 6bac8ef704a60eb37717cbe4b4d38135697e2e0d..2c9666905df21f6fb8eda1177ecee49f0299d869 100644 (file)
@@ -233,9 +233,6 @@ void cpu_mips_store_compare(CPUMIPSState *env, uint32_t value);
 void cpu_mips_start_count(CPUMIPSState *env);
 void cpu_mips_stop_count(CPUMIPSState *env);
 
-/* helper.c */
-void mmu_init(CPUMIPSState *env, const mips_def_t *def);
-
 static inline void mips_env_set_pc(CPUMIPSState *env, target_ulong value)
 {
     env->active_tc.PC = value & ~(target_ulong)1;
index b65580af211b5a62aed7bdd372d22e7d10ad7d43..70655bab45c5bc3400ae71c08c5fc90a7b38bb10 100644 (file)
@@ -20,6 +20,8 @@ bool mips_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
 
 #if !defined(CONFIG_USER_ONLY)
 
+void mmu_init(CPUMIPSState *env, const mips_def_t *def);
+
 void update_pagemask(CPUMIPSState *env, target_ulong arg1, int32_t *pagemask);
 
 uint32_t cpu_mips_get_random(CPUMIPSState *env);