summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorBharat Bhushan <Bharat.Bhushan@freescale.com>2013-08-02 09:43:03 (GMT)
committerJ. German Rivera <German.Rivera@freescale.com>2013-09-04 19:42:09 (GMT)
commit3ad2c2838f713ef6d768e98fa2583718ddfd7ed0 (patch)
tree3968103d00344c378fdb6311c629d3e7940e6d64 /arch
parent34f43456e6a931ab3541a61f56e84aa352159fe6 (diff)
downloadlinux-fsl-qoriq-3ad2c2838f713ef6d768e98fa2583718ddfd7ed0.tar.xz
powerpc: dying cpus spins by default
When a cpu is dying, the dying cpu finally runs ppc_md.cpu_die(). Default set the ppc_md.cpu_die points to generic_mach_cpu_die(), which set the CPU state to CPU_DEAD and spins. Also fix to dereference guts_regs only when it is not NULL. Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com> Change-Id: I9372cb382d8306b429b9a94555c7e2123c53cd27 Reviewed-on: http://git.am.freescale.net:8181/3735 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Wood Scott-B07421 <scottwood@freescale.com> Reviewed-by: Yoder Stuart-B08248 <stuart.yoder@freescale.com> Reviewed-by: Rivera Jose-B46482 <Jose.G.Rivera@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/85xx/smp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c
index d166400..43cc5c9 100644
--- a/arch/powerpc/platforms/85xx/smp.c
+++ b/arch/powerpc/platforms/85xx/smp.c
@@ -235,7 +235,7 @@ void platform_cpu_die(unsigned int cpu)
/* enter PH20 status */
setbits32(&((struct ccsr_rcpm_v2 *)guts_regs)->pcph20setr,
1 << cpu_core_index_of_thread(hw_cpu));
- } else if (!rcpmv2) {
+ } else if (!rcpmv2 && guts_regs) {
rcpm = guts_regs;
/* Core Nap Operation */
setbits32(&rcpm->cnapcr, 1 << hw_cpu);
@@ -606,6 +606,10 @@ void __init mpc85xx_smp_init(void)
smp_85xx_ops.cause_ipi = doorbell_cause_ipi;
}
+#ifdef CONFIG_HOTPLUG_CPU
+ ppc_md.cpu_die = generic_mach_cpu_die;
+#endif
+
np = of_find_matching_node(NULL, mpc85xx_smp_guts_ids);
if (np) {
if (of_device_is_compatible(np, "fsl,qoriq-rcpm-2.0"))