summaryrefslogtreecommitdiff
path: root/arch/loongarch/include/asm/cpu-features.h
diff options
context:
space:
mode:
authorHuacai Chen <chenhuacai@loongson.cn>2023-04-18 14:38:58 +0300
committerHuacai Chen <chenhuacai@loongson.cn>2023-04-18 14:38:58 +0300
commitdf830336045db1246d3245d3737fee9939c5f731 (patch)
tree8a47ba8a0be9163c28452132e051ca380cda08b4 /arch/loongarch/include/asm/cpu-features.h
parent16c52e503043aed1e2a2ce38d9249de5936c1f6b (diff)
downloadlinux-df830336045db1246d3245d3737fee9939c5f731.tar.xz
LoongArch: Fix probing of the CRC32 feature
Not all LoongArch processors support CRC32 instructions. This feature is indicated by CPUCFG1.CRC32 (Bit25) but it is wrongly defined in the previous versions of the ISA manual (and so does in loongarch.h). The CRC32 feature is set unconditionally now, so fix it. BTW, expose the CRC32 feature in /proc/cpuinfo. Cc: stable@vger.kernel.org Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/include/asm/cpu-features.h')
-rw-r--r--arch/loongarch/include/asm/cpu-features.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/loongarch/include/asm/cpu-features.h b/arch/loongarch/include/asm/cpu-features.h
index b07974218393..f6177f133477 100644
--- a/arch/loongarch/include/asm/cpu-features.h
+++ b/arch/loongarch/include/asm/cpu-features.h
@@ -42,6 +42,7 @@
#define cpu_has_fpu cpu_opt(LOONGARCH_CPU_FPU)
#define cpu_has_lsx cpu_opt(LOONGARCH_CPU_LSX)
#define cpu_has_lasx cpu_opt(LOONGARCH_CPU_LASX)
+#define cpu_has_crc32 cpu_opt(LOONGARCH_CPU_CRC32)
#define cpu_has_complex cpu_opt(LOONGARCH_CPU_COMPLEX)
#define cpu_has_crypto cpu_opt(LOONGARCH_CPU_CRYPTO)
#define cpu_has_lvz cpu_opt(LOONGARCH_CPU_LVZ)