diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2008-07-20 19:52:49 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-24 06:37:10 -0400 |
commit | 32f71aff77b6470d272f80ac28f43f9601c4d140 (patch) | |
tree | 92e34f77aa71472179f4d171a151cf7af9c6b6fa /arch/x86/kernel/io_apic_32.c | |
parent | 338b9bb3adac0d2c5a1e180491d9b001d624c402 (diff) |
x86: PIC, L-APIC and I/O APIC debug information
Dump all the PIC, local APIC and I/O APIC information at the
fs_initcall() level, which is after ACPI (if used) has initialised PCI
information, making the point of invocation consistent across MP-table and
ACPI platforms. Remove explicit calls to print_IO_APIC() from elsewhere.
Make the interface of all the functions involved consistent between 32-bit
and 64-bit versions and make them all static by default by the means of a
New-and-Improved(TM) __apicdebuginit() macro.
Note that like print_IO_APIC() all these only output anything if
"apic=debug" has been passed to the kernel through the command line.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Chuck Ebbert <cebbert@redhat.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.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c index de9aa0e3a9c..d54455ec985 100644 --- a/arch/x86/kernel/io_apic_32.c +++ b/arch/x86/kernel/io_apic_32.c | |||
@@ -50,6 +50,8 @@ | |||
50 | #include <mach_apic.h> | 50 | #include <mach_apic.h> |
51 | #include <mach_apicdef.h> | 51 | #include <mach_apicdef.h> |
52 | 52 | ||
53 | #define __apicdebuginit(type) static type __init | ||
54 | |||
53 | int (*ioapic_renumber_irq)(int ioapic, int irq); | 55 | int (*ioapic_renumber_irq)(int ioapic, int irq); |
54 | atomic_t irq_mis_count; | 56 | atomic_t irq_mis_count; |
55 | 57 | ||
@@ -1345,7 +1347,8 @@ static void __init setup_timer_IRQ0_pin(unsigned int apic, unsigned int pin, | |||
1345 | ioapic_write_entry(apic, pin, entry); | 1347 | ioapic_write_entry(apic, pin, entry); |
1346 | } | 1348 | } |
1347 | 1349 | ||
1348 | void __init print_IO_APIC(void) | 1350 | |
1351 | __apicdebuginit(void) print_IO_APIC(void) | ||
1349 | { | 1352 | { |
1350 | int apic, i; | 1353 | int apic, i; |
1351 | union IO_APIC_reg_00 reg_00; | 1354 | union IO_APIC_reg_00 reg_00; |
@@ -1460,9 +1463,7 @@ void __init print_IO_APIC(void) | |||
1460 | return; | 1463 | return; |
1461 | } | 1464 | } |
1462 | 1465 | ||
1463 | #if 0 | 1466 | __apicdebuginit(void) print_APIC_bitfield(int base) |
1464 | |||
1465 | static void print_APIC_bitfield(int base) | ||
1466 | { | 1467 | { |
1467 | unsigned int v; | 1468 | unsigned int v; |
1468 | int i, j; | 1469 | int i, j; |
@@ -1483,7 +1484,7 @@ static void print_APIC_bitfield(int base) | |||
1483 | } | 1484 | } |
1484 | } | 1485 | } |
1485 | 1486 | ||
1486 | void /*__init*/ print_local_APIC(void *dummy) | 1487 | __apicdebuginit(void) print_local_APIC(void *dummy) |
1487 | { | 1488 | { |
1488 | unsigned int v, ver, maxlvt; | 1489 | unsigned int v, ver, maxlvt; |
1489 | 1490 | ||
@@ -1567,12 +1568,12 @@ void /*__init*/ print_local_APIC(void *dummy) | |||
1567 | printk("\n"); | 1568 | printk("\n"); |
1568 | } | 1569 | } |
1569 | 1570 | ||
1570 | void print_all_local_APICs(void) | 1571 | __apicdebuginit(void) print_all_local_APICs(void) |
1571 | { | 1572 | { |
1572 | on_each_cpu(print_local_APIC, NULL, 1); | 1573 | on_each_cpu(print_local_APIC, NULL, 1); |
1573 | } | 1574 | } |
1574 | 1575 | ||
1575 | void /*__init*/ print_PIC(void) | 1576 | __apicdebuginit(void) print_PIC(void) |
1576 | { | 1577 | { |
1577 | unsigned int v; | 1578 | unsigned int v; |
1578 | unsigned long flags; | 1579 | unsigned long flags; |
@@ -1604,7 +1605,17 @@ void /*__init*/ print_PIC(void) | |||
1604 | printk(KERN_DEBUG "... PIC ELCR: %04x\n", v); | 1605 | printk(KERN_DEBUG "... PIC ELCR: %04x\n", v); |
1605 | } | 1606 | } |
1606 | 1607 | ||
1607 | #endif /* 0 */ | 1608 | __apicdebuginit(int) print_all_ICs(void) |
1609 | { | ||
1610 | print_PIC(); | ||
1611 | print_all_local_APICs(); | ||
1612 | print_IO_APIC(); | ||
1613 | |||
1614 | return 0; | ||
1615 | } | ||
1616 | |||
1617 | fs_initcall(print_all_ICs); | ||
1618 | |||
1608 | 1619 | ||
1609 | static void __init enable_IO_APIC(void) | 1620 | static void __init enable_IO_APIC(void) |
1610 | { | 1621 | { |
@@ -2333,8 +2344,6 @@ void __init setup_IO_APIC(void) | |||
2333 | setup_IO_APIC_irqs(); | 2344 | setup_IO_APIC_irqs(); |
2334 | init_IO_APIC_traps(); | 2345 | init_IO_APIC_traps(); |
2335 | check_timer(); | 2346 | check_timer(); |
2336 | if (!acpi_ioapic) | ||
2337 | print_IO_APIC(); | ||
2338 | } | 2347 | } |
2339 | 2348 | ||
2340 | /* | 2349 | /* |