aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/apic/io_apic.c22
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
3880int __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
3879static int __io_apic_set_pci_routing(struct device *dev, int irq, 3901static 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{