[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 6/8] sparc/sun4m: Remove main_cpu_reset()
From: |
Thiago Jung Bauermann |
Subject: |
[PATCH v3 6/8] sparc/sun4m: Remove main_cpu_reset() |
Date: |
Wed, 22 Jul 2020 23:56:55 -0300 |
We rely on cpu_common_reset() to set cs->halted to 0, so main_cpu_reset()
is pointless.
Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
---
hw/sparc/sun4m.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
NB: I was only able to test that this patch builds. I wasn't able to
run it.
diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c
index 9be930415f..f1d92df781 100644
--- a/hw/sparc/sun4m.c
+++ b/hw/sparc/sun4m.c
@@ -218,15 +218,6 @@ static void dummy_cpu_set_irq(void *opaque, int irq, int
level)
{
}
-static void main_cpu_reset(void *opaque)
-{
- SPARCCPU *cpu = opaque;
- CPUState *cs = CPU(cpu);
-
- cpu_reset(cs);
- cs->halted = 0;
-}
-
static void secondary_cpu_reset(void *opaque)
{
SPARCCPU *cpu = opaque;
@@ -827,9 +818,7 @@ static void cpu_devinit(const char *cpu_type, unsigned int
id,
env = &cpu->env;
cpu_sparc_set_id(env, id);
- if (id == 0) {
- qemu_register_reset(main_cpu_reset, cpu);
- } else {
+ if (id != 0) {
qemu_register_reset(secondary_cpu_reset, cpu);
cs = CPU(cpu);
cs->halted = 1;
- Re: [PATCH v3 2/8] target/arm: Move setting of CPU halted state to generic code, (continued)
- [PATCH v3 3/8] ppc/spapr: Use start-powered-off CPUState property, Thiago Jung Bauermann, 2020/07/22
- [PATCH v3 4/8] ppc/e500: Use start-powered-off CPUState property, Thiago Jung Bauermann, 2020/07/22
- [PATCH v3 5/8] mips/cps: Use start-powered-off CPUState property, Thiago Jung Bauermann, 2020/07/22
- [PATCH v3 6/8] sparc/sun4m: Remove main_cpu_reset(),
Thiago Jung Bauermann <=
- [PATCH v3 7/8] sparc/sun4m: Use start-powered-off CPUState property, Thiago Jung Bauermann, 2020/07/22
- [RFC PATCH v3 8/8] target/s390x: Use start-powered-off CPUState property, Thiago Jung Bauermann, 2020/07/22
- Re: [PATCH v3 0/8] Generalize start-powered-off property from ARM, Thiago Jung Bauermann, 2020/07/28