[PATCH V2 1/2] riscv: Move vendor errata definitions to new header

Han Gao rabenda.cn at gmail.com
Tue Jul 15 06:13:41 PDT 2025


On Sun, Jul 13, 2025 at 11:53 PM <guoren at kernel.org> wrote:
>
> From: "Guo Ren (Alibaba DAMO Academy)" <guoren at kernel.org>
>
> Move vendor errata definitions into errata_list_vendors.h.
>
> Signed-off-by: Guo Ren (Alibaba DAMO Academy) <guoren at kernel.org>
> ---
>  arch/riscv/include/asm/errata_list.h         | 19 +---------------
>  arch/riscv/include/asm/errata_list_vendors.h | 24 ++++++++++++++++++++
>  2 files changed, 25 insertions(+), 18 deletions(-)
>  create mode 100644 arch/riscv/include/asm/errata_list_vendors.h
>
> diff --git a/arch/riscv/include/asm/errata_list.h b/arch/riscv/include/asm/errata_list.h
> index 6e426ed7919a..18c9f7ee9b7c 100644
> --- a/arch/riscv/include/asm/errata_list.h
> +++ b/arch/riscv/include/asm/errata_list.h
> @@ -10,24 +10,7 @@
>  #include <asm/insn-def.h>
>  #include <asm/hwcap.h>
>  #include <asm/vendorid_list.h>
> -
> -#ifdef CONFIG_ERRATA_ANDES
> -#define ERRATA_ANDES_NO_IOCP 0
> -#define ERRATA_ANDES_NUMBER 1
> -#endif
> -
> -#ifdef CONFIG_ERRATA_SIFIVE
> -#define        ERRATA_SIFIVE_CIP_453 0
> -#define        ERRATA_SIFIVE_CIP_1200 1
> -#define        ERRATA_SIFIVE_NUMBER 2
> -#endif
> -
> -#ifdef CONFIG_ERRATA_THEAD
> -#define        ERRATA_THEAD_MAE 0
> -#define        ERRATA_THEAD_PMU 1
> -#define        ERRATA_THEAD_GHOSTWRITE 2
> -#define        ERRATA_THEAD_NUMBER 3
> -#endif
> +#include <asm/errata_list_vendors.h>
>
>  #ifdef __ASSEMBLY__
>
> diff --git a/arch/riscv/include/asm/errata_list_vendors.h b/arch/riscv/include/asm/errata_list_vendors.h
> new file mode 100644
> index 000000000000..a37d1558f39f
> --- /dev/null
> +++ b/arch/riscv/include/asm/errata_list_vendors.h
> @@ -0,0 +1,24 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +
> +#ifndef ASM_ERRATA_LIST_VENDORS_H
> +#define ASM_ERRATA_LIST_VENDORS_H
> +
> +#ifdef CONFIG_ERRATA_ANDES
> +#define ERRATA_ANDES_NO_IOCP 0
> +#define ERRATA_ANDES_NUMBER 1
> +#endif
> +
> +#ifdef CONFIG_ERRATA_SIFIVE
> +#define        ERRATA_SIFIVE_CIP_453 0
> +#define        ERRATA_SIFIVE_CIP_1200 1
> +#define        ERRATA_SIFIVE_NUMBER 2
> +#endif
> +
> +#ifdef CONFIG_ERRATA_THEAD
> +#define        ERRATA_THEAD_MAE 0
> +#define        ERRATA_THEAD_PMU 1
> +#define        ERRATA_THEAD_GHOSTWRITE 2
> +#define        ERRATA_THEAD_NUMBER 3
> +#endif
> +
> +#endif
> --
> 2.40.1
>

Tested-by: Han Gao <rabenda.cn at gmail.com>



More information about the linux-riscv mailing list