Skip to contentSkip to conversation

FPU context corrupted after resume

PATCH New Shaohua Li 1 participant 1 message Sep 15, 2005

lore
Share & tools
lore

Shaohua Li

author
#0 lore raw

PATCH 1/1 FPU context corrupted after resume

Hi,
mxcsr_feature_mask_init isn't needed in suspend/resume time (we can use boot time mask). And actually it's harmful, as it clear task's saved fxsave in resume. This bug is widely seen by users using zsh.

---

 linux-2.6.13-root/arch/i386/power/cpu.c        |    1 -
 linux-2.6.13-root/arch/x86_64/kernel/suspend.c |    1 -
 2 files changed, 2 deletions(-)
arch/i386/power/cpu.c renamed from arch/i386/power/cpu.c~fpu_reinit_after_resume +0 -1
diff -puN arch/i386/power/cpu.c~fpu_reinit_after_resume arch/i386/power/cpu.c
@@ -74,7 +74,6 @@ do_fpu_end(void)
         /* restore FPU regs if necessary */
 	/* Do it out of line so that gcc does not move cr0 load to some stupid place */
         kernel_fpu_end();
-	mxcsr_feature_mask_init();
 }
 
 
arch/x86_64/kernel/suspend.c renamed from arch/x86_64/kernel/suspend.c~fpu_reinit_after_resume +0 -1
diff -puN arch/x86_64/kernel/suspend.c~fpu_reinit_after_resume arch/x86_64/kernel/suspend.c
@@ -82,7 +82,6 @@ do_fpu_end(void)
         /* restore FPU regs if necessary */
 	/* Do it out of line so that gcc does not move cr0 load to some stupid place */
         kernel_fpu_end();
-	mxcsr_feature_mask_init();
 }
 
 void __restore_processor_state(struct saved_context *ctxt)

_