lkml.org 
[lkml]   [2011]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC patch] MIPS/netlogic: dont setup boot CPU twice
> 
> When do smp setup, check for boot CPU is added, then it is impossible to be
> initialized twice.
>
> Signed-off-by: Hillf Danton <dhillf@gmail.com>
> ---
>  arch/mips/netlogic/xlr/smp.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/arch/mips/netlogic/xlr/smp.c b/arch/mips/netlogic/xlr/smp.c
> index b495a7f..e6f8c62 100644
> --- a/arch/mips/netlogic/xlr/smp.c
> +++ b/arch/mips/netlogic/xlr/smp.c
> @@ -167,6 +167,8 @@ void __init nlm_smp_setup(void)
>
>        num_cpus = 1;
>        for (i = 0; i < NR_CPUS; i++) {
> +               if (i == boot_cpu)
> +                       continue;
>                if (nlm_cpu_ready[i]) {
>                        cpu_set(i, phys_cpu_present_map);
>                        __cpu_number_map[i] = num_cpus;

The nlm_cpu_ready[] entry is not set for the boot_cpu, it is set for only
the secondary cpus in smpboot.S. The code works as it is, but your patch
makes it more explicit.

My only commnet is that it might look better if you combine both the if checks.

JC.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-08-04 21:13    [W:0.035 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site