Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177357533
D53804.1794188888.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
693 B
Referenced Files
None
Subscribers
None
D53804.1794188888.diff
View Options
diff --git a/sys/riscv/riscv/vm_machdep.c b/sys/riscv/riscv/vm_machdep.c
--- a/sys/riscv/riscv/vm_machdep.c
+++ b/sys/riscv/riscv/vm_machdep.c
@@ -48,6 +48,7 @@
#include <machine/riscvreg.h>
#include <machine/cpu.h>
+#include <machine/fpe.h>
#include <machine/cpufunc.h>
#include <machine/pcb.h>
#include <machine/frame.h>
@@ -91,7 +92,13 @@
if ((flags & RFPROC) == 0)
return;
- /* RISCVTODO: save the FPU state here */
+ /* Ensure the floating-point state is saved before copying the pcb. */
+ if ((td1->td_pcb->pcb_fpflags & PCB_FP_STARTED) != 0) {
+ MPASS(td1 == curthread);
+ critical_enter();
+ fpe_state_save(td1);
+ critical_exit();
+ }
cpu_set_pcb_frame(td2);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 9, 1:48 AM (6 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41602900
Default Alt Text
D53804.1794188888.diff (693 B)
Attached To
Mode
D53804: riscv cpu_fork(), saving fpe state
Attached
Detach File
Event Timeline