Thread (3 messages) 3 messages, 2 authors, 2025-07-24

Re: [PATCH] arm: allow single CPU configuration by adjusting NR_CPUS range and defaults

From: Suchit K <hidden>
Date: 2025-07-24 17:57:45
Also in: linux-kernel-mentees, lkml

On Thu, 24 Jul 2025 at 23:16, Russell King (Oracle)
[off-list ref] wrote:
On Thu, Jul 24, 2025 at 10:56:03PM +0530, Suchit Karunakaran wrote:
quoted
Previously, the NR_CPUS config for ARM required a minimum of 2 CPUs.
This patch changes the minimum NR_CPUS to 1 when SMP is not enabled,
sets range to exactly 1 if !SMP, allowing only a single CPU setting and
adds conditional defaults:
    - default to 1 if SMP is disabled (uniprocessor)
    - default to 4 if SMP is enabled (multiprocessor)

Signed-off-by: Suchit Karunakaran <redacted>
This hasn't been tested. NR_CPUS depends on SMP, so if SMP is not
enabled, then NR_CPUS doesn't exist in the configuration. Therefore,
providing a default for !SMP is meaningless.
Oops, I think I misunderstood the intent of commit
278d1ed65e25d80af7c3a112d707b3f70516ddb4(cpumask: make CONFIG_NR_CPUS
always valid). And sorry for not testing it, I wasn't exactly sure how
to test it. Could you please point out the issues so I can fix them
properly? I appreciate your patience. I’m still learning my way around
kernel development and trying to improve. Thanks!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help