* [PATCH] riscv: limit sifive errata to CONFIG_64BIT
@ 2026-09-16 8:37 Arnd Bergmann
0 siblings, 0 replies; only message in thread
From: Arnd Bergmann @ 2026-09-16 8:37 UTC (permalink / raw)
To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Samuel Holland,
Nathan Chancellor
Cc: Arnd Bergmann, Alexandre Ghiti, Nick Desaulniers, Bill Wendling,
Justin Stitt, Jonathan Cameron, Aleksandar Rikalo,
Djordje Todorovic, Conor Dooley, Nam Cao, Jia Wang,
Pinkesh Vaghela, Drew Fustini, Junhui Liu, linux-riscv,
linux-kernel, llvm
From: Arnd Bergmann <arnd@arndb.de>
There are two errata for this vendor, and they both individually depend on
CONFIG_64BIT already. However, an 32-bit allmodconfig produces this warning
from clang for a condition that can never be true.
arch/riscv/errata/sifive/errata.c:29:14: error: result of comparison of constant 9223372036854775815 with expression of type 'unsigned long' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
29 | if (arch_id != 0x8000000000000007 ||
| ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~
arch/riscv/errata/sifive/errata.c:42:14: error: result of comparison of constant 9223372036854775815 with expression of type 'unsigned long' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
42 | if (arch_id != 0x8000000000000007 && arch_id != 0x1)
| ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/riscv/Kconfig.errata | 2 +-
arch/riscv/Kconfig.socs | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/riscv/Kconfig.errata b/arch/riscv/Kconfig.errata
index 3c945d086c7d..38ade0ea4e9c 100644
--- a/arch/riscv/Kconfig.errata
+++ b/arch/riscv/Kconfig.errata
@@ -46,7 +46,7 @@ config ERRATA_MIPS_P8700_PAUSE_OPCODE
config ERRATA_SIFIVE
bool "SiFive errata"
- depends on RISCV_ALTERNATIVE
+ depends on RISCV_ALTERNATIVE && 64BIT
help
All SiFive errata Kconfig depend on this Kconfig. Disabling
this Kconfig will disable all SiFive errata. Please say "Y"
diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs
index 429e07589306..cecbce0c4983 100644
--- a/arch/riscv/Kconfig.socs
+++ b/arch/riscv/Kconfig.socs
@@ -34,6 +34,7 @@ config ARCH_RENESAS
config ARCH_SIFIVE
bool "SiFive SoCs"
select ERRATA_SIFIVE
+ depends on 64BIT
help
This enables support for SiFive SoC platform hardware.
--
2.53.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-16 8:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-16 8:37 [PATCH] riscv: limit sifive errata to CONFIG_64BIT Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®