Skip to content

Commit e623715

Browse files
avpatelpalmer-dabbelt
authored andcommitted
RISC-V: Increase range and default value of NR_CPUS
Currently, the range and default value of NR_CPUS is too restrictive for high-end RISC-V systems with large number of HARTs. The latest QEMU virt machine supports upto 512 CPUs so the current NR_CPUS is restrictive for QEMU as well. Other major architectures (such as ARM64, x86_64, MIPS, etc) have a much higher range and default value of NR_CPUS. This patch increases NR_CPUS range to 2-512 and default value to XLEN (i.e. 32 for RV32 and 64 for RV64). Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]> Link: https://lore.kernel.org/r/[email protected]/ Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent cfadbb9 commit e623715

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

arch/riscv/Kconfig

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,10 +309,13 @@ config SMP
309309
If you don't know what to do here, say N.
310310

311311
config NR_CPUS
312-
int "Maximum number of CPUs (2-32)"
313-
range 2 32
312+
int "Maximum number of CPUs (2-512)"
314313
depends on SMP
315-
default "8"
314+
range 2 512 if !SBI_V01
315+
range 2 32 if SBI_V01 && 32BIT
316+
range 2 64 if SBI_V01 && 64BIT
317+
default "32" if 32BIT
318+
default "64" if 64BIT
316319

317320
config HOTPLUG_CPU
318321
bool "Support for hot-pluggable CPUs"

0 commit comments

Comments
 (0)