All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] RISC-V: Increase range and default value of NR_CPUS
@ 2022-03-19 12:12 ` Anup Patel
  0 siblings, 0 replies; 16+ messages in thread
From: Anup Patel @ 2022-03-19 12:12 UTC (permalink / raw)
  To: Palmer Dabbelt, Paul Walmsley
  Cc: Arnd Bergmann, Atish Patra, Alistair Francis, Anup Patel,
	linux-riscv, linux-kernel, Anup Patel

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 <apatel@ventanamicro.com>
---
Changes since v1:
 - Updated NR_CPUS range to 2-512 which reflects maximum number of
   CPUs supported by QEMU virt machine.
---
 arch/riscv/Kconfig | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 5adcbd9b5e88..423ac17f598c 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -274,10 +274,11 @@ config SMP
 	  If you don't know what to do here, say N.
 
 config NR_CPUS
-	int "Maximum number of CPUs (2-32)"
-	range 2 32
+	int "Maximum number of CPUs (2-512)"
+	range 2 512
 	depends on SMP
-	default "8"
+	default "32" if 32BIT
+	default "64" if 64BIT
 
 config HOTPLUG_CPU
 	bool "Support for hot-pluggable CPUs"
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-04-11 22:19 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-19 12:12 [PATCH v2] RISC-V: Increase range and default value of NR_CPUS Anup Patel
2022-03-19 12:12 ` Anup Patel
2022-03-31 19:42 ` Palmer Dabbelt
2022-03-31 19:42   ` Palmer Dabbelt
2022-04-06  9:55   ` Heinrich Schuchardt
2022-04-06  9:55     ` Heinrich Schuchardt
2022-04-06 10:10     ` Anup Patel
2022-04-06 10:10       ` Anup Patel
2022-04-08 16:38       ` Heinrich Schuchardt
2022-04-08 16:38         ` Heinrich Schuchardt
2022-04-08 16:45         ` Anup Patel
2022-04-08 16:45           ` Anup Patel
2022-04-11 22:18           ` Atish Patra
2022-04-11 22:18             ` Atish Patra
2022-04-06 23:00     ` Atish Patra
2022-04-06 23:00       ` Atish Patra

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.