Skip to contentSkip to conversation

riscv: Fix NR_CPUS range conditions

PATCH Applied Samuel Holland 6 participants 7 messages Nov 26, 2022 – Nov 28, 2022 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 riscv: Fix NR_CPUS range conditions

The conditions reference the symbol SBI_V01, which does not exist. The correct symbol is RISCV_SBI_V01.

Fixes e623715f3d67 ("RISC-V: Increase range and default value of NR_CPUS")

---

 arch/riscv/Kconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/riscv/Kconfig +3 -3
index fec54872ab45..acbfe34c6a00 100644
@@ -319,9 +319,9 @@ config SMP
 config NR_CPUS
 	int "Maximum number of CPUs (2-512)"
 	depends on SMP
-	range 2 512 if !SBI_V01
-	range 2 32 if SBI_V01 && 32BIT
-	range 2 64 if SBI_V01 && 64BIT
+	range 2 512 if !RISCV_SBI_V01
+	range 2 32 if RISCV_SBI_V01 && 32BIT
+	range 2 64 if RISCV_SBI_V01 && 64BIT
 	default "32" if 32BIT
 	default "64" if 64BIT
 
Signature · 1 line
2.37.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Samuel Holland

The conditions reference the symbol SBI_V01, which does not exist. The correct symbol is RISCV_SBI_V01.

Huh, good spot.

Quoted 28 lines
Fixes e623715f3d67 ("RISC-V: Increase range and default value of NR_CPUS")

---

 arch/riscv/Kconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/riscv/Kconfig +3 -3
index fec54872ab45..acbfe34c6a00 100644
@@ -319,9 +319,9 @@ config SMP
 config NR_CPUS
 	int "Maximum number of CPUs (2-512)"
 	depends on SMP
-	range 2 512 if !SBI_V01
-	range 2 32 if SBI_V01 && 32BIT
-	range 2 64 if SBI_V01 && 64BIT
+	range 2 512 if !RISCV_SBI_V01
+	range 2 32 if RISCV_SBI_V01 && 32BIT
+	range 2 64 if RISCV_SBI_V01 && 64BIT
 	default "32" if 32BIT
 	default "64" if 64BIT
 
Signature · 1 line
2.37.4
Reviewed-by
#2 lore raw
Quoted 6 lines · Conor Dooley
Quoted 2 lines · Samuel Holland

The conditions reference the symbol SBI_V01, which does not exist. The correct symbol is RISCV_SBI_V01.

Huh, good spot.

Yeah, huh. It never occurred to me that we don't have some sort of symbol referencing checking in kconfig. Or maybe we do and I just don't know how to enable it? Anyway, this issue made me wonder how many more dangling references we may have. I wrote a script to look for them and found 29, including this one. I'm not exactly sure how to report them since they touch so many different places. For now, I've opened this kernel BZ

https://bugzilla.kernel.org/show_bug.cgi?id=216748

Quoted 9 lines
Quoted 9 lines
Fixes e623715f3d67 ("RISC-V: Increase range and default value of NR_CPUS")

---

 arch/riscv/Kconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Quoted 14 lines
Quoted 5 lines
arch/riscv/Kconfig +0 -0
index fec54872ab45..acbfe34c6a00 100644

arch/riscv/Kconfig config SMP · line 324

Quoted 9 lines
arch/riscv/Kconfig +3 -3
@@ -319,9 +319,9 @@ config SMP
 config NR_CPUS
 	int "Maximum number of CPUs (2-512)"
 	depends on SMP
-	range 2 512 if !SBI_V01
-	range 2 32 if SBI_V01 && 32BIT
-	range 2 64 if SBI_V01 && 64BIT
+	range 2 512 if !RISCV_SBI_V01
+	range 2 32 if RISCV_SBI_V01 && 32BIT
+	range 2 64 if RISCV_SBI_V01 && 64BIT

And for this patch,

Thanks,
drew

#3 lore raw
Quoted 10 lines · Andrew Jones
Quoted 6 lines · Conor Dooley
Quoted 2 lines · Samuel Holland

The conditions reference the symbol SBI_V01, which does not exist. The correct symbol is RISCV_SBI_V01.

Huh, good spot.

Yeah, huh. It never occurred to me that we don't have some sort of symbol referencing checking in kconfig. Or maybe we do and I just don't know how

kismet, but that does the opposite. Randy Dunlap is the only person I see fiddling with that stuff usually, so perhaps he knows? +CC them either way.

Quoted 37 lines

to enable it? Anyway, this issue made me wonder how many more dangling references we may have. I wrote a script to look for them and found 29, including this one. I'm not exactly sure how to report them since they touch so many different places. For now, I've opened this kernel BZ

https://bugzilla.kernel.org/show_bug.cgi?id=216748

Quoted 9 lines
Quoted 9 lines
Fixes e623715f3d67 ("RISC-V: Increase range and default value of NR_CPUS")

---

 arch/riscv/Kconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Quoted 14 lines
Quoted 5 lines
arch/riscv/Kconfig +0 -0
index fec54872ab45..acbfe34c6a00 100644

arch/riscv/Kconfig config SMP · line 324

Quoted 9 lines
arch/riscv/Kconfig +3 -3
@@ -319,9 +319,9 @@ config SMP
 config NR_CPUS
 	int "Maximum number of CPUs (2-512)"
 	depends on SMP
-	range 2 512 if !SBI_V01
-	range 2 32 if SBI_V01 && 32BIT
-	range 2 64 if SBI_V01 && 64BIT
+	range 2 512 if !RISCV_SBI_V01
+	range 2 32 if RISCV_SBI_V01 && 32BIT
+	range 2 64 if RISCV_SBI_V01 && 64BIT

And for this patch,

Thanks,
drew

maintainer
#4 lore raw
In reply to Andrew Jones
Quoted 8 lines · On Mon, 28 Nov 2022 10:35:59 PST (-0800), [email protected] wrote:
Quoted 6 lines · Conor Dooley
Quoted 2 lines · Samuel Holland

The conditions reference the symbol SBI_V01, which does not exist. The correct symbol is RISCV_SBI_V01.

Huh, good spot.

Quoted 8 lines

Yeah, huh. It never occurred to me that we don't have some sort of symbol referencing checking in kconfig. Or maybe we do and I just don't know how to enable it? Anyway, this issue made me wonder how many more dangling references we may have. I wrote a script to look for them and found 29, including this one. I'm not exactly sure how to report them since they touch so many different places. For now, I've opened this kernel BZ

https://bugzilla.kernel.org/show_bug.cgi?id=216748

Thanks. This is on fixes, it's sort of jumping the queue (I've got a bunch of stuff still staged from last week, but thanksgiving screwed up the flow) but it's small enough it doesn't seem worth waiting.

Quoted 27 lines
Quoted 10 lines
Quoted 10 lines
Fixes e623715f3d67 ("RISC-V: Increase range and default value of NR_CPUS")

---

 arch/riscv/Kconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Quoted 14 lines
Quoted 5 lines
arch/riscv/Kconfig +0 -0
index fec54872ab45..acbfe34c6a00 100644

arch/riscv/Kconfig config SMP · line 324

Quoted 9 lines
arch/riscv/Kconfig +3 -3
@@ -319,9 +319,9 @@ config SMP
 config NR_CPUS
 	int "Maximum number of CPUs (2-512)"
 	depends on SMP
-	range 2 512 if !SBI_V01
-	range 2 32 if SBI_V01 && 32BIT
-	range 2 64 if SBI_V01 && 64BIT
+	range 2 512 if !RISCV_SBI_V01
+	range 2 32 if RISCV_SBI_V01 && 32BIT
+	range 2 64 if RISCV_SBI_V01 && 64BIT

And for this patch,

Quoted 4 lines

Thanks,
drew

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

#5 lore raw
In reply to Samuel Holland
Quoted 4 lines · Samuel Holland

The conditions reference the symbol SBI_V01, which does not exist. The correct symbol is RISCV_SBI_V01.

Applied, thanks!

[1/1] riscv: Fix NR_CPUS range conditions

      https://git.kernel.org/palmer/c/1d6b5ed41f8c

Best regards,

Signature · 6 lines
Palmer Dabbelt <[email protected]>

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
#6 lore raw
In reply to Samuel Holland
This patch was applied to riscv/linux.git (fixes) by Palmer Dabbelt <[email protected]>:

Hello:

This patch was applied to riscv/linux.git (fixes)
by Palmer Dabbelt <[email protected]>:

Quoted 8 lines · On Sat, 26 Nov 2022 00:15:56 -0600 you wrote:

The conditions reference the symbol SBI_V01, which does not exist. The correct symbol is RISCV_SBI_V01.

Fixes e623715f3d67 ("RISC-V: Increase range and default value of NR_CPUS")

---

[...]

Here is the summary with links:
- riscv: Fix NR_CPUS range conditions

    https://git.kernel.org/riscv/c/1d6b5ed41f8c

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html