diff options
author | Bharat Bhushan <Bharat.Bhushan@freescale.com> | 2013-08-02 09:43:03 (GMT) |
---|---|---|
committer | Rivera Jose-B46482 <Jose.G.Rivera@freescale.com> | 2013-08-13 16:54:13 (GMT) |
commit | 10fc25ba7530e123bee4eefc466c07aa5a629961 (patch) | |
tree | f0948bdde6d6d11d7909e55b8708159b73c4b54c /arch | |
parent | b3ae4204500b7b1dc56b576629dde33b3ba6edf8 (diff) | |
download | linux-fsl-qoriq-10fc25ba7530e123bee4eefc466c07aa5a629961.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.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c index 30721ac..b47bbd4 100644 --- a/arch/powerpc/platforms/85xx/smp.c +++ b/arch/powerpc/platforms/85xx/smp.c @@ -212,7 +212,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); @@ -587,6 +587,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")) |