aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2008-08-24 05:01:42 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 10:53:00 -0400
commit80e5609cabd7e4321769701a70297f819a15b08d (patch)
tree15d345e7a4780154941a7e0282efcb9e7a0e084a /arch
parent920fa7a507c3b1004a9ebe07a2c9d38605b3406a (diff)
x86: apic_64.c - add sanity check for spurious vector definition
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/apic_64.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index ddc5b245faf2..4587e16f73ec 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -46,6 +46,13 @@
46#include <mach_ipi.h> 46#include <mach_ipi.h>
47#include <mach_apic.h> 47#include <mach_apic.h>
48 48
49/*
50 * Sanity check
51 */
52#if ((SPURIOUS_APIC_VECTOR & 0x0F) != 0x0F)
53# error SPURIOUS_APIC_VECTOR definition error
54#endif
55
49/* Disable local APIC timer from the kernel commandline or via dmi quirk */ 56/* Disable local APIC timer from the kernel commandline or via dmi quirk */
50static int disable_apic_timer __cpuinitdata; 57static int disable_apic_timer __cpuinitdata;
51static int apic_calibrate_pmtmr __initdata; 58static int apic_calibrate_pmtmr __initdata;
@@ -939,8 +946,6 @@ void __cpuinit setup_local_APIC(void)
939 preempt_disable(); 946 preempt_disable();
940 value = apic_read(APIC_LVR); 947 value = apic_read(APIC_LVR);
941 948
942 BUILD_BUG_ON((SPURIOUS_APIC_VECTOR & 0x0f) != 0x0f);
943
944 /* 949 /*
945 * Double-check whether this APIC is really registered. 950 * Double-check whether this APIC is really registered.
946 * This is meaningless in clustered apic mode, so we skip it. 951 * This is meaningless in clustered apic mode, so we skip it.