[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 16/19] target/mips: Inline cpu_mips_realize_env() in mips_cpu_rea
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 16/19] target/mips: Inline cpu_mips_realize_env() in mips_cpu_realizefn() |
Date: |
Mon, 7 Dec 2020 00:39:46 +0100 |
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/mips/cpu.c | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/target/mips/cpu.c b/target/mips/cpu.c
index 1073db7f257..899a746c3e5 100644
--- a/target/mips/cpu.c
+++ b/target/mips/cpu.c
@@ -104,17 +104,6 @@ static bool mips_cpu_has_work(CPUState *cs)
#include "translate_init.c.inc"
-static void cpu_mips_realize_env(CPUMIPSState *env)
-{
- env->exception_base = (int32_t)0xBFC00000;
-
-#ifndef CONFIG_USER_ONLY
- mmu_init(env, env->cpu_model);
-#endif
- fpu_init(env, env->cpu_model);
- mvp_init(env, env->cpu_model);
-}
-
/* TODO QOM'ify CPU reset and remove */
static void cpu_state_reset(CPUMIPSState *env)
{
@@ -400,6 +389,7 @@ static void mips_cpu_realizefn(DeviceState *dev, Error
**errp)
{
CPUState *cs = CPU(dev);
MIPSCPU *cpu = MIPS_CPU(dev);
+ CPUMIPSState *env = &cpu->env;
MIPSCPUClass *mcc = MIPS_CPU_GET_CLASS(dev);
Error *local_err = NULL;
@@ -423,7 +413,13 @@ static void mips_cpu_realizefn(DeviceState *dev, Error
**errp)
return;
}
- cpu_mips_realize_env(&cpu->env);
+ env->exception_base = (int32_t)0xBFC00000;
+
+#ifndef CONFIG_USER_ONLY
+ mmu_init(env, env->cpu_model);
+#endif
+ fpu_init(env, env->cpu_model);
+ mvp_init(env, env->cpu_model);
cpu_reset(cs);
qemu_init_vcpu(cs);
--
2.26.2
- Re: [PATCH 11/19] target/mips: Extract common helpers from helper.c to common_helper.c, (continued)
[PATCH 13/19] target/mips: Fix code style for checkpatch.pl, Philippe Mathieu-Daudé, 2020/12/06
[PATCH 14/19] target/mips: Move mmu_init() functions to tlb_helper.c, Philippe Mathieu-Daudé, 2020/12/06
[PATCH 12/19] target/mips: Rename helper.c as tlb_helper.c, Philippe Mathieu-Daudé, 2020/12/06
[PATCH 15/19] target/mips: Move cpu definitions, reset() and realize() to cpu.c, Philippe Mathieu-Daudé, 2020/12/06
[PATCH 16/19] target/mips: Inline cpu_mips_realize_env() in mips_cpu_realizefn(),
Philippe Mathieu-Daudé <=
[PATCH 17/19] target/mips: Rename translate_init.c as cpu-defs.c, Philippe Mathieu-Daudé, 2020/12/06
[RFC PATCH 18/19] target/mips: Restrict some TCG specific CPUClass handlers, Philippe Mathieu-Daudé, 2020/12/06