From: David Gibson Date: Thu, 14 Mar 2013 17:59:29 +0000 (+0000) Subject: pseries: Fix breakage in CPU QOM conversion X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a4e044c30e0044947fd0d69b1888d916f96bba6b;p=qemu.git pseries: Fix breakage in CPU QOM conversion 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 Signed-off-by: Alexander Graf --- diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index f355a9bb84..d45098d096 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -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;