On 3/25/25 08:40, Philippe Mathieu-Daudé wrote:
MIPS MMU API declared in tcg-internal.h has public linkage.
In order to avoid name clashing with other targets, prefix
the API with 'mips_'.
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
target/mips/tcg/tcg-internal.h | 2 +-
target/mips/cpu.c | 2 +-
target/mips/tcg/system/tlb_helper.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/target/mips/tcg/tcg-internal.h b/target/mips/tcg/tcg-internal.h
index 74fc1309a71..a8bf2a5da40 100644
--- a/target/mips/tcg/tcg-internal.h
+++ b/target/mips/tcg/tcg-internal.h
@@ -45,7 +45,7 @@ void do_raise_exception(CPUMIPSState *env,
void mips_cpu_do_interrupt(CPUState *cpu);
bool mips_cpu_exec_interrupt(CPUState *cpu, int int_req);
-void mmu_init(CPUMIPSState *env, const mips_def_t *def);
+void mips_mmu_init(CPUMIPSState *env, const mips_def_t *def);
void update_pagemask(CPUMIPSState *env, target_ulong arg1, int32_t *pagemask);
diff --git a/target/mips/cpu.c b/target/mips/cpu.c
index 5ed6b3402d3..d8930468b7d 100644
--- a/target/mips/cpu.c
+++ b/target/mips/cpu.c
@@ -485,7 +485,7 @@ static void mips_cpu_realizefn(DeviceState *dev, Error
**errp)
env->exception_base = (int32_t)0xBFC00000;
#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY)
- mmu_init(env, env->cpu_model);
+ mips_mmu_init(env, env->cpu_model);
#endif
fpu_init(env, env->cpu_model);
mvp_init(env);
diff --git a/target/mips/tcg/system/tlb_helper.c
b/target/mips/tcg/system/tlb_helper.c
index ca4d6b27bc9..1ef2c32cfd4 100644
--- a/target/mips/tcg/system/tlb_helper.c
+++ b/target/mips/tcg/system/tlb_helper.c
@@ -466,7 +466,7 @@ static void r4k_mmu_init(CPUMIPSState *env, const
mips_def_t *def)
env->tlb->helper_tlbinvf = r4k_helper_tlbinvf;
}
-void mmu_init(CPUMIPSState *env, const mips_def_t *def)
+void mips_mmu_init(CPUMIPSState *env, const mips_def_t *def)
{
env->tlb = g_malloc0(sizeof(CPUMIPSTLBContext));
Reviewed-by: Pierrick Bouvier <pierrick.bouv...@linaro.org>