aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2014-05-23 04:15:28 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-05-27 23:35:36 -0400
commit6f5e40a3001d2497a134386a173e3ec3fdf2ad0b (patch)
tree13066084106667f6e2f16396566b5f61c138af41 /arch/powerpc
parent5853aef1ac5c5d83076203e840ca463857a7515d (diff)
powerpc: Check cpu_thread_in_subcore() in __cpu_up()
To support split core we need to change the check in __cpu_up() that determines if a cpu is allowed to come online. Currently we refuse to online cpus which are not the primary thread within their core. On POWER8 with split core support this check needs to instead refuse to online cpus which are not the primary thread within their *sub* core. On POWER7 and other systems that do not support split core, threads_per_subcore == threads_per_core and so the check is equivalent. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/smp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 5cdd9eb3b24c..6af946e9a984 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -490,7 +490,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)
490 * Don't allow secondary threads to come online if inhibited 490 * Don't allow secondary threads to come online if inhibited
491 */ 491 */
492 if (threads_per_core > 1 && secondaries_inhibited() && 492 if (threads_per_core > 1 && secondaries_inhibited() &&
493 cpu % threads_per_core != 0) 493 cpu_thread_in_subcore(cpu))
494 return -EBUSY; 494 return -EBUSY;
495 495
496 if (smp_ops == NULL || 496 if (smp_ops == NULL ||