aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-05-03 03:21:31 +0200
committerAndreas Färber <afaerber@suse.de>2012-06-04 23:00:45 +0200
commit5414dec6353b24b22480798f08ddc0f110fcbb7f (patch)
tree53d172cc9a9c0fea84cfa77ab65d5f013eed87c4 /hw
parent8968f588e3e42183a49802f1fa18af0f95cf5ba5 (diff)
sun4m: Pass SPARCCPU to {main,secondary}_cpu_reset()
We can now use cpu_reset() in place of cpu_state_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/sun4m.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/hw/sun4m.c b/hw/sun4m.c
index c5d2e40527..a959261209 100644
--- a/hw/sun4m.c
+++ b/hw/sun4m.c
@@ -281,17 +281,19 @@ static void dummy_cpu_set_irq(void *opaque, int irq, int level)
static void main_cpu_reset(void *opaque)
{
- CPUSPARCState *env = opaque;
+ SPARCCPU *cpu = opaque;
+ CPUSPARCState *env = &cpu->env;
- cpu_state_reset(env);
+ cpu_reset(CPU(cpu));
env->halted = 0;
}
static void secondary_cpu_reset(void *opaque)
{
- CPUSPARCState *env = opaque;
+ SPARCCPU *cpu = opaque;
+ CPUSPARCState *env = &cpu->env;
- cpu_state_reset(env);
+ cpu_reset(CPU(cpu));
env->halted = 1;
}
@@ -821,9 +823,9 @@ static void cpu_devinit(const char *cpu_model, unsigned int id,
cpu_sparc_set_id(env, id);
if (id == 0) {
- qemu_register_reset(main_cpu_reset, env);
+ qemu_register_reset(main_cpu_reset, cpu);
} else {
- qemu_register_reset(secondary_cpu_reset, env);
+ qemu_register_reset(secondary_cpu_reset, cpu);
env->halted = 1;
}
*cpu_irqs = qemu_allocate_irqs(cpu_set_irq, env, MAX_PILS);