All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Huacai Chen <chenhuacai@kernel.org>,
	Huacai Chen <chenhuacai@loongson.cn>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, Tiezhu Yang <yangtiezhu@loongson.cn>
Subject: Re: [PATCH] lib/smp_processor_id: Don't warn if there is only one CPU
Date: Thu, 12 Nov 2026 16:07:49 +0100	[thread overview]
Message-ID: <20261112150749.GA1813469@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20261112094059.18f66c2a@fedora>

On Thu, Nov 12, 2026 at 09:40:59AM -0500, Steven Rostedt wrote:
> On Thu, 12 Nov 2026 09:13:48 +0100
> Peter Zijlstra <peterz@infradead.org> wrote:
> 
> > num_possible_cpus() is what I was thinking of. Notably, there is no
> > requirement that the CPU bitmap is dense. You can have nr_cpu_ids at 256
> > and use 255 for your boot CPU. It would be completely daft to do so, but
> > it is still valid.
> 
> Hmm, I was under the impression that there would always be a CPU 0.
> 
> Is it possible to boot with a non zero CPU setup?

Yes. Voyager did that -- although that code is now long gone.

In general we must not assume boot cpu is 0 -- although I don't know of
any architecture that currently doesn't have that. Might be fun to have
it as a debug option to catch out assumptions.

  reply	other threads:[~2026-11-12 15:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11  9:24 [PATCH] lib/smp_processor_id: Don't warn if there is only one CPU Huacai Chen
2026-11-11 17:06 ` Peter Zijlstra
2026-11-12  3:14   ` Huacai Chen
2026-11-12  8:13     ` Peter Zijlstra
2026-11-12 14:40       ` Steven Rostedt
2026-11-12 15:07         ` Peter Zijlstra [this message]
2026-11-13  2:06       ` Huacai Chen
2026-11-12  4:00 ` Tiezhu Yang
2026-11-12  9:24 ` sashiko-bot

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=20261112150749.GA1813469@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=bsegall@google.com \
    --cc=chenhuacai@kernel.org \
    --cc=chenhuacai@loongson.cn \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=stable@vger.kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=yangtiezhu@loongson.cn \
    /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.