diff mbox series

powerpc: Define NR_CPUS all the time

Message ID afef0ec65a8ba8651bf4f6e4f4f08a8b6991dbfb.1620379469.git.christophe.leroy@csgroup.eu (mailing list archive)
State Accepted
Headers show
Series powerpc: Define NR_CPUS all the time | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch powerpc/merge (7619d98e5041d5c25aba5428704dba6121237a9a)
snowpatch_ozlabs/build-ppc64le success Build succeeded
snowpatch_ozlabs/build-ppc64be success Build succeeded
snowpatch_ozlabs/build-ppc64e success Build succeeded
snowpatch_ozlabs/build-pmac32 success Build succeeded
snowpatch_ozlabs/checkpatch success total: 0 errors, 0 warnings, 0 checks, 12 lines checked
snowpatch_ozlabs/needsstable success Patch has no Fixes tags

Commit Message

Christophe Leroy May 7, 2021, 9:24 a.m. UTC
include/linux/threads.h defines a default value for CONFIG_NR_CPUS
but suggests the architectures should always define it.

So do it, when CONFIG_SMP is not selected set CONFIG_NR_CPUS to 1.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
 arch/powerpc/platforms/Kconfig.cputype | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Michael Ellerman June 6, 2021, 12:08 p.m. UTC | #1
On Fri, 7 May 2021 09:24:43 +0000 (UTC), Christophe Leroy wrote:
> include/linux/threads.h defines a default value for CONFIG_NR_CPUS
> but suggests the architectures should always define it.
> 
> So do it, when CONFIG_SMP is not selected set CONFIG_NR_CPUS to 1.

Applied to powerpc/next.

[1/1] powerpc: Define NR_CPUS all the time
      https://git.kernel.org/powerpc/c/c176c3d58a3ed623e8917acaafe240245e700e33

cheers
diff mbox series

Patch

diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index f998e655b570..885140055b7a 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -476,9 +476,9 @@  config SMP
 	  If you don't know what to do here, say N.
 
 config NR_CPUS
-	int "Maximum number of CPUs (2-8192)"
-	range 2 8192
-	depends on SMP
+	int "Maximum number of CPUs (2-8192)" if SMP
+	range 2 8192 if SMP
+	default "1" if !SMP
 	default "32" if PPC64
 	default "4"