]> git.baikalelectronics.ru Git - kernel.git/commit
LoongArch: Fix wrong fpu version
authorTiezhu Yang <yangtiezhu@loongson.cn>
Sat, 18 Jun 2022 04:50:31 +0000 (12:50 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Sat, 25 Jun 2022 10:05:59 +0000 (18:05 +0800)
commitb24f5c832f46ea1559a0cc65333ecbae14ab20cf
tree3c5b9264efc55a4f3e08ce8dd07d19ce27e06c1d
parent3a074495e8417190f412b2e2a4798590da1b8e99
LoongArch: Fix wrong fpu version

According to the configuration information accessible by the CPUCFG
instruction in LoongArch Reference Manual [1], FP_ver is stored in
bit [5: 3] of CPUCFG2, the current code to get fpu version is wrong,
use CPUCFG2_FPVERS to fix it.

[1] https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html

Fixes: c647555eaaed ("LoongArch: Add boot and setup routines")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/kernel/cpu-probe.c