aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-02-23 07:07:54 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-02-23 11:26:49 -0500
commitf880ec78fabebc58180778d223600e9be7b48502 (patch)
tree9fd0e60812cd7f2534ada5124c419b93876949dd
parentff973d041e5ab9ada9e49f4e93ef3a699c511463 (diff)
x86: ioapic: Use new setup function in pre_init_apic_IRQ0()
Remove the duplicated code and call the function. It does not matter whether we allocated the cfg before calling setup_local_APIC() and we can set the irq chip and handler after that as well. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--arch/x86/kernel/apic/io_apic.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 6deb3ca62fd6..51c8bd11c136 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -4103,20 +4103,15 @@ void __init mp_register_ioapic(int id, u32 address, u32 gsi_base)
4103/* Enable IOAPIC early just for system timer */ 4103/* Enable IOAPIC early just for system timer */
4104void __init pre_init_apic_IRQ0(void) 4104void __init pre_init_apic_IRQ0(void)
4105{ 4105{
4106 struct irq_cfg *cfg; 4106 struct io_apic_irq_attr attr = { 0, 0, 0, 0 };
4107 4107
4108 printk(KERN_INFO "Early APIC setup for system timer0\n"); 4108 printk(KERN_INFO "Early APIC setup for system timer0\n");
4109#ifndef CONFIG_SMP 4109#ifndef CONFIG_SMP
4110 physid_set_mask_of_physid(boot_cpu_physical_apicid, 4110 physid_set_mask_of_physid(boot_cpu_physical_apicid,
4111 &phys_cpu_present_map); 4111 &phys_cpu_present_map);
4112#endif 4112#endif
4113 /* Make sure the irq descriptor is set up */
4114 cfg = alloc_irq_and_cfg_at(0, 0);
4115
4116 setup_local_APIC(); 4113 setup_local_APIC();
4117 4114
4118 add_pin_to_irq_node(cfg, 0, 0, 0); 4115 io_apic_setup_irq_pin(0, 0, &attr);
4119 set_irq_chip_and_handler_name(0, &ioapic_chip, handle_edge_irq, "edge"); 4116 set_irq_chip_and_handler_name(0, &ioapic_chip, handle_edge_irq, "edge");
4120
4121 setup_ioapic_irq(0, 0, 0, cfg, 0, 0);
4122} 4117}