aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Molnar2015-04-23 11:26:08 +0200
committerIngo Molnar2015-05-19 15:47:22 +0200
commit9a89b02918c03d91e685d06e49a652da5f35befc (patch)
treebf9aa672b04158abd0f37e1d2486bfcb9479831a
parentbfd6fc0581e7e2f3fa0b3e5e21cd6e54c3fbd16f (diff)
x86/fpu: Print out whether we are doing lazy/eager FPU context switches
Ever since the kernel started defaulting to eager FPU switches on modern Intel CPUs it's not been obvious whether a given system is using the lazy or the eager FPU context switching logic. So generate a boot message about which mode the FPU code is in: x86/fpu: Using 'lazy' FPU context switches. or: x86/fpu: Using 'eager' FPU context switches. Reviewed-by: Borislav Petkov <bp@alien8.de> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--arch/x86/kernel/fpu/xsave.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kernel/fpu/xsave.c b/arch/x86/kernel/fpu/xsave.c
index a52205b87acb..61696c5005eb 100644
--- a/arch/x86/kernel/fpu/xsave.c
+++ b/arch/x86/kernel/fpu/xsave.c
@@ -691,6 +691,8 @@ void __init_refok eager_fpu_init(void)
if (eagerfpu == ENABLE)
setup_force_cpu_cap(X86_FEATURE_EAGER_FPU);
+ printk_once(KERN_INFO "x86/fpu: Using '%s' FPU context switches.\n", eagerfpu == ENABLE ? "eager" : "lazy");
+
if (!cpu_has_eager_fpu) {
stts();
return;