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

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


Subject should read "powerpc: drop useless code in smp_generic_cpu_bootable()"
actually...

On Fri, 05 Dec 2014 16:15:12 +0100
Greg Kurz <gkurz at linux.vnet.ibm.com> wrote:
> 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;
>  }
>  
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev



More information about the Linuxppc-dev mailing list