aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2011-11-10 08:45:24 -0500
committerIngo Molnar <mingo@elte.hu>2011-11-10 12:31:23 -0500
commit6fd36ba02132c61f67ebefff77fe710bd38ba95a (patch)
tree6522c233bde4c9769116c3d53fe039746a40be70 /arch/x86/kernel
parent064a59b6dd1f341cc478c212bb436e3da9cb8d04 (diff)
x86, ioapic: Only print ioapic debug information for IRQs belonging to an ioapic chip
with "apic=verbose" the print_IO_APIC() function tries to print IRQ to pin mappings for every active irq. It assumes chip_data is of type irq_cfg and may cause an oops if not. As the print_IO_APIC() is called from a late_initcall other chained irq chips may already be registered with custom chip_data information, causing an oops. This is the case with intel MID SoC devices with gpio demuxers registered as irq_chips. Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> [ -v2: fixed build failure ] Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/apic/io_apic.c5
-rw-r--r--arch/x86/kernel/nmi.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 841b8da4052..6d939d7847e 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -1694,6 +1694,7 @@ __apicdebuginit(void) print_IO_APICs(void)
1694 int ioapic_idx; 1694 int ioapic_idx;
1695 struct irq_cfg *cfg; 1695 struct irq_cfg *cfg;
1696 unsigned int irq; 1696 unsigned int irq;
1697 struct irq_chip *chip;
1697 1698
1698 printk(KERN_DEBUG "number of MP IRQ sources: %d.\n", mp_irq_entries); 1699 printk(KERN_DEBUG "number of MP IRQ sources: %d.\n", mp_irq_entries);
1699 for (ioapic_idx = 0; ioapic_idx < nr_ioapics; ioapic_idx++) 1700 for (ioapic_idx = 0; ioapic_idx < nr_ioapics; ioapic_idx++)
@@ -1714,6 +1715,10 @@ __apicdebuginit(void) print_IO_APICs(void)
1714 for_each_active_irq(irq) { 1715 for_each_active_irq(irq) {
1715 struct irq_pin_list *entry; 1716 struct irq_pin_list *entry;
1716 1717
1718 chip = irq_get_chip(irq);
1719 if (chip != &ioapic_chip)
1720 continue;
1721
1717 cfg = irq_get_chip_data(irq); 1722 cfg = irq_get_chip_data(irq);
1718 if (!cfg) 1723 if (!cfg)
1719 continue; 1724 continue;
diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c
index 27d1e7cbdb6..e88f37b58dd 100644
--- a/arch/x86/kernel/nmi.c
+++ b/arch/x86/kernel/nmi.c
@@ -29,6 +29,7 @@
29#include <asm/traps.h> 29#include <asm/traps.h>
30#include <asm/mach_traps.h> 30#include <asm/mach_traps.h>
31#include <asm/nmi.h> 31#include <asm/nmi.h>
32#include <asm/x86_init.h>
32 33
33#define NMI_MAX_NAMELEN 16 34#define NMI_MAX_NAMELEN 16
34struct nmiaction { 35struct nmiaction {