pseries: Fix breakage in CPU QOM conversion
PATCH 1/1 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.
--- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/ppc/spapr.c +1 -1
@@ -645,7 +645,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 ;
Signature · 1 line
1.7.10.4
Alexander Graf
AppliedQuoted 8 lines · David Gibson
Commit
259186a7d2f7184efc96ae99bc5658e6159f53ad"cpu: Move halted andinterrupt_requestfields to CPUState" broke the pseries machine. That's because it usesCPU()instead ofENV_GET_CPU()to convert from the globalfirst_cpupointer (still a CPUArchState) to a CPUState. This patch fixes the breakage.Cc Andreas Färber <[email protected]>Signed-off-by David Gibson <[email protected]>
Thanks, applied to ppc-next.
Alex
Quoted 20 lines
---
hw/ppc/spapr.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)hw/ppc/spapr.c +1
-1@@ -645,7 +645,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 ;Signature · 1 line
1.7.10.4
Am 15.03.2013 04:59, schrieb David Gibson:
Quoted 17 lines
Commit
259186a7d2f7184efc96ae99bc5658e6159f53ad"cpu: Move halted andinterrupt_requestfields to CPUState" broke the pseries machine. That's because it usesCPU()instead ofENV_GET_CPU()to convert from the globalfirst_cpupointer (still a CPUArchState) to a CPUState. This patch fixes the breakage.Cc Andreas Färber <[email protected]>Signed-off-by David Gibson <[email protected]>--- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/ppc/spapr.c +0
-0
hw/ppc/spapr.c static void ppc_spapr_reset(void) · line 651
Quoted 8 lines
hw/ppc/spapr.c +1
-1@@ -645,7 +645,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 ;
Oops,
Did you check the commit if there's more instances of that bug?
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Quoted 29 lines · Andreas Färber
Am 15.03.2013 04:59, schrieb David Gibson:
Quoted 17 lines
Commit
259186a7d2f7184efc96ae99bc5658e6159f53ad"cpu: Move halted andinterrupt_requestfields to CPUState" broke the pseries machine. That's because it usesCPU()instead ofENV_GET_CPU()to convert from the globalfirst_cpupointer (still a CPUArchState) to a CPUState. This patch fixes the breakage.Cc Andreas Färber <[email protected]>Signed-off-by David Gibson <[email protected]>--- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/ppc/spapr.c +0
-0hw/ppc/spapr.c static void ppc_spapr_reset(void) · line 651
Quoted 8 lines
hw/ppc/spapr.c +1
-1@@ -645,7 +645,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 ;Oops,
Quoted 3 lines
Acked-by Andreas Färber <[email protected]>Did you check the commit if there's more instances of that bug?
I did not; sorry.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson