diff options
-rw-r--r-- | arch/x86/kernel/traps_32.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c index 3cf72977d012..b22c01e05a18 100644 --- a/arch/x86/kernel/traps_32.c +++ b/arch/x86/kernel/traps_32.c | |||
@@ -1176,17 +1176,12 @@ void __init trap_init(void) | |||
1176 | #endif | 1176 | #endif |
1177 | set_trap_gate(19,&simd_coprocessor_error); | 1177 | set_trap_gate(19,&simd_coprocessor_error); |
1178 | 1178 | ||
1179 | /* | ||
1180 | * Verify that the FXSAVE/FXRSTOR data will be 16-byte aligned. | ||
1181 | * Generate a build-time error if the alignment is wrong. | ||
1182 | */ | ||
1183 | BUILD_BUG_ON(offsetof(struct task_struct, thread.i387.fxsave) & 15); | ||
1179 | if (cpu_has_fxsr) { | 1184 | if (cpu_has_fxsr) { |
1180 | /* | ||
1181 | * Verify that the FXSAVE/FXRSTOR data will be 16-byte aligned. | ||
1182 | * Generates a compile-time "error: zero width for bit-field" if | ||
1183 | * the alignment is wrong. | ||
1184 | */ | ||
1185 | struct fxsrAlignAssert { | ||
1186 | int _:!(offsetof(struct task_struct, | ||
1187 | thread.i387.fxsave) & 15); | ||
1188 | }; | ||
1189 | |||
1190 | printk(KERN_INFO "Enabling fast FPU save and restore... "); | 1185 | printk(KERN_INFO "Enabling fast FPU save and restore... "); |
1191 | set_in_cr4(X86_CR4_OSFXSR); | 1186 | set_in_cr4(X86_CR4_OSFXSR); |
1192 | printk("done.\n"); | 1187 | printk("done.\n"); |