Simplify the way we track the FPU state, using powerpc64 as a model.
authorkettenis <kettenis@openbsd.org>
Wed, 30 Jun 2021 22:20:56 +0000 (22:20 +0000)
committerkettenis <kettenis@openbsd.org>
Wed, 30 Jun 2021 22:20:56 +0000 (22:20 +0000)
commitf2269f651e776f446d799063d003a395850ff3c3
treeab664d56e2e34faafb8040349e12e28e34b04cf3
parent998a0ad92b910ffb9b7d77114cfc9f1cb8fa0fd7
Simplify the way we track the FPU state, using powerpc64 as a model.
The new code still uses the clean/dirty state that the hardware reports
to optimize saving/restoring the FPU register, but no longer attempts to
keep the FPU registers alive across a context switch.  Fixes panics seen
on MP kernels.

ok drahn@
sys/arch/riscv64/include/cpu.h
sys/arch/riscv64/include/pcb.h
sys/arch/riscv64/riscv64/fpu.c
sys/arch/riscv64/riscv64/genassym.cf
sys/arch/riscv64/riscv64/machdep.c
sys/arch/riscv64/riscv64/sig_machdep.c
sys/arch/riscv64/riscv64/vm_machdep.c