[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 4/7] mips: call cpu_mips_realize_env() from mips_cpu_
From: |
Yongbok Kim |
Subject: |
[Qemu-devel] [PULL 4/7] mips: call cpu_mips_realize_env() from mips_cpu_realizefn() |
Date: |
Thu, 21 Sep 2017 14:38:08 +0100 |
From: Philippe Mathieu-Daudé <address@hidden>
This changes the order between cpu_mips_realize_env() and
cpu_exec_initfn(), but cpu_exec_initfn() don't have anything that
depends on cpu_mips_realize_env() being called first.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Igor Mammedov <address@hidden>
Tested-by: James Hogan <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Signed-off-by: Yongbok Kim <address@hidden>
---
target/mips/cpu.c | 3 +++
target/mips/translate.c | 1 -
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/target/mips/cpu.c b/target/mips/cpu.c
index 68bf423..e3ef835 100644
--- a/target/mips/cpu.c
+++ b/target/mips/cpu.c
@@ -123,6 +123,7 @@ static void mips_cpu_disas_set_info(CPUState *s,
disassemble_info *info) {
static void mips_cpu_realizefn(DeviceState *dev, Error **errp)
{
CPUState *cs = CPU(dev);
+ MIPSCPU *cpu = MIPS_CPU(dev);
MIPSCPUClass *mcc = MIPS_CPU_GET_CLASS(dev);
Error *local_err = NULL;
@@ -132,6 +133,8 @@ static void mips_cpu_realizefn(DeviceState *dev, Error
**errp)
return;
}
+ cpu_mips_realize_env(&cpu->env);
+
cpu_reset(cs);
qemu_init_vcpu(cs);
diff --git a/target/mips/translate.c b/target/mips/translate.c
index 5fc7979..94c38e8 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -20535,7 +20535,6 @@ MIPSCPU *cpu_mips_init(const char *cpu_model)
cpu = MIPS_CPU(object_new(TYPE_MIPS_CPU));
env = &cpu->env;
env->cpu_model = def;
- cpu_mips_realize_env(env);
object_property_set_bool(OBJECT(cpu), true, "realized", NULL);
--
2.7.4
- [Qemu-devel] [PULL 0/7] target-mips queue, Yongbok Kim, 2017/09/21
- [Qemu-devel] [PULL 5/7] mips: MIPSCPU model subclasses, Yongbok Kim, 2017/09/21
- [Qemu-devel] [PULL 2/7] mips: introduce internal.h and cleanup cpu.h, Yongbok Kim, 2017/09/21
- [Qemu-devel] [PULL 6/7] mips: replace cpu_mips_init() with cpu_generic_init(), Yongbok Kim, 2017/09/21
- [Qemu-devel] [PULL 3/7] mips: split cpu_mips_realize_env() out of cpu_mips_init(), Yongbok Kim, 2017/09/21
- [Qemu-devel] [PULL 7/7] mips: Improve macro parenthesization, Yongbok Kim, 2017/09/21
- [Qemu-devel] [PULL 4/7] mips: call cpu_mips_realize_env() from mips_cpu_realizefn(),
Yongbok Kim <=
- [Qemu-devel] [PULL 1/7] mips: move hw/mips/cputimer.c to target/mips/, Yongbok Kim, 2017/09/21
- Re: [Qemu-devel] [PULL 0/7] target-mips queue, no-reply, 2017/09/21
- Re: [Qemu-devel] [PULL 0/7] target-mips queue, Peter Maydell, 2017/09/21