aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/io_apic.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index 4e44fd1f466..d28128e0392 100644
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -3625,16 +3625,21 @@ int __init probe_nr_irqs(void)
3625{ 3625{
3626 int idx; 3626 int idx;
3627 int nr = 0; 3627 int nr = 0;
3628#ifndef CONFIG_XEN
3629 int nr_min = 32;
3630#else
3631 int nr_min = NR_IRQS;
3632#endif
3628 3633
3629 for (idx = 0; idx < nr_ioapics; idx++) 3634 for (idx = 0; idx < nr_ioapics; idx++)
3630 nr += io_apic_get_redir_entries(idx); 3635 nr += io_apic_get_redir_entries(idx) + 1;
3631 3636
3632 /* double it for hotplug and msi and nmi */ 3637 /* double it for hotplug and msi and nmi */
3633 nr <<= 1; 3638 nr <<= 1;
3634 3639
3635 /* something wrong ? */ 3640 /* something wrong ? */
3636 if (nr < 32) 3641 if (nr < nr_min)
3637 nr = 32; 3642 nr = nr_min;
3638 3643
3639 return nr; 3644 return nr;
3640} 3645}