diff --git a/kernel/arch/i386/exception.c b/kernel/arch/i386/exception.c index 86eb54101..7b3e1e378 100644 --- a/kernel/arch/i386/exception.c +++ b/kernel/arch/i386/exception.c @@ -285,7 +285,9 @@ PUBLIC void proc_stacktrace(struct proc *whichproc) PUBLIC void enable_fpu_exception(void) { - write_cr0(read_cr0() | I386_CR0_TS); + u32_t cr0 = read_cr0(); + if(!(cr0 & I386_CR0_TS)) + write_cr0(cr0 | I386_CR0_TS); } PUBLIC void disable_fpu_exception(void)