From: Yang Shi <yang.shi@windriver.com>
To: Aaro Koskinen <aaro.koskinen@nokia.com>, <david.daney@cavium.com>
Cc: <linux-kernel@vger.kernel.org>, <linux-mips@linux-mips.org>
Subject: Re: 4.5-rc4 kernel is failed to bootup on CN6880
Date: Mon, 22 Feb 2016 11:15:47 -0800 [thread overview]
Message-ID: <56CB5E63.1080005@windriver.com> (raw)
In-Reply-To: <20160222124303.GR22974@ak-desktop.emea.nsn-net.net>
On 2/22/2016 4:43 AM, Aaro Koskinen wrote:
> Hi,
>
> On Fri, Feb 19, 2016 at 05:12:41PM -0800, Yang Shi wrote:
>> I tried to boot 4.5-rc4 kernel on my CN6880 board, but it is failed at
>> booting up secondary cores. The error is:
> With v4.5-rc5, EBB6800 is booting fine:
>
> [ 0.000000] CPU0 revision is: 000d9108 (Cavium Octeon II)
> [...]
> [ 2286.273935] SMP: Booting CPU01 (CoreId 1)...
> [ 2286.278201] CPU1 revision is: 000d9108 (Cavium Octeon II)
> [...]
> [ 2287.214953] SMP: Booting CPU31 (CoreId 31)...
> [ 2287.224668] CPU31 revision is: 000d9108 (Cavium Octeon II)
> [ 2287.224865] Brought up 32 CPUs
>
>> CPU31 revision is: 000d9101 (Cavium Octeon II)
>> SMP: Booting CPU32 (CoreId 32)...
>> Secondary boot timeout
>>
>> I passed "numcores=32" in kernel commandline since there are 32 cores ion
>> CN6880.
> You shouldn't have CPU32 in that case, the numbering starts from zero.
> Also the coremask is 32-bit.
>
> I can reproduce your issue with CONFIG_NR_CPUS=64. Possibly this code
> is incorrect for NR_CPUS bigger than 32:
>
> /* The present CPUs get the lowest CPU numbers. */
> cpus = 1;
> for (id = 0; id < NR_CPUS; id++) {
> if ((id != coreid) && (core_mask & (1 << id))) {
> set_cpu_possible(cpus, true);
> set_cpu_present(cpus, true);
>
> What CONFIG_NR_CPUS did you use?
Thanks. I did have 48 NR_CPUS set. It works when I changed it to 32.
I think the problem is core_mask is 32 bit. But when NR_CPUS > 32, in
"core_mask & (1 << id)" core_mask will be sign extended, then the
statement will return non-zero all the time.
Yang
>
> A.
>
WARNING: multiple messages have this Message-ID (diff)
From: Yang Shi <yang.shi@windriver.com>
To: Aaro Koskinen <aaro.koskinen@nokia.com>, david.daney@cavium.com
Cc: linux-kernel@vger.kernel.org, linux-mips@linux-mips.org
Subject: Re: 4.5-rc4 kernel is failed to bootup on CN6880
Date: Mon, 22 Feb 2016 11:15:47 -0800 [thread overview]
Message-ID: <56CB5E63.1080005@windriver.com> (raw)
Message-ID: <20160222191547.vLw2yWdf-cmKii3XFovmFAxH7E-CmGamtergBKEeH30@z> (raw)
In-Reply-To: <20160222124303.GR22974@ak-desktop.emea.nsn-net.net>
On 2/22/2016 4:43 AM, Aaro Koskinen wrote:
> Hi,
>
> On Fri, Feb 19, 2016 at 05:12:41PM -0800, Yang Shi wrote:
>> I tried to boot 4.5-rc4 kernel on my CN6880 board, but it is failed at
>> booting up secondary cores. The error is:
> With v4.5-rc5, EBB6800 is booting fine:
>
> [ 0.000000] CPU0 revision is: 000d9108 (Cavium Octeon II)
> [...]
> [ 2286.273935] SMP: Booting CPU01 (CoreId 1)...
> [ 2286.278201] CPU1 revision is: 000d9108 (Cavium Octeon II)
> [...]
> [ 2287.214953] SMP: Booting CPU31 (CoreId 31)...
> [ 2287.224668] CPU31 revision is: 000d9108 (Cavium Octeon II)
> [ 2287.224865] Brought up 32 CPUs
>
>> CPU31 revision is: 000d9101 (Cavium Octeon II)
>> SMP: Booting CPU32 (CoreId 32)...
>> Secondary boot timeout
>>
>> I passed "numcores=32" in kernel commandline since there are 32 cores ion
>> CN6880.
> You shouldn't have CPU32 in that case, the numbering starts from zero.
> Also the coremask is 32-bit.
>
> I can reproduce your issue with CONFIG_NR_CPUS=64. Possibly this code
> is incorrect for NR_CPUS bigger than 32:
>
> /* The present CPUs get the lowest CPU numbers. */
> cpus = 1;
> for (id = 0; id < NR_CPUS; id++) {
> if ((id != coreid) && (core_mask & (1 << id))) {
> set_cpu_possible(cpus, true);
> set_cpu_present(cpus, true);
>
> What CONFIG_NR_CPUS did you use?
Thanks. I did have 48 NR_CPUS set. It works when I changed it to 32.
I think the problem is core_mask is 32 bit. But when NR_CPUS > 32, in
"core_mask & (1 << id)" core_mask will be sign extended, then the
statement will return non-zero all the time.
Yang
>
> A.
>
next prev parent reply other threads:[~2016-02-22 19:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-20 1:12 4.5-rc4 kernel is failed to bootup on CN6880 Yang Shi
2016-02-20 1:12 ` Yang Shi
2016-02-20 1:15 ` David Daney
2016-02-20 1:15 ` David Daney
2016-02-20 1:19 ` Yang Shi
2016-02-20 1:19 ` Yang Shi
2016-02-22 12:43 ` Aaro Koskinen
2016-02-22 19:15 ` Yang Shi [this message]
2016-02-22 19:15 ` Yang Shi
2016-02-22 20:56 ` David Daney
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=56CB5E63.1080005@windriver.com \
--to=yang.shi@windriver.com \
--cc=aaro.koskinen@nokia.com \
--cc=david.daney@cavium.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.