pseries: Fix breakage in CPU QOM conversion
authorDavid Gibson <david@gibson.dropbear.id.au>
Thu, 14 Mar 2013 17:59:29 +0000 (17:59 +0000)
committerAlexander Graf <agraf@suse.de>
Fri, 22 Mar 2013 14:28:45 +0000 (15:28 +0100)
Commit 259186a7d2f7184efc96ae99bc5658e6159f53ad "cpu: Move halted and
interrupt_request fields to CPUState" broke the pseries machine.  That's
because it uses CPU() instead of ENV_GET_CPU() to convert from the global
first_cpu pointer (still a CPUArchState) to a CPUState.  This patch fixes
the breakage.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/ppc/spapr.c

index f355a9bb849bfbed83ac869d0d1dcd1acb249941..d45098d0962419410b6394a97c59748f023989e5 100644 (file)
@@ -629,7 +629,7 @@ static void ppc_spapr_reset(void)
                        spapr->rtas_size);
 
     /* Set up the entry state */
-    first_cpu_cpu = CPU(first_cpu);
+    first_cpu_cpu = ENV_GET_CPU(first_cpu);
     first_cpu->gpr[3] = spapr->fdt_addr;
     first_cpu->gpr[5] = 0;
     first_cpu_cpu->halted = 0;