Commit 4fc20d0
riscv: fpu: refine FPU save flow (torvalds#207)
When Kernel first time run to arch_dup_task_struct(),
it will check if sstatus.FS is dirty. If it is dirty,
then it will do FPU save flow. But this field is
floating currently. Meanwhile if the combination between
platform(HW) and Kernel(SW) about FPU configuration
is mismatch. eq: The platform is without FPU and Kernel
is with FPU. Then Kernel may trigger illegal instruction
here.
Hence it shall check by has_fpu before do FPU save flow
in arch_dup_task_struct().
Signed-off-by: Rick Chen <rick@andestech.com>
Co-authored-by: Rick Chen <rick@andestech.com>
Reviewed-on: https://gitea.andestech.com/RD-SW/linux/pulls/207
Reviewed-by: Ben Zong-You Xie <ben717@andestech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>1 parent 1bfdc14 commit 4fc20d0
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| |||
0 commit comments