From: Shaohua Li <shaohua.li@intel.com>
To: lkml <linux-kernel@vger.kernel.org>
Cc: akpm <akpm@osdl.org>, Pavel Machek <pavel@ucw.cz>
Subject: [PATCH]FPU context corrupted after resume
Date: Thu, 15 Sep 2005 10:44:18 +0800 [thread overview]
Message-ID: <1126752258.11133.4.camel@linux-hp.sh.intel.com> (raw)
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.
Signed-off-by: Shaohua Li<shaohua.li@intel.com>
---
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(-)
diff -puN arch/i386/power/cpu.c~fpu_reinit_after_resume arch/i386/power/cpu.c
--- linux-2.6.13/arch/i386/power/cpu.c~fpu_reinit_after_resume 2005-09-14 09:35:13.000000000 +0800
+++ linux-2.6.13-root/arch/i386/power/cpu.c 2005-09-14 11:00:55.000000000 +0800
@@ -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();
}
diff -puN arch/x86_64/kernel/suspend.c~fpu_reinit_after_resume arch/x86_64/kernel/suspend.c
--- linux-2.6.13/arch/x86_64/kernel/suspend.c~fpu_reinit_after_resume 2005-09-14 11:02:21.000000000 +0800
+++ linux-2.6.13-root/arch/x86_64/kernel/suspend.c 2005-09-14 11:02:41.000000000 +0800
@@ -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)
_
reply other threads:[~2005-09-15 2:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1126752258.11133.4.camel@linux-hp.sh.intel.com \
--to=shaohua.li@intel.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.