riscv: check for kernel config option in t-head memory

A patch from »Some style cleanups for recent extension additions« in state Mainline for linux-kernel

From: Heiko Stuebner <heiko@...> Date: Thu, 1 Sep 2022 16:57:15 +0200

Commit-Message

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@...> Reviewed-by: Conor Dooley <conor.dooley@...> Reviewed-by: Andrew Jones <ajones@...>

Patch-Comment

arch/riscv/errata/thead/errata.c | 3 +++ 1 file changed, 3 insertions(+)

Statistics

  • 3 lines added
  • 0 lines removed

Changes

----------------------- arch/riscv/errata/thead/errata.c -----------------------
index a6f4bd8ccf3f..902e12452821 100644
@@ -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;
 
 

Recent Patches

About Us

Sed lacus. Donec lectus. Nullam pretium nibh ut turpis. Nam bibendum. In nulla tortor, elementum vel, tempor at, varius non, purus. Mauris vitae nisl nec metus placerat consectetuer.

Read More...