riscv: errata: Rename defines for Andes
PATCH v2 1/10 riscv: errata: Rename defines for Andes
Using "ANDES" rather than "ANDESTECH" to unify the naming convention with OpenSBI and U-Boot, and reduce the number of characters per line.
Signed-off-by Yu Chien Peter Lin <[email protected]>
Reviewed-by Charles Ci-Jyun Wu <[email protected]>
Reviewed-by Leo Yu-Chi Liang <[email protected]>
---
Changes v1 -> v2:
- No change
--- arch/riscv/errata/andes/errata.c | 10 +++++----- arch/riscv/include/asm/errata_list.h | 4 ++-- arch/riscv/include/asm/vendorid_list.h | 2 +- arch/riscv/kernel/alternative.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-)
arch/riscv/errata/andes/errata.c +5 -5
@@ -18,9 +18,9 @@#include <asm/sbi.h> #include <asm/vendorid_list.h> -#define ANDESTECH_AX45MP_MARCHID 0x8000000000008a45UL -#define ANDESTECH_AX45MP_MIMPID 0x500UL -#define ANDESTECH_SBI_EXT_ANDES 0x0900031E +#define ANDES_AX45MP_MARCHID 0x8000000000008a45UL +#define ANDES_AX45MP_MIMPID 0x500UL +#define ANDES_SBI_EXT_ANDES 0x0900031E#define ANDES_SBI_EXT_IOCP_SW_WORKAROUND 1
@@ -32,7 +32,7 @@ static long ax45mp_iocp_sw_workaround(void)* ANDES_SBI_EXT_IOCP_SW_WORKAROUND SBI EXT checks if the IOCP is missing and * cache is controllable only then CMO will be applied to the platform. */ - ret =sbi_ecall (ANDESTECH_SBI_EXT_ANDES ,ANDES_SBI_EXT_IOCP_SW_WORKAROUND , + ret =sbi_ecall (ANDES_SBI_EXT_ANDES ,ANDES_SBI_EXT_IOCP_SW_WORKAROUND ,0 ,0 ,0 ,0 ,0 ,0 );return ret.error ?0 : ret.value;
@@ -43,7 +43,7 @@ static bool errata_probe_iocp(unsigned int stage, unsigned long arch_id, unsigneif (!IS_ENABLED (CONFIG_ERRATA_ANDES_CMO ))return false; -if (arch_id !=ANDESTECH_AX45MP_MARCHID || impid !=ANDESTECH_AX45MP_MIMPID ) +if (arch_id !=ANDES_AX45MP_MARCHID || impid !=ANDES_AX45MP_MIMPID )return false;if (!ax45mp_iocp_sw_workaround ())
arch/riscv/include/asm/errata_list.h +2 -2
@@ -12,8 +12,8 @@#include <asm/vendorid_list.h> #ifdef CONFIG_ERRATA_ANDES -#define ERRATA_ANDESTECH_NO_IOCP 0 -#define ERRATA_ANDESTECH_NUMBER 1 +#define ERRATA_ANDES_NO_IOCP 0 +#define ERRATA_ANDES_NUMBER 1#endif #ifdef CONFIG_ERRATA_SIFIVE
arch/riscv/include/asm/vendorid_list.h +1 -1
@@ -5,7 +5,7 @@#ifndef ASM_VENDOR_LIST_H #define ASM_VENDOR_LIST_H -#define ANDESTECH_VENDOR_ID 0x31e +#define ANDES_VENDOR_ID 0x31e#define SIFIVE_VENDOR_ID 0x489#define THEAD_VENDOR_ID 0x5b7
arch/riscv/kernel/alternative.c +1 -1
@@ -43,7 +43,7 @@ static void riscv_fill_cpu_mfr_info(struct cpu_manufacturer_info_t *cpu_mfr_infoswitch (cpu_mfr_info->vendor_id) {#ifdef CONFIG_ERRATA_ANDES -case ANDESTECH_VENDOR_ID : +case ANDES_VENDOR_ID : cpu_mfr_info->patch_func = andes_errata_patch_func;break ;#endif
Signature · 1 line
2.34.1
Quoted 3 lines · Yu Chien Peter Lin
Using "ANDES" rather than "ANDESTECH" to unify the naming convention with OpenSBI and U-Boot, and reduce the number of characters per line.
NGL, I think this is just churn and the 4-characters-per-line saving is a weak argument & u-boot/opensbi alignment is not really relevant. A better argument for it is probably unification with the directory/file names, Kconfig options and with the ANDES_SBI_EXT_OPCP_SW_WORKAROUND definitions.
/shrug,
Conor.
Quoted 98 lines
Signed-off-by Yu Chien Peter Lin <[email protected]>Reviewed-by Charles Ci-Jyun Wu <[email protected]>Reviewed-by Leo Yu-Chi Liang <[email protected]>---
Changes v1 -> v2:
- No change--- arch/riscv/errata/andes/errata.c | 10 +++++----- arch/riscv/include/asm/errata_list.h | 4 ++-- arch/riscv/include/asm/vendorid_list.h | 2 +- arch/riscv/kernel/alternative.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-)arch/riscv/errata/andes/errata.c +5
-5@@ -18,9 +18,9 @@#include <asm/sbi.h> #include <asm/vendorid_list.h> -#define ANDESTECH_AX45MP_MARCHID 0x8000000000008a45UL -#define ANDESTECH_AX45MP_MIMPID 0x500UL -#define ANDESTECH_SBI_EXT_ANDES 0x0900031E +#define ANDES_AX45MP_MARCHID 0x8000000000008a45UL +#define ANDES_AX45MP_MIMPID 0x500UL +#define ANDES_SBI_EXT_ANDES 0x0900031E#define ANDES_SBI_EXT_IOCP_SW_WORKAROUND 1@@ -32,7 +32,7 @@ static long ax45mp_iocp_sw_workaround(void)* ANDES_SBI_EXT_IOCP_SW_WORKAROUND SBI EXT checks if the IOCP is missing and * cache is controllable only then CMO will be applied to the platform. */ - ret =sbi_ecall (ANDESTECH_SBI_EXT_ANDES ,ANDES_SBI_EXT_IOCP_SW_WORKAROUND , + ret =sbi_ecall (ANDES_SBI_EXT_ANDES ,ANDES_SBI_EXT_IOCP_SW_WORKAROUND ,0 ,0 ,0 ,0 ,0 ,0 );return ret.error ?0 : ret.value;@@ -43,7 +43,7 @@ static bool errata_probe_iocp(unsigned int stage, unsigned long arch_id, unsigneif (!IS_ENABLED (CONFIG_ERRATA_ANDES_CMO ))return false; -if (arch_id !=ANDESTECH_AX45MP_MARCHID || impid !=ANDESTECH_AX45MP_MIMPID ) +if (arch_id !=ANDES_AX45MP_MARCHID || impid !=ANDES_AX45MP_MIMPID )return false;if (!ax45mp_iocp_sw_workaround ())arch/riscv/include/asm/errata_list.h +2
-2@@ -12,8 +12,8 @@#include <asm/vendorid_list.h> #ifdef CONFIG_ERRATA_ANDES -#define ERRATA_ANDESTECH_NO_IOCP 0 -#define ERRATA_ANDESTECH_NUMBER 1 +#define ERRATA_ANDES_NO_IOCP 0 +#define ERRATA_ANDES_NUMBER 1#endif #ifdef CONFIG_ERRATA_SIFIVE arch/riscv/include/asm/vendorid_list.h +1
-1@@ -5,7 +5,7 @@#ifndef ASM_VENDOR_LIST_H #define ASM_VENDOR_LIST_H -#define ANDESTECH_VENDOR_ID 0x31e +#define ANDES_VENDOR_ID 0x31e#define SIFIVE_VENDOR_ID 0x489#define THEAD_VENDOR_ID 0x5b7arch/riscv/kernel/alternative.c +1
-1@@ -43,7 +43,7 @@ static void riscv_fill_cpu_mfr_info(struct cpu_manufacturer_info_t *cpu_mfr_infoswitch (cpu_mfr_info->vendor_id) {#ifdef CONFIG_ERRATA_ANDES -case ANDESTECH_VENDOR_ID : +case ANDES_VENDOR_ID : cpu_mfr_info->patch_func = andes_errata_patch_func;break ;#endif Signature · 7 lines
2.34.1 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv