aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gcosta@redhat.com>2008-03-19 13:25:33 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:41:01 -0400
commit17c9ab1eabcc08794064a6e3232ac421664c9ce1 (patch)
tree1c4a6ebc6d3da132737fd14b3554369b2bbd554e /arch
parenteb44d0a2a9c4d64ed89044fcf1f75e6a27c42ea7 (diff)
x86: move smp_intr_init away from smpboot_32.c
We move it to apic_32.c, since it's irq related anyway, and only called from that file. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/apic_32.c23
-rw-r--r--arch/x86/kernel/smpboot_32.c21
2 files changed, 23 insertions, 21 deletions
diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c
index 6aa93db7faa3..c32cc0feb47b 100644
--- a/arch/x86/kernel/apic_32.c
+++ b/arch/x86/kernel/apic_32.c
@@ -1317,6 +1317,29 @@ void smp_error_interrupt(struct pt_regs *regs)
1317 irq_exit(); 1317 irq_exit();
1318} 1318}
1319 1319
1320#ifdef CONFIG_SMP
1321void __init smp_intr_init(void)
1322{
1323 /*
1324 * IRQ0 must be given a fixed assignment and initialized,
1325 * because it's used before the IO-APIC is set up.
1326 */
1327 set_intr_gate(FIRST_DEVICE_VECTOR, interrupt[0]);
1328
1329 /*
1330 * The reschedule interrupt is a CPU-to-CPU reschedule-helper
1331 * IPI, driven by wakeup.
1332 */
1333 set_intr_gate(RESCHEDULE_VECTOR, reschedule_interrupt);
1334
1335 /* IPI for invalidation */
1336 set_intr_gate(INVALIDATE_TLB_VECTOR, invalidate_interrupt);
1337
1338 /* IPI for generic function call */
1339 set_intr_gate(CALL_FUNCTION_VECTOR, call_function_interrupt);
1340}
1341#endif
1342
1320/* 1343/*
1321 * Initialize APIC interrupts 1344 * Initialize APIC interrupts
1322 */ 1345 */
diff --git a/arch/x86/kernel/smpboot_32.c b/arch/x86/kernel/smpboot_32.c
index 1736404c3c36..87c9a75d929c 100644
--- a/arch/x86/kernel/smpboot_32.c
+++ b/arch/x86/kernel/smpboot_32.c
@@ -968,24 +968,3 @@ void __init native_smp_cpus_done(unsigned int max_cpus)
968#endif 968#endif
969 zap_low_mappings(); 969 zap_low_mappings();
970} 970}
971
972void __init smp_intr_init(void)
973{
974 /*
975 * IRQ0 must be given a fixed assignment and initialized,
976 * because it's used before the IO-APIC is set up.
977 */
978 set_intr_gate(FIRST_DEVICE_VECTOR, interrupt[0]);
979
980 /*
981 * The reschedule interrupt is a CPU-to-CPU reschedule-helper
982 * IPI, driven by wakeup.
983 */
984 set_intr_gate(RESCHEDULE_VECTOR, reschedule_interrupt);
985
986 /* IPI for invalidation */
987 set_intr_gate(INVALIDATE_TLB_VECTOR, invalidate_interrupt);
988
989 /* IPI for generic function call */
990 set_intr_gate(CALL_FUNCTION_VECTOR, call_function_interrupt);
991}