]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: apic_64.c - add sanity check for spurious vector definition
authorCyrill Gorcunov <gorcunov@gmail.com>
Sun, 24 Aug 2008 09:01:42 +0000 (02:01 -0700)
committerIngo Molnar <mingo@elte.hu>
Thu, 16 Oct 2008 14:53:00 +0000 (16:53 +0200)
Do not check for SPUTIOUS_APIC_VECTOR definition twice.
Check it once - is what we need.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/apic_64.c

index ddc5b245faf22be7cccb05b93ee6cf2a0c110ee6..4587e16f73ecf7c677e8e4aea8bec8f89e9ff3e3 100644 (file)
 #include <mach_ipi.h>
 #include <mach_apic.h>
 
+/*
+ * Sanity check
+ */
+#if ((SPURIOUS_APIC_VECTOR & 0x0F) != 0x0F)
+# error SPURIOUS_APIC_VECTOR definition error
+#endif
+
 /* Disable local APIC timer from the kernel commandline or via dmi quirk */
 static int disable_apic_timer __cpuinitdata;
 static int apic_calibrate_pmtmr __initdata;
@@ -939,8 +946,6 @@ void __cpuinit setup_local_APIC(void)
        preempt_disable();
        value = apic_read(APIC_LVR);
 
-       BUILD_BUG_ON((SPURIOUS_APIC_VECTOR & 0x0f) != 0x0f);
-
        /*
         * Double-check whether this APIC is really registered.
         * This is meaningless in clustered apic mode, so we skip it.