diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-06 19:25:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-06 19:25:13 -0400 |
commit | 4a386c3e177ca2fbc70c9283d0b46537844763a0 (patch) | |
tree | 7f3a6a6a984a988e8a6e908d93dcd57d92a82efd /arch/x86/kernel/cpu/common.c | |
parent | e8779776afbd5f2d5315cf48c4257ca7e9b250fb (diff) | |
parent | 1cff92d8fdb27684308864d9cdb324bee43b40ab (diff) |
Merge branch 'x86-xsave-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-xsave-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86, xsave: Make xstate_enable_boot_cpu() __init, protect on CPU 0
x86, xsave: Add __init attribute to setup_xstate_features()
x86, xsave: Make init_xstate_buf static
x86, xsave: Check cpuid level for XSTATE_CPUID (0x0d)
x86, xsave: Introduce xstate enable functions
x86, xsave: Separate fpu and xsave initialization
x86, xsave: Move boot cpu initialization to xsave_init()
x86, xsave: 32/64 bit boot cpu check unification in initialization
x86, xsave: Do not include asm/i387.h in asm/xsave.h
x86, xsave: Use xsaveopt in context-switch path when supported
x86, xsave: Sync xsave memory layout with its header for user handling
x86, xsave: Track the offset, size of state in the xsave layout
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 |