diff options
Diffstat (limited to 'arch/x86/kernel/cpu/common.c')
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index f10273138382..490dac63c2d2 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -140,10 +140,18 @@ EXPORT_PER_CPU_SYMBOL_GPL(gdt_page); | |||
140 | static int __init x86_xsave_setup(char *s) | 140 | static int __init x86_xsave_setup(char *s) |
141 | { | 141 | { |
142 | setup_clear_cpu_cap(X86_FEATURE_XSAVE); | 142 | setup_clear_cpu_cap(X86_FEATURE_XSAVE); |
143 | setup_clear_cpu_cap(X86_FEATURE_XSAVEOPT); | ||
143 | return 1; | 144 | return 1; |
144 | } | 145 | } |
145 | __setup("noxsave", x86_xsave_setup); | 146 | __setup("noxsave", x86_xsave_setup); |
146 | 147 | ||
148 | static int __init x86_xsaveopt_setup(char *s) | ||
149 | { | ||
150 | setup_clear_cpu_cap(X86_FEATURE_XSAVEOPT); | ||
151 | return 1; | ||
152 | } | ||
153 | __setup("noxsaveopt", x86_xsaveopt_setup); | ||
154 | |||
147 | #ifdef CONFIG_X86_32 | 155 | #ifdef CONFIG_X86_32 |
148 | static int cachesize_override __cpuinitdata = -1; | 156 | static int cachesize_override __cpuinitdata = -1; |
149 | static int disable_x86_serial_nr __cpuinitdata = 1; | 157 | static int disable_x86_serial_nr __cpuinitdata = 1; |
@@ -1202,6 +1210,7 @@ void __cpuinit cpu_init(void) | |||
1202 | dbg_restore_debug_regs(); | 1210 | dbg_restore_debug_regs(); |
1203 | 1211 | ||
1204 | fpu_init(); | 1212 | fpu_init(); |
1213 | xsave_init(); | ||
1205 | 1214 | ||
1206 | raw_local_save_flags(kernel_eflags); | 1215 | raw_local_save_flags(kernel_eflags); |
1207 | 1216 | ||
@@ -1262,12 +1271,7 @@ void __cpuinit cpu_init(void) | |||
1262 | clear_used_math(); | 1271 | clear_used_math(); |
1263 | mxcsr_feature_mask_init(); | 1272 | mxcsr_feature_mask_init(); |
1264 | 1273 | ||
1265 | /* | 1274 | fpu_init(); |
1266 | * Boot processor to setup the FP and extended state context info. | ||
1267 | */ | ||
1268 | if (smp_processor_id() == boot_cpu_id) | ||
1269 | init_thread_xstate(); | ||
1270 | |||
1271 | xsave_init(); | 1275 | xsave_init(); |
1272 | } | 1276 | } |
1273 | #endif | 1277 | #endif |