[PATCH 2 3/4] powerpc: drop smp_generic_cpu_bootable()

Greg Kurz gkurz at linux.vnet.ibm.com
Sat Dec 6 02:15:12 AEDT 2014


The following assertions are always true:
- threads_per_core > 0
- cpu & (threads_per_core - 1) < threads_per_core

It means smp_generic_cpu_bootable() always returns true.

Signed-off-by: Greg Kurz <gkurz at linux.vnet.ibm.com>
---
 arch/powerpc/kernel/smp.c |   11 -----------
 1 file changed, 11 deletions(-)

diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 9577791..8d7f114 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -89,17 +89,6 @@ static void (*crash_ipi_function_ptr)(struct pt_regs *) = NULL;
  */
 int smp_generic_cpu_bootable(unsigned int nr)
 {
-	/* Special case - we inhibit secondary thread startup
-	 * during boot if the user requests it.
-	 */
-	if (system_state == SYSTEM_BOOTING && cpu_has_feature(CPU_FTR_SMT)) {
-		if (!threads_per_core && cpu_thread_in_core(nr) != 0)
-			return 0;
-		if (threads_per_core
-		    && cpu_thread_in_core(nr) >= threads_per_core)
-			return 0;
-	}
-
 	return 1;
 }
 



More information about the Linuxppc-dev mailing list