diff options
author | Andreas Färber <afaerber@suse.de> | 2012-05-03 04:34:15 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2012-10-31 01:02:45 +0100 |
commit | c08d7424d600dce915a5506e95d55a359c243c66 (patch) | |
tree | f582f50c912f4558ac4f8d93929970484b013ba8 /hw | |
parent | d5a6814697014561dd0a2e2871df0e6c62a0ce59 (diff) | |
download | hqemu-c08d7424d600dce915a5506e95d55a359c243c66.zip hqemu-c08d7424d600dce915a5506e95d55a359c243c66.tar.gz |
cpus: Pass CPUState to qemu_cpu_kick()
CPUArchState is no longer needed there.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ppc.c | 4 | ||||
-rw-r--r-- | hw/ppce500_spin.c | 2 | ||||
-rw-r--r-- | hw/spapr_rtas.c | 5 | ||||
-rw-r--r-- | hw/sun4m.c | 2 | ||||
-rw-r--r-- | hw/sun4u.c | 2 |
5 files changed, 9 insertions, 6 deletions
@@ -206,7 +206,7 @@ static void ppc970_set_irq(void *opaque, int pin, int level) } else { LOG_IRQ("%s: restart the CPU\n", __func__); env->halted = 0; - qemu_cpu_kick(env); + qemu_cpu_kick(CPU(cpu)); } break; case PPC970_INPUT_HRESET: @@ -335,7 +335,7 @@ static void ppc40x_set_irq(void *opaque, int pin, int level) } else { LOG_IRQ("%s: restart the CPU\n", __func__); env->halted = 0; - qemu_cpu_kick(env); + qemu_cpu_kick(CPU(cpu)); } break; case PPC40x_INPUT_DEBUG: diff --git a/hw/ppce500_spin.c b/hw/ppce500_spin.c index fb5461d..7f8c842 100644 --- a/hw/ppce500_spin.c +++ b/hw/ppce500_spin.c @@ -115,7 +115,7 @@ static void spin_kick(void *data) env->halted = 0; env->exception_index = -1; cpu->stopped = false; - qemu_cpu_kick(env); + qemu_cpu_kick(cpu); } static void spin_write(void *opaque, hwaddr addr, uint64_t value, diff --git a/hw/spapr_rtas.c b/hw/spapr_rtas.c index ce76c58..6d5c48a 100644 --- a/hw/spapr_rtas.c +++ b/hw/spapr_rtas.c @@ -163,6 +163,7 @@ static void rtas_start_cpu(sPAPREnvironment *spapr, uint32_t nret, target_ulong rets) { target_ulong id, start, r3; + CPUState *cpu; CPUPPCState *env; if (nargs != 3 || nret != 1) { @@ -175,6 +176,8 @@ static void rtas_start_cpu(sPAPREnvironment *spapr, r3 = rtas_ld(args, 2); for (env = first_cpu; env; env = env->next_cpu) { + cpu = ENV_GET_CPU(env); + if (env->cpu_index != id) { continue; } @@ -194,7 +197,7 @@ static void rtas_start_cpu(sPAPREnvironment *spapr, env->gpr[3] = r3; env->halted = 0; - qemu_cpu_kick(env); + qemu_cpu_kick(cpu); rtas_st(rets, 0, 0); return; @@ -259,7 +259,7 @@ static void cpu_kick_irq(SPARCCPU *cpu) env->halted = 0; cpu_check_irqs(env); - qemu_cpu_kick(env); + qemu_cpu_kick(CPU(cpu)); } static void cpu_set_irq(void *opaque, int irq, int level) @@ -317,7 +317,7 @@ static void cpu_kick_irq(SPARCCPU *cpu) env->halted = 0; cpu_check_irqs(env); - qemu_cpu_kick(env); + qemu_cpu_kick(CPU(cpu)); } static void cpu_set_ivec_irq(void *opaque, int irq, int level) |