Skip to content

Commit 1edae1a

Browse files
crwood-rhsuryasaimadhu
authored andcommitted
x86/Kconfig: Enforce limit of 512 CPUs with MAXSMP and no CPUMASK_OFFSTACK
The help text of NR_CPUS says that the maximum number of CPUs supported without CPUMASK_OFFSTACK is 512. However, NR_CPUS_RANGE_END allows this limit to be bypassed by MAXSMP even if CPUMASK_OFFSTACK is not set. This scenario can currently only happen in the RT tree, since it has "select CPUMASK_OFFSTACK if !PREEMPT_RT_FULL" in MAXSMP. However, even if we ignore the RT tree, checking for MAXSMP in addition to CPUMASK_OFFSTACK is redundant. Signed-off-by: Scott Wood <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Mike Travis <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: x86-ml <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 9d40b85 commit 1edae1a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,8 +1000,8 @@ config NR_CPUS_RANGE_END
10001000
config NR_CPUS_RANGE_END
10011001
int
10021002
depends on X86_64
1003-
default 8192 if SMP && ( MAXSMP || CPUMASK_OFFSTACK)
1004-
default 512 if SMP && (!MAXSMP && !CPUMASK_OFFSTACK)
1003+
default 8192 if SMP && CPUMASK_OFFSTACK
1004+
default 512 if SMP && !CPUMASK_OFFSTACK
10051005
default 1 if !SMP
10061006

10071007
config NR_CPUS_DEFAULT

0 commit comments

Comments
 (0)