public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jayachandran C." <jayachandranc@netlogicmicro.com>
To: Hillf Danton <dhillf@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-mips@linux-mips.org
Subject: Re: [RFC patch] MIPS/netlogic: dont setup boot CPU twice
Date: Fri, 5 Aug 2011 00:21:41 +0530	[thread overview]
Message-ID: <20110804185139.GA11724@jayachandranc.netlogicmicro.com> (raw)
In-Reply-To: <CA+7sy7B7-zTr4MojT+7C+AD4+ap4aiiJKX4u+fOPzR52yEJGJA@mail.gmail.com>

> 
> 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.

  parent reply	other threads:[~2011-08-04 19:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-04 14:55 [RFC patch] MIPS/netlogic: dont setup boot CPU twice Hillf Danton
     [not found] ` <CA+7sy7B7-zTr4MojT+7C+AD4+ap4aiiJKX4u+fOPzR52yEJGJA@mail.gmail.com>
2011-08-04 18:51   ` Jayachandran C. [this message]
2011-08-05 13:43     ` Hillf Danton
2011-08-20 13:55       ` Ralf Baechle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110804185139.GA11724@jayachandranc.netlogicmicro.com \
    --to=jayachandranc@netlogicmicro.com \
    --cc=dhillf@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox