automerging branch "github.com-riscv/fix-sum_traps" into "riscv-all"

This commit is contained in:
Palmer Dabbelt committed 2018-01-07 15:13:02 -08:00
commit 51dfd69485
1 file changed
+6 -3
+6 -3
View File
@@ -78,10 +78,13 @@ _save_context:
REG_S x31, PT_T6(sp)
/*
* Disable FPU to detect illegal usage of
* floating point in kernel space
* Disable user-mode memory access as it should only be set in the
* actual user copy routines.
*
* Disable the FPU to detect illegal usage of floating point in kernel
* space.
*/
li t0, SR_FS
li t0, SR_SUM | SR_FS
REG_L s0, TASK_TI_USER_SP(tp)
csrrc s1, sstatus, t0