aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/io_apic.c
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2008-09-06 06:15:33 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 10:53:08 -0400
commit3c2cbd2490656fb4b6ede586c557a2b09811a432 (patch)
tree721c61d592223701c885cd4d6d66d1715efe7f3b /arch/x86/kernel/io_apic.c
parent26afe5f2fbf06ea0765aaa316640c4dd472310c0 (diff)
x86: io-apic - code style cleaning for setup_IO_APIC_irqs
By changing printout form we are able to shrink (and clean up) code a bit. Former printout example: init IO_APIC IRQs IO-APIC (apicid-pin) 1-1, 1-2, 1-3 not connected. IO-APIC (apicid-pin) 2-1, 2-2, 2-3 not connected. New printout example: init IO_APIC IRQs 1-1 1-2 1-3 (apicid-pin) not connected 2-1 2-2 2-3 (apicid-pin) not connected Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/io_apic.c')
-rw-r--r--arch/x86/kernel/io_apic.c53
1 files changed, 28 insertions, 25 deletions
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index 77fa155becf6..4040d575a21e 100644
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -1518,41 +1518,44 @@ static void setup_IO_APIC_irq(int apic, int pin, unsigned int irq,
1518 1518
1519static void __init setup_IO_APIC_irqs(void) 1519static void __init setup_IO_APIC_irqs(void)
1520{ 1520{
1521 int apic, pin, idx, irq, first_notcon = 1; 1521 int apic, pin, idx, irq;
1522 int notcon = 0;
1522 1523
1523 apic_printk(APIC_VERBOSE, KERN_DEBUG "init IO_APIC IRQs\n"); 1524 apic_printk(APIC_VERBOSE, KERN_DEBUG "init IO_APIC IRQs\n");
1524 1525
1525 for (apic = 0; apic < nr_ioapics; apic++) { 1526 for (apic = 0; apic < nr_ioapics; apic++) {
1526 for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) { 1527 for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) {
1527 1528
1528 idx = find_irq_entry(apic,pin,mp_INT); 1529 idx = find_irq_entry(apic, pin, mp_INT);
1529 if (idx == -1) { 1530 if (idx == -1) {
1530 if (first_notcon) { 1531 apic_printk(APIC_VERBOSE,
1531 apic_printk(APIC_VERBOSE, KERN_DEBUG " IO-APIC (apicid-pin) %d-%d", mp_ioapics[apic].mp_apicid, pin); 1532 KERN_DEBUG " %d-%d",
1532 first_notcon = 0; 1533 mp_ioapics[apic].mp_apicid, pin);
1533 } else 1534 if (!notcon)
1534 apic_printk(APIC_VERBOSE, ", %d-%d", mp_ioapics[apic].mp_apicid, pin); 1535 notcon = 1;
1535 continue; 1536 continue;
1536 } 1537 }
1537 if (!first_notcon) {
1538 apic_printk(APIC_VERBOSE, " not connected.\n");
1539 first_notcon = 1;
1540 }
1541 1538
1542 irq = pin_2_irq(idx, apic, pin); 1539 irq = pin_2_irq(idx, apic, pin);
1543#ifdef CONFIG_X86_32 1540#ifdef CONFIG_X86_32
1544 if (multi_timer_check(apic, irq)) 1541 if (multi_timer_check(apic, irq))
1545 continue; 1542 continue;
1546#endif 1543#endif
1547 add_pin_to_irq(irq, apic, pin); 1544 add_pin_to_irq(irq, apic, pin);
1548 1545
1549 setup_IO_APIC_irq(apic, pin, irq, 1546 setup_IO_APIC_irq(apic, pin, irq,
1550 irq_trigger(idx), irq_polarity(idx)); 1547 irq_trigger(idx), irq_polarity(idx));
1551 } 1548 }
1549 if (notcon) {
1550 apic_printk(APIC_VERBOSE,
1551 KERN_DEBUG " (apicid-pin) not connected\n");
1552 notcon = 0;
1553 }
1552 } 1554 }
1553 1555
1554 if (!first_notcon) 1556 if (notcon)
1555 apic_printk(APIC_VERBOSE, " not connected.\n"); 1557 apic_printk(APIC_VERBOSE,
1558 KERN_DEBUG " (apicid-pin) not connected\n");
1556} 1559}
1557 1560
1558/* 1561/*