aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/smp.c
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2010-04-28 09:39:41 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-05-06 02:49:25 -0400
commitaef40e87d866355ffd279ab21021de733242d0d5 (patch)
treea6e665e4d28c374686eeb5c868b0043e14ae7e96 /arch/powerpc/platforms/pseries/smp.c
parentf8b67691828321f5c85bb853283aa101ae673130 (diff)
powerpc/pseries: Only call start-cpu when a CPU is stopped
Currently we always call start-cpu irrespective of if the CPU is stopped or not. Unfortunatley on POWER7, firmware seems to not like start-cpu being called when a cpu already been started. This was not the case on POWER6 and earlier. This patch checks to see if the CPU is stopped or not via an query-cpu-stopped-state call, and only calls start-cpu on CPUs which are stopped. This fixes a bug with kexec on POWER7 on PHYP where only the primary thread would make it to the second kernel. Reported-by: Ankita Garg <ankita@linux.vnet.ibm.com> Cc: <stable@kernel.org> Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries/smp.c')
-rw-r--r--arch/powerpc/platforms/pseries/smp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index 20b694280a6..8979982eb2e 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -104,6 +104,12 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu)
104 104
105 pcpu = get_hard_smp_processor_id(lcpu); 105 pcpu = get_hard_smp_processor_id(lcpu);
106 106
107 /* Check to see if the CPU out of FW already for kexec */
108 if (smp_query_cpu_stopped(pcpu) == QCSS_NOT_STOPPED){
109 cpu_set(lcpu, of_spin_map);
110 return 1;
111 }
112
107 /* Fixup atomic count: it exited inside IRQ handler. */ 113 /* Fixup atomic count: it exited inside IRQ handler. */
108 task_thread_info(paca[lcpu].__current)->preempt_count = 0; 114 task_thread_info(paca[lcpu].__current)->preempt_count = 0;
109 115