[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 5/9] mips/cps: Use start-powered-off CPUState property
From: |
Thiago Jung Bauermann |
Subject: |
[PATCH v2 5/9] mips/cps: Use start-powered-off CPUState property |
Date: |
Wed, 22 Jul 2020 00:50:12 -0300 |
Instead of setting CPUState::halted to 1 in main_cpu_reset(), use the
start-powered-off property which makes cpu_common_reset() initialize it
to 1 in common code.
Signed-off-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
---
hw/mips/cps.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
NB: I was only able to test that this patch builds. I wasn't able to
run it.
diff --git a/hw/mips/cps.c b/hw/mips/cps.c
index 615e1a1ad2..d5b6c78019 100644
--- a/hw/mips/cps.c
+++ b/hw/mips/cps.c
@@ -52,9 +52,6 @@ static void main_cpu_reset(void *opaque)
CPUState *cs = CPU(cpu);
cpu_reset(cs);
-
- /* All VPs are halted on reset. Leave powering up to CPC. */
- cs->halted = 1;
}
static bool cpu_mips_itu_supported(CPUMIPSState *env)
@@ -89,6 +86,9 @@ static void mips_cps_realize(DeviceState *dev, Error **errp)
env->itc_tag = mips_itu_get_tag_region(&s->itu);
env->itu = &s->itu;
}
+ /* All VPs are halted on reset. Leave powering up to CPC. */
+ object_property_set_bool(OBJECT(cpu), "start-powered-off", true,
+ &error_abort);
qemu_register_reset(main_cpu_reset, cpu);
}
- Re: [PATCH v2 1/9] target/arm: Move start-powered-off property to generic CPUState, (continued)
- [PATCH v2 2/9] target/arm: Move setting of CPU halted state to generic code, Thiago Jung Bauermann, 2020/07/21
- [PATCH v2 3/9] ppc/spapr: Use start-powered-off CPUState property, Thiago Jung Bauermann, 2020/07/21
- [PATCH v2 4/9] ppc/e500: Use start-powered-off CPUState property, Thiago Jung Bauermann, 2020/07/21
- [PATCH v2 5/9] mips/cps: Use start-powered-off CPUState property,
Thiago Jung Bauermann <=
- [PATCH v2 6/9] sparc/sun4m: Use start-powered-off CPUState property, Thiago Jung Bauermann, 2020/07/21
- [RFC PATCH v2 7/9] sparc/sun4m: Don't set CPUState::halted in cpu_devinit(), Thiago Jung Bauermann, 2020/07/21
- [RFC PATCH v2 8/9] sparc/sun4m: Use one cpu_reset() function for main and secondary CPUs, Thiago Jung Bauermann, 2020/07/21