diff options
author | Andreas Färber <afaerber@suse.de> | 2012-05-03 03:41:16 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2012-06-04 23:00:45 +0200 |
commit | 403d7a2d734e1a8237a0d0db11110ece2aad28d8 (patch) | |
tree | 36b1ca8c2d73d082dae952eff2e28025a9477495 | |
parent | f9d1465f5bd11e27099459ab557f646802b11bd1 (diff) | |
download | qemu-403d7a2d734e1a8237a0d0db11110ece2aad28d8.zip qemu-403d7a2d734e1a8237a0d0db11110ece2aad28d8.tar.gz qemu-403d7a2d734e1a8237a0d0db11110ece2aad28d8.tar.bz2 |
sun4u: Store SPARCCPU in ResetData
We can now use cpu_reset() in place of cpu_state_reset() in
main_cpu_reset().
Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Blue Swirl <blauwirbel@gmail.com>
-rw-r--r-- | hw/sun4u.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -342,7 +342,7 @@ static void cpu_set_ivec_irq(void *opaque, int irq, int level) } typedef struct ResetData { - CPUSPARCState *env; + SPARCCPU *cpu; uint64_t prom_addr; } ResetData; @@ -395,10 +395,10 @@ static void cpu_timer_reset(CPUTimer *timer) static void main_cpu_reset(void *opaque) { ResetData *s = (ResetData *)opaque; - CPUSPARCState *env = s->env; + CPUSPARCState *env = &s->cpu->env; static unsigned int nr_resets; - cpu_state_reset(env); + cpu_reset(CPU(s->cpu)); cpu_timer_reset(env->tick); cpu_timer_reset(env->stick); @@ -782,7 +782,7 @@ static SPARCCPU *cpu_devinit(const char *cpu_model, const struct hwdef *hwdef) hstick_frequency, TICK_INT_DIS); reset_info = g_malloc0(sizeof(ResetData)); - reset_info->env = env; + reset_info->cpu = cpu; reset_info->prom_addr = hwdef->prom_addr; qemu_register_reset(main_cpu_reset, reset_info); |