diff options
author | Shaohua Li <shaohua.li@intel.com> | 2005-10-30 17:59:28 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 20:37:11 -0500 |
commit | 08967f941ad897b2f7c2f99e886c75d6319e5087 (patch) | |
tree | 7277fe5fee546f5d94debfc479f81bdc4af895a4 /arch/i386 | |
parent | 8896fab35e62aa748a5ce62ac773508e51f10be1 (diff) |
[PATCH] FPU context corrupted after resume
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.
(akpm: my eyes. Fixed some surrounding whitespace mess)
Signed-off-by: Shaohua Li<shaohua.li@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/power/cpu.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/i386/power/cpu.c b/arch/i386/power/cpu.c index b27c5acc79d0..1f1572692e0b 100644 --- a/arch/i386/power/cpu.c +++ b/arch/i386/power/cpu.c | |||
@@ -51,16 +51,14 @@ void save_processor_state(void) | |||
51 | __save_processor_state(&saved_context); | 51 | __save_processor_state(&saved_context); |
52 | } | 52 | } |
53 | 53 | ||
54 | static void | 54 | static void do_fpu_end(void) |
55 | do_fpu_end(void) | ||
56 | { | 55 | { |
57 | /* restore FPU regs if necessary */ | 56 | /* |
58 | /* Do it out of line so that gcc does not move cr0 load to some stupid place */ | 57 | * Restore FPU regs if necessary. |
59 | kernel_fpu_end(); | 58 | */ |
60 | mxcsr_feature_mask_init(); | 59 | kernel_fpu_end(); |
61 | } | 60 | } |
62 | 61 | ||
63 | |||
64 | static void fix_processor_context(void) | 62 | static void fix_processor_context(void) |
65 | { | 63 | { |
66 | int cpu = smp_processor_id(); | 64 | int cpu = smp_processor_id(); |