From: Suresh Siddha <suresh.b.siddha@intel.com>
To: hpa@zytor.com, mingo@kernel.org, torvalds@linux-foundation.org,
andreas.herrmann3@amd.com, bp@amd64.org, robert.richter@amd.com
Cc: linux-kernel@vger.kernel.org, Suresh Siddha <suresh.b.siddha@intel.com>
Subject: [PATCH 3/3] x86, fpu: move check_fpu() after alternative_instructions()
Date: Fri, 7 Sep 2012 11:31:43 -0700 [thread overview]
Message-ID: <1347042703-11128-3-git-send-email-suresh.b.siddha@intel.com> (raw)
In-Reply-To: <1347042703-11128-1-git-send-email-suresh.b.siddha@intel.com>
use_eager_fpu() in kernel_fpu_begin/end() relies on the patched
alternative instructions. So move check_fpu() which uses the
kernel_fpu_begin/end() after alternative_instructions().
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
---
arch/x86/kernel/cpu/bugs.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index c97bb7b..d0e910d 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -165,10 +165,15 @@ void __init check_bugs(void)
print_cpu_info(&boot_cpu_data);
#endif
check_config();
- check_fpu();
check_hlt();
check_popad();
init_utsname()->machine[1] =
'0' + (boot_cpu_data.x86 > 6 ? 6 : boot_cpu_data.x86);
alternative_instructions();
+
+ /*
+ * kernel_fpu_begin/end() in check_fpu() relies on the patched
+ * alternative instructions.
+ */
+ check_fpu();
}
--
1.7.6.5
next prev parent reply other threads:[~2012-09-07 18:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-07 18:31 [PATCH 1/3] x86, fpu: decouple non-lazy/eager fpu restore from xsave Suresh Siddha
2012-09-07 18:31 ` [PATCH 2/3] x86, fpu: enable eagerfpu by default for xsaveopt Suresh Siddha
2012-09-07 18:43 ` H. Peter Anvin
2012-09-07 19:20 ` Suresh Siddha
2012-09-07 18:31 ` Suresh Siddha [this message]
2012-09-07 18:47 ` [PATCH 1/3] x86, fpu: decouple non-lazy/eager fpu restore from xsave H. Peter Anvin
2012-09-07 19:12 ` Suresh Siddha
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=1347042703-11128-3-git-send-email-suresh.b.siddha@intel.com \
--to=suresh.b.siddha@intel.com \
--cc=andreas.herrmann3@amd.com \
--cc=bp@amd64.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=robert.richter@amd.com \
--cc=torvalds@linux-foundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).