diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-02-26 05:17:16 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-02-27 06:49:56 -0500 |
commit | 21c2fd9970cc8e457058f84016450a2e9876125e (patch) | |
tree | 252bf6badc38550bc16cb3855278f3f2160ec1dc /arch | |
parent | d02e30c31c57683a66ed68a1bcff900ca78f6d56 (diff) |
x86: apic: Fix mismerge, add arch_probe_nr_irqs() again
Merge commit aef55d4922 mis-merged io_apic.c so we lost the
arch_probe_nr_irqs() method.
This caused subtle boot breakages (udev confusion likely
due to missing drivers) with certain configs.
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <20100207210250.GB8256@jenkins.home.ifup.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 979589881c80..72ac2a332993 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -3876,6 +3876,28 @@ void __init probe_nr_irqs_gsi(void) | |||
3876 | printk(KERN_DEBUG "nr_irqs_gsi: %d\n", nr_irqs_gsi); | 3876 | printk(KERN_DEBUG "nr_irqs_gsi: %d\n", nr_irqs_gsi); |
3877 | } | 3877 | } |
3878 | 3878 | ||
3879 | #ifdef CONFIG_SPARSE_IRQ | ||
3880 | int __init arch_probe_nr_irqs(void) | ||
3881 | { | ||
3882 | int nr; | ||
3883 | |||
3884 | if (nr_irqs > (NR_VECTORS * nr_cpu_ids)) | ||
3885 | nr_irqs = NR_VECTORS * nr_cpu_ids; | ||
3886 | |||
3887 | nr = nr_irqs_gsi + 8 * nr_cpu_ids; | ||
3888 | #if defined(CONFIG_PCI_MSI) || defined(CONFIG_HT_IRQ) | ||
3889 | /* | ||
3890 | * for MSI and HT dyn irq | ||
3891 | */ | ||
3892 | nr += nr_irqs_gsi * 16; | ||
3893 | #endif | ||
3894 | if (nr < nr_irqs) | ||
3895 | nr_irqs = nr; | ||
3896 | |||
3897 | return 0; | ||
3898 | } | ||
3899 | #endif | ||
3900 | |||
3879 | static int __io_apic_set_pci_routing(struct device *dev, int irq, | 3901 | static int __io_apic_set_pci_routing(struct device *dev, int irq, |
3880 | struct io_apic_irq_attr *irq_attr) | 3902 | struct io_apic_irq_attr *irq_attr) |
3881 | { | 3903 | { |