aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/io_apic_32.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2008-04-05 09:39:05 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:41:36 -0400
commita2249cba2f1d7d06633de09c71353ae6b1567206 (patch)
tree33b46bd7569a90843ca5549ac8de87a984bc4f18 /arch/x86/kernel/io_apic_32.c
parent9d25cb0811fd0bca2cfd80095ee7663147363f68 (diff)
x86: use ioapic_read_entry() and ioapic_write_entry()
Remove duplicate code by using ioapic_read_entry() and ioapic_write_entry() in io_apic_{32,64}.c Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/io_apic_32.c')
-rw-r--r--arch/x86/kernel/io_apic_32.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c
index db1b1f30b650..6d69de716b5e 100644
--- a/arch/x86/kernel/io_apic_32.c
+++ b/arch/x86/kernel/io_apic_32.c
@@ -1228,7 +1228,6 @@ static void __init setup_IO_APIC_irqs(void)
1228{ 1228{
1229 struct IO_APIC_route_entry entry; 1229 struct IO_APIC_route_entry entry;
1230 int apic, pin, idx, irq, first_notcon = 1, vector; 1230 int apic, pin, idx, irq, first_notcon = 1, vector;
1231 unsigned long flags;
1232 1231
1233 apic_printk(APIC_VERBOSE, KERN_DEBUG "init IO_APIC IRQs\n"); 1232 apic_printk(APIC_VERBOSE, KERN_DEBUG "init IO_APIC IRQs\n");
1234 1233
@@ -1294,9 +1293,7 @@ static void __init setup_IO_APIC_irqs(void)
1294 if (!apic && (irq < 16)) 1293 if (!apic && (irq < 16))
1295 disable_8259A_irq(irq); 1294 disable_8259A_irq(irq);
1296 } 1295 }
1297 spin_lock_irqsave(&ioapic_lock, flags); 1296 ioapic_write_entry(apic, pin, entry);
1298 __ioapic_write_entry(apic, pin, entry);
1299 spin_unlock_irqrestore(&ioapic_lock, flags);
1300 } 1297 }
1301 } 1298 }
1302 1299
@@ -2760,7 +2757,6 @@ int __init io_apic_get_redir_entries (int ioapic)
2760int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int active_high_low) 2757int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int active_high_low)
2761{ 2758{
2762 struct IO_APIC_route_entry entry; 2759 struct IO_APIC_route_entry entry;
2763 unsigned long flags;
2764 2760
2765 if (!IO_APIC_IRQ(irq)) { 2761 if (!IO_APIC_IRQ(irq)) {
2766 printk(KERN_ERR "IOAPIC[%d]: Invalid reference to IRQ 0\n", 2762 printk(KERN_ERR "IOAPIC[%d]: Invalid reference to IRQ 0\n",
@@ -2801,9 +2797,7 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a
2801 if (!ioapic && (irq < 16)) 2797 if (!ioapic && (irq < 16))
2802 disable_8259A_irq(irq); 2798 disable_8259A_irq(irq);
2803 2799
2804 spin_lock_irqsave(&ioapic_lock, flags); 2800 ioapic_write_entry(ioapic, pin, entry);
2805 __ioapic_write_entry(ioapic, pin, entry);
2806 spin_unlock_irqrestore(&ioapic_lock, flags);
2807 2801
2808 return 0; 2802 return 0;
2809} 2803}