aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorYinghai Lu <yinghai.lu@oracle.com>2011-10-12 03:33:39 -0400
committerIngo Molnar <mingo@elte.hu>2011-10-12 03:55:25 -0400
commitcda417dd87ed46f58cbc7d3f075ebe42b4462140 (patch)
tree1b7b50132f95512a3353afacb7bd2390d3cf87ed /arch
parent3a61d7feca055152c2c6870d1f8dfbc3443bd1b3 (diff)
x86, ioapic: Factor out print_IO_APIC() to only print one io apic
It is getting too big after the interrupt remaping entries debug print out was added. Original print_IO_APIC() becomes print_IO_APICs(). New print_IO_APIC() will only print one ioapic's registers As a side-effect this clean-up also made checkpatch.pl happier. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Naga Chumbalkar <nagananda.chumbalkar@hp.com> Cc: Suresh Siddha <suresh.b.siddha@intel.com> Link: http://lkml.kernel.org/r/4E9542D3.5000008@oracle.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/apic/io_apic.c46
1 files changed, 24 insertions, 22 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index a7815061d695..94a4bcf9dca8 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -1512,30 +1512,14 @@ static void __init setup_timer_IRQ0_pin(unsigned int apic_id, unsigned int pin,
1512 ioapic_write_entry(apic_id, pin, entry); 1512 ioapic_write_entry(apic_id, pin, entry);
1513} 1513}
1514 1514
1515 1515__apicdebuginit(void) print_IO_APIC(int apic)
1516__apicdebuginit(void) print_IO_APIC(void)
1517{ 1516{
1518 int apic, i; 1517 int i;
1519 union IO_APIC_reg_00 reg_00; 1518 union IO_APIC_reg_00 reg_00;
1520 union IO_APIC_reg_01 reg_01; 1519 union IO_APIC_reg_01 reg_01;
1521 union IO_APIC_reg_02 reg_02; 1520 union IO_APIC_reg_02 reg_02;
1522 union IO_APIC_reg_03 reg_03; 1521 union IO_APIC_reg_03 reg_03;
1523 unsigned long flags; 1522 unsigned long flags;
1524 struct irq_cfg *cfg;
1525 unsigned int irq;
1526
1527 printk(KERN_DEBUG "number of MP IRQ sources: %d.\n", mp_irq_entries);
1528 for (i = 0; i < nr_ioapics; i++)
1529 printk(KERN_DEBUG "number of IO-APIC #%d registers: %d.\n",
1530 mpc_ioapic_id(i), ioapics[i].nr_registers);
1531
1532 /*
1533 * We are a bit conservative about what we expect. We have to
1534 * know about every hardware change ASAP.
1535 */
1536 printk(KERN_INFO "testing the IO APIC.......................\n");
1537
1538 for (apic = 0; apic < nr_ioapics; apic++) {
1539 1523
1540 raw_spin_lock_irqsave(&ioapic_lock, flags); 1524 raw_spin_lock_irqsave(&ioapic_lock, flags);
1541 reg_00.raw = io_apic_read(apic, 0); 1525 reg_00.raw = io_apic_read(apic, 0);
@@ -1636,7 +1620,27 @@ __apicdebuginit(void) print_IO_APIC(void)
1636 ); 1620 );
1637 } 1621 }
1638 } 1622 }
1639 } 1623}
1624
1625__apicdebuginit(void) print_IO_APICs(void)
1626{
1627 int apic, i;
1628 struct irq_cfg *cfg;
1629 unsigned int irq;
1630
1631 printk(KERN_DEBUG "number of MP IRQ sources: %d.\n", mp_irq_entries);
1632 for (i = 0; i < nr_ioapics; i++)
1633 printk(KERN_DEBUG "number of IO-APIC #%d registers: %d.\n",
1634 mpc_ioapic_id(i), ioapics[i].nr_registers);
1635
1636 /*
1637 * We are a bit conservative about what we expect. We have to
1638 * know about every hardware change ASAP.
1639 */
1640 printk(KERN_INFO "testing the IO APIC.......................\n");
1641
1642 for (apic = 0; apic < nr_ioapics; apic++)
1643 print_IO_APIC(apic);
1640 1644
1641 printk(KERN_DEBUG "IRQ to pin mappings:\n"); 1645 printk(KERN_DEBUG "IRQ to pin mappings:\n");
1642 for_each_active_irq(irq) { 1646 for_each_active_irq(irq) {
@@ -1655,8 +1659,6 @@ __apicdebuginit(void) print_IO_APIC(void)
1655 } 1659 }
1656 1660
1657 printk(KERN_INFO ".................................... done.\n"); 1661 printk(KERN_INFO ".................................... done.\n");
1658
1659 return;
1660} 1662}
1661 1663
1662__apicdebuginit(void) print_APIC_field(int base) 1664__apicdebuginit(void) print_APIC_field(int base)
@@ -1850,7 +1852,7 @@ __apicdebuginit(int) print_ICs(void)
1850 return 0; 1852 return 0;
1851 1853
1852 print_local_APICs(show_lapic); 1854 print_local_APICs(show_lapic);
1853 print_IO_APIC(); 1855 print_IO_APICs();
1854 1856
1855 return 0; 1857 return 0;
1856} 1858}