aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-02-06 16:39:44 -0500
committerIngo Molnar <mingo@elte.hu>2008-02-06 16:39:44 -0500
commitdeef79ef351225a9fe02e41a40cb125ed03a3e6b (patch)
tree3d9e555b8a1d636163def11675168bebac8a59bc /arch/x86
parent4a5a77d106d6b43183662d4ad37a613bbaa9b829 (diff)
x86: fix sparse error in traps_32.c
This was being used to ensure the proper alignment of the FXSAVE/FXRSTOR data. This would create a sparse error in the _correct_ cases, hiding further warnings. Use BUILD_BUG_ON instead. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/traps_32.c15
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");