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 9b0c480c383b..bc7ac4da90d7 100644 --- a/arch/x86/kernel/io_apic.c +++ b/arch/x86/kernel/io_apic.c | |||
@@ -3841,14 +3841,24 @@ int __init io_apic_get_redir_entries (int ioapic) | |||
3841 | 3841 | ||
3842 | void __init probe_nr_irqs_gsi(void) | 3842 | void __init probe_nr_irqs_gsi(void) |
3843 | { | 3843 | { |
3844 | int idx; | ||
3845 | int nr = 0; | 3844 | int nr = 0; |
3846 | 3845 | ||
3847 | for (idx = 0; idx < nr_ioapics; idx++) | 3846 | nr = acpi_probe_gsi(); |
3848 | nr += io_apic_get_redir_entries(idx) + 1; | 3847 | if (nr > nr_irqs_gsi) { |
3849 | |||
3850 | if (nr > nr_irqs_gsi) | ||
3851 | nr_irqs_gsi = nr; | 3848 | nr_irqs_gsi = nr; |
3849 | } else { | ||
3850 | /* for acpi=off or acpi is not compiled in */ | ||
3851 | int idx; | ||
3852 | |||
3853 | nr = 0; | ||
3854 | for (idx = 0; idx < nr_ioapics; idx++) | ||
3855 | nr += io_apic_get_redir_entries(idx) + 1; | ||
3856 | |||
3857 | if (nr > nr_irqs_gsi) | ||
3858 | nr_irqs_gsi = nr; | ||
3859 | } | ||
3860 | |||
3861 | printk(KERN_DEBUG "nr_irqs_gsi: %d\n", nr_irqs_gsi); | ||
3852 | } | 3862 | } |
3853 | 3863 | ||
3854 | /* -------------------------------------------------------------------------- | 3864 | /* -------------------------------------------------------------------------- |