aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv/errata
diff options
context:
space:
mode:
authorHeiko Stuebner2022-09-05 13:10:27 +0200
committerPalmer Dabbelt2022-10-13 08:46:30 -0700
commit14057733109dcc83c35a6730f3b7112aac4d2b82 (patch)
tree754cd9b0b4f6a325a5839116b093250673e1849e /arch/riscv/errata
parente283187c034cd80c1dd98ad732c73ce930a5efa4 (diff)
riscv: check for kernel config option in t-head memory types errata
The t-head variant of page-based memory types should also check first for the enabled kernel config option. Fixes: a35707c3d850 ("riscv: add memory-type errata for T-Head") Signed-off-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Guo Ren <guoren@kernel.org> Link: https://lore.kernel.org/r/20220905111027.2463297-6-heiko@sntech.de Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/errata')
-rw-r--r--arch/riscv/errata/thead/errata.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/riscv/errata/thead/errata.c b/arch/riscv/errata/thead/errata.c
index a6f4bd8ccf3f..902e12452821 100644
--- a/arch/riscv/errata/thead/errata.c
+++ b/arch/riscv/errata/thead/errata.c
@@ -17,6 +17,9 @@
static bool errata_probe_pbmt(unsigned int stage,
unsigned long arch_id, unsigned long impid)
{
+ if (!IS_ENABLED(CONFIG_ERRATA_THEAD_PBMT))
+ return false;
+
if (arch_id != 0 || impid != 0)
return false;