]> Gentwo Git Trees - linux/.git/commit
LoongArch: Rework CPU feature probe from CPUCFG/IOCSR
authorJiaxun Yang <jiaxun.yang@flygoat.com>
Tue, 24 Sep 2024 07:32:20 +0000 (15:32 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Tue, 24 Sep 2024 07:32:20 +0000 (15:32 +0800)
commit34e3c4500cdc06094b37a41b622598098308ba8f
tree8e4f982087039a3a5d0d1ddde08c008c531bd98d
parentd0bb0b600081bc7c246b97b2901abbb6c357ff7b
LoongArch: Rework CPU feature probe from CPUCFG/IOCSR

Probe ISA level, TLB, IOCSR information from CPUCFG to improve kernel
resilience to different core implementations.

BTW, IOCSR register definition appears to be a platform-specific spec
instead of an architecture spec, even for the Loongson CPUs there is no
guarantee that IOCSR will always present.

Thus it's dangerous to perform IOCSR probing without checking CPU type
and instruction availability.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/include/asm/cpu-features.h
arch/loongarch/include/asm/cpu.h
arch/loongarch/include/asm/loongarch.h
arch/loongarch/include/uapi/asm/hwcap.h
arch/loongarch/kernel/cpu-probe.c
arch/loongarch/kernel/proc.c