Patchwork [qom-next,13/59] ppce500_spin: Store PowerPCCPU in SpinKick

login
register
mail settings
Submitter Andreas Färber
Date May 23, 2012, 3:07 a.m.
Message ID <1337742502-28565-14-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/160821/
State New
Headers show

Comments

Andreas Färber - May 23, 2012, 3:07 a.m.
Needed for moving stop field to CPUState.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 hw/ppce500_spin.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/hw/ppce500_spin.c b/hw/ppce500_spin.c
index fddf219..4c4a456 100644
--- a/hw/ppce500_spin.c
+++ b/hw/ppce500_spin.c
@@ -49,7 +49,7 @@  typedef struct spin_state {
 } SpinState;
 
 typedef struct spin_kick {
-    CPUPPCState *env;
+    PowerPCCPU *cpu;
     SpinInfo *spin;
 } SpinKick;
 
@@ -92,7 +92,7 @@  static void mmubooke_create_initial_mapping(CPUPPCState *env,
 static void spin_kick(void *data)
 {
     SpinKick *kick = data;
-    CPUPPCState *env = kick->env;
+    CPUPPCState *env = &kick->cpu->env;
     SpinInfo *curspin = kick->spin;
     target_phys_addr_t map_size = 64 * 1024 * 1024;
     target_phys_addr_t map_start;
@@ -158,7 +158,7 @@  static void spin_write(void *opaque, target_phys_addr_t addr, uint64_t value,
     if (!(ldq_p(&curspin->addr) & 1)) {
         /* run CPU */
         SpinKick kick = {
-            .env = env,
+            .cpu = ppc_env_get_cpu(env),
             .spin = curspin,
         };