diff options
Diffstat (limited to 'arch/x86/kernel/io_apic.c')
-rw-r--r-- | arch/x86/kernel/io_apic.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c index c0498daf01c3..0480d06a12a4 100644 --- a/arch/x86/kernel/io_apic.c +++ b/arch/x86/kernel/io_apic.c | |||
@@ -3812,14 +3812,24 @@ int __init io_apic_get_redir_entries (int ioapic) | |||
3812 | 3812 | ||
3813 | void __init probe_nr_irqs_gsi(void) | 3813 | void __init probe_nr_irqs_gsi(void) |
3814 | { | 3814 | { |
3815 | int idx; | ||
3816 | int nr = 0; | 3815 | int nr = 0; |
3817 | 3816 | ||
3818 | for (idx = 0; idx < nr_ioapics; idx++) | 3817 | nr = acpi_probe_gsi(); |
3819 | nr += io_apic_get_redir_entries(idx) + 1; | 3818 | if (nr > nr_irqs_gsi) { |
3820 | |||
3821 | if (nr > nr_irqs_gsi) | ||
3822 | nr_irqs_gsi = nr; | 3819 | nr_irqs_gsi = nr; |
3820 | } else { | ||
3821 | /* for acpi=off or acpi is not compiled in */ | ||
3822 | int idx; | ||
3823 | |||
3824 | nr = 0; | ||
3825 | for (idx = 0; idx < nr_ioapics; idx++) | ||
3826 | nr += io_apic_get_redir_entries(idx) + 1; | ||
3827 | |||
3828 | if (nr > nr_irqs_gsi) | ||
3829 | nr_irqs_gsi = nr; | ||
3830 | } | ||
3831 | |||
3832 | printk(KERN_DEBUG "nr_irqs_gsi: %d\n", nr_irqs_gsi); | ||
3823 | } | 3833 | } |
3824 | 3834 | ||
3825 | #ifdef CONFIG_SPARSE_IRQ | 3835 | #ifdef CONFIG_SPARSE_IRQ |