aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/include/asm/io_apic.h1
-rw-r--r--arch/x86/kernel/apic/io_apic.c21
2 files changed, 22 insertions, 0 deletions
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h
index 31dfb42d8649..99a416ed16b7 100644
--- a/arch/x86/include/asm/io_apic.h
+++ b/arch/x86/include/asm/io_apic.h
@@ -187,6 +187,7 @@ extern struct mp_ioapic_gsi mp_gsi_routing[];
187int mp_find_ioapic(int gsi); 187int mp_find_ioapic(int gsi);
188int mp_find_ioapic_pin(int ioapic, int gsi); 188int mp_find_ioapic_pin(int ioapic, int gsi);
189void __init mp_register_ioapic(int id, u32 address, u32 gsi_base); 189void __init mp_register_ioapic(int id, u32 address, u32 gsi_base);
190extern void __init pre_init_apic_IRQ0(void);
190 191
191#else /* !CONFIG_X86_IO_APIC */ 192#else /* !CONFIG_X86_IO_APIC */
192 193
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index b34854358ee6..8c848b5877a0 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -4289,3 +4289,24 @@ void __init mp_register_ioapic(int id, u32 address, u32 gsi_base)
4289 4289
4290 nr_ioapics++; 4290 nr_ioapics++;
4291} 4291}
4292
4293/* Enable IOAPIC early just for system timer */
4294void __init pre_init_apic_IRQ0(void)
4295{
4296 struct irq_cfg *cfg;
4297 struct irq_desc *desc;
4298
4299 printk(KERN_INFO "Early APIC setup for system timer0\n");
4300#ifndef CONFIG_SMP
4301 phys_cpu_present_map = physid_mask_of_physid(boot_cpu_physical_apicid);
4302#endif
4303 desc = irq_to_desc_alloc_node(0, 0);
4304
4305 setup_local_APIC();
4306
4307 cfg = irq_cfg(0);
4308 add_pin_to_irq_node(cfg, 0, 0, 0);
4309 set_irq_chip_and_handler_name(0, &ioapic_chip, handle_edge_irq, "edge");
4310
4311 setup_IO_APIC_irq(0, 0, 0, desc, 0, 0);
4312}