aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kernel/cpu
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-09-05 09:18:39 +0200
committerIngo Molnar <mingo@elte.hu>2008-09-05 09:18:39 +0200
commitaccf0fa697eeb5ff4c2360edc4da5b10abac0b7b (patch)
treea57dc9aa4a6b83be8ac8b4528cf06db5621e62aa /arch/x86/kernel/cpu
parentebd60cd64f8ab1170102c3ab072eb73042b7a33d (diff)
parentfe47784ba5cbb6b713c013e046859946789b45e4 (diff)
Merge branch 'x86/xsave' into x86/core
Diffstat (limited to 'arch/x86/kernel/cpu')
-rw-r--r--arch/x86/kernel/cpu/common.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 0785b3c8d04..c63ec65f484 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -739,9 +739,20 @@ void __cpuinit cpu_init(void)
/*
* Force FPU initialization:
*/
- current_thread_info()->status = 0;
+ if (cpu_has_xsave)
+ current_thread_info()->status = TS_XSAVE;
+ else
+ current_thread_info()->status = 0;
clear_used_math();
mxcsr_feature_mask_init();
+
+ /*
+ * Boot processor to setup the FP and extended state context info.
+ */
+ if (!smp_processor_id())
+ init_thread_xstate();
+
+ xsave_init();
}
#ifdef CONFIG_HOTPLUG_CPU