[PATCH 4/8] x86: apic_64.c - add sanity check for spurious vector definition

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Cyrill Gorcunov
Date: Saturday, August 23, 2008 - 6:01 am

Do not check for SPUTIOUS_APIC_VECTOR definition twice.
Check it once - is what we need.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 arch/x86/kernel/apic_64.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index 03641d7..b220726 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -45,6 +45,13 @@
 #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;
@@ -929,8 +936,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.
-- 
1.6.0.6.gc667

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/8] tip/x86/apic - merging snippet, Cyrill Gorcunov, (Sat Aug 23, 6:01 am)
[PATCH 3/8] x86: apic - unify setup_apicpmtimer, Cyrill Gorcunov, (Sat Aug 23, 6:01 am)
[PATCH 4/8] x86: apic_64.c - add sanity check for spurious ..., Cyrill Gorcunov, (Sat Aug 23, 6:01 am)
[PATCH 5/8] x86: apic - unify hard_smp_processor_id, Cyrill Gorcunov, (Sat Aug 23, 6:01 am)
[PATCH 6/8] x86: apic - unify setup_local_APIC, Cyrill Gorcunov, (Sat Aug 23, 6:01 am)
[PATCH 7/8] x86: apic_32.c should use __cpuinit section, Cyrill Gorcunov, (Sat Aug 23, 6:01 am)
[PATCH 8/8] x86: apic - unify smp_apic_timer_interrupt, Cyrill Gorcunov, (Sat Aug 23, 6:01 am)
Re: [PATCH 5/8] x86: apic - unify hard_smp_processor_id, Cyrill Gorcunov, (Sat Aug 23, 12:45 pm)
Re: [PATCH 5/8] x86: apic - unify hard_smp_processor_id, Cyrill Gorcunov, (Sat Aug 23, 1:18 pm)