aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPekka Enberg <penberg@cs.helsinki.fi>2009-04-09 04:52:27 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-10 08:35:57 -0400
commitab19c25abd14db28d7454f00805ea59f22ed6057 (patch)
treec6cea8626268f2e861d52281857ac9e886d22f70
parent778838600eb6973bdb6fd11e7f91b43cea4d6f45 (diff)
x86: unify apic_intr_init() in irqinit_{32,64}.c
Impact: cleanup Reviewed-by Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/kernel/irqinit_32.c9
-rw-r--r--arch/x86/kernel/irqinit_64.c11
2 files changed, 19 insertions, 1 deletions
diff --git a/arch/x86/kernel/irqinit_32.c b/arch/x86/kernel/irqinit_32.c
index 72ce94268d31..f3be5e974275 100644
--- a/arch/x86/kernel/irqinit_32.c
+++ b/arch/x86/kernel/irqinit_32.c
@@ -180,7 +180,12 @@ static void __init apic_intr_init(void)
180{ 180{
181 smp_intr_init(); 181 smp_intr_init();
182 182
183#ifdef CONFIG_X86_LOCAL_APIC 183#ifdef CONFIG_X86_64
184 alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt);
185 alloc_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt);
186#endif
187
188#if defined(CONFIG_X86_64) || defined(CONFIG_X86_LOCAL_APIC)
184 /* self generated IPI for local APIC timer */ 189 /* self generated IPI for local APIC timer */
185 alloc_intr_gate(LOCAL_TIMER_VECTOR, apic_timer_interrupt); 190 alloc_intr_gate(LOCAL_TIMER_VECTOR, apic_timer_interrupt);
186 191
@@ -192,10 +197,12 @@ static void __init apic_intr_init(void)
192 alloc_intr_gate(ERROR_APIC_VECTOR, error_interrupt); 197 alloc_intr_gate(ERROR_APIC_VECTOR, error_interrupt);
193#endif 198#endif
194 199
200#ifdef CONFIG_X86_32
195#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_MCE_P4THERMAL) 201#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_MCE_P4THERMAL)
196 /* thermal monitor LVT interrupt */ 202 /* thermal monitor LVT interrupt */
197 alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt); 203 alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt);
198#endif 204#endif
205#endif
199} 206}
200 207
201#ifdef CONFIG_X86_32 208#ifdef CONFIG_X86_32
diff --git a/arch/x86/kernel/irqinit_64.c b/arch/x86/kernel/irqinit_64.c
index 687b6c33cd75..f3be5e974275 100644
--- a/arch/x86/kernel/irqinit_64.c
+++ b/arch/x86/kernel/irqinit_64.c
@@ -180,9 +180,12 @@ static void __init apic_intr_init(void)
180{ 180{
181 smp_intr_init(); 181 smp_intr_init();
182 182
183#ifdef CONFIG_X86_64
183 alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt); 184 alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt);
184 alloc_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt); 185 alloc_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt);
186#endif
185 187
188#if defined(CONFIG_X86_64) || defined(CONFIG_X86_LOCAL_APIC)
186 /* self generated IPI for local APIC timer */ 189 /* self generated IPI for local APIC timer */
187 alloc_intr_gate(LOCAL_TIMER_VECTOR, apic_timer_interrupt); 190 alloc_intr_gate(LOCAL_TIMER_VECTOR, apic_timer_interrupt);
188 191
@@ -192,6 +195,14 @@ static void __init apic_intr_init(void)
192 /* IPI vectors for APIC spurious and error interrupts */ 195 /* IPI vectors for APIC spurious and error interrupts */
193 alloc_intr_gate(SPURIOUS_APIC_VECTOR, spurious_interrupt); 196 alloc_intr_gate(SPURIOUS_APIC_VECTOR, spurious_interrupt);
194 alloc_intr_gate(ERROR_APIC_VECTOR, error_interrupt); 197 alloc_intr_gate(ERROR_APIC_VECTOR, error_interrupt);
198#endif
199
200#ifdef CONFIG_X86_32
201#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_MCE_P4THERMAL)
202 /* thermal monitor LVT interrupt */
203 alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt);
204#endif
205#endif
195} 206}
196 207
197#ifdef CONFIG_X86_32 208#ifdef CONFIG_X86_32