[PATCH -next] scv:=20errata:=20fix=20=E2=80=98riscv?= Fcbom=5Fblock=5Fsize=E2=80=99=20variable=20undeclared?=

Palmer Dabbelt palmer at dabbelt.com
Thu Sep 22 08:38:14 PDT 2022


On Mon, 19 Sep 2022 02:44:25 PDT (-0700), zengheng4 at huawei.com wrote:
> 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.

Thanks, but another version of this is already on fixes.

>
> 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) { }



More information about the linux-riscv mailing list