[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH qom-cpu 55/59] spapr_rtas: Abstract rtas_query_cpu_sto
From: |
Andreas Färber |
Subject: |
[Qemu-ppc] [PATCH qom-cpu 55/59] spapr_rtas: Abstract rtas_query_cpu_stopped_state() with qemu_get_cpu() |
Date: |
Sun, 9 Jun 2013 21:13:22 +0200 |
Signed-off-by: Andreas Färber <address@hidden>
---
hw/ppc/spapr_rtas.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c
index 48cea4b..a67ffcd 100644
--- a/hw/ppc/spapr_rtas.c
+++ b/hw/ppc/spapr_rtas.c
@@ -130,7 +130,6 @@ static void rtas_query_cpu_stopped_state(sPAPREnvironment
*spapr,
uint32_t nret, target_ulong rets)
{
target_ulong id;
- CPUPPCState *env;
CPUState *cpu;
if (nargs != 1 || nret != 2) {
@@ -139,12 +138,8 @@ static void rtas_query_cpu_stopped_state(sPAPREnvironment
*spapr,
}
id = rtas_ld(args, 0);
- for (env = first_cpu; env; env = env->next_cpu) {
- cpu = CPU(ppc_env_get_cpu(env));
- if (cpu->cpu_index != id) {
- continue;
- }
-
+ cpu = qemu_get_cpu(id);
+ if (cpu != NULL) {
if (cpu->halted) {
rtas_st(rets, 1, 0);
} else {
--
1.8.1.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-ppc] [PATCH qom-cpu 55/59] spapr_rtas: Abstract rtas_query_cpu_stopped_state() with qemu_get_cpu(),
Andreas Färber <=