[PATCH -next] riscv: errata: fix ‘riscv_cbom_block_size’ variable undeclared

Zeng Heng zengheng4 at huawei.com
Mon Sep 19 02:44:25 PDT 2022


arch/riscv/errata/thead/errata.c: In function ‘errata_probe_cmo’:
arch/riscv/errata/thead/errata.c:40:2: error: ‘riscv_cbom_block_size’ undeclared (first use in this function); did you mean ‘riscv_init_cbom_blocksize’?
   40 |  riscv_cbom_block_size = L1_CACHE_BYTES;
      |  ^~~~~~~~~~~~~~~~~~~~~
      |  riscv_init_cbom_blocksize

'riscv_cbom_block_size' variable should be declared
without the limitation whether CONFIG_RISCV_ISA_ZICBOM
is enabled or not.

Signed-off-by: Zeng Heng <zengheng4 at huawei.com>
---
 arch/riscv/include/asm/cacheflush.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/include/asm/cacheflush.h b/arch/riscv/include/asm/cacheflush.h
index a89c005b4bbf..7ec600a71634 100644
--- a/arch/riscv/include/asm/cacheflush.h
+++ b/arch/riscv/include/asm/cacheflush.h
@@ -42,8 +42,8 @@ void flush_icache_mm(struct mm_struct *mm, bool local);
 
 #endif /* CONFIG_SMP */
 
-#ifdef CONFIG_RISCV_ISA_ZICBOM
 extern unsigned int riscv_cbom_block_size;
+#ifdef CONFIG_RISCV_ISA_ZICBOM
 void riscv_init_cbom_blocksize(void);
 #else
 static inline void riscv_init_cbom_blocksize(void) { }
-- 
2.25.1




More information about the linux-riscv mailing list