Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145459104
D26017.id75775.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1018 B
Referenced Files
None
Subscribers
None
D26017.id75775.diff
View Options
Index: sys/riscv/riscv/trap.c
===================================================================
--- sys/riscv/riscv/trap.c
+++ sys/riscv/riscv/trap.c
@@ -198,14 +198,22 @@
"Kernel page fault") != 0)
goto fatal;
- if (usermode)
- map = &td->td_proc->p_vmspace->vm_map;
- else if (stval >= VM_MAX_USER_ADDRESS)
- map = kernel_map;
- else {
- if (pcb->pcb_onfault == 0)
- goto fatal;
+ if (usermode) {
map = &td->td_proc->p_vmspace->vm_map;
+ } else {
+ /*
+ * Enable interrupts for the duration of the page fault. For
+ * user faults this was done already in do_trap_user().
+ */
+ intr_enable();
+
+ if (stval >= VM_MAX_USER_ADDRESS) {
+ map = kernel_map;
+ } else {
+ if (pcb->pcb_onfault == 0)
+ goto fatal;
+ map = &td->td_proc->p_vmspace->vm_map;
+ }
}
va = trunc_page(stval);
@@ -324,6 +332,7 @@
riscv_cpu_intr(frame);
return;
}
+ intr_enable();
CTR3(KTR_TRAP, "do_trap_user: curthread: %p, sepc: %lx, frame: %p",
curthread, frame->tf_sepc, frame);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Feb 21, 4:28 AM (5 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28909294
Default Alt Text
D26017.id75775.diff (1018 B)
Attached To
Mode
D26017: Enable interrupts while handling traps
Attached
Detach File
Event Timeline
Log In to Comment