aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/io_apic.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2009-02-08 19:18:03 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-09 03:22:09 -0500
commitcc6c50066ec1ac98bef97117e2f078bb89bbccc7 (patch)
treec0dcc930e94f0738e0e7a29fd1e08b81cd03554c /arch/x86/kernel/io_apic.c
parentf72dccace737df74d04a96461785a3ad61724b9f (diff)
x86: find nr_irqs_gsi with mp_ioapic_routing
Impact: find right nr_irqs_gsi on some systems. One test-system has gap between gsi's: [ 0.000000] ACPI: IOAPIC (id[0x04] address[0xfec00000] gsi_base[0]) [ 0.000000] IOAPIC[0]: apic_id 4, version 0, address 0xfec00000, GSI 0-23 [ 0.000000] ACPI: IOAPIC (id[0x05] address[0xfeafd000] gsi_base[48]) [ 0.000000] IOAPIC[1]: apic_id 5, version 0, address 0xfeafd000, GSI 48-54 [ 0.000000] ACPI: IOAPIC (id[0x06] address[0xfeafc000] gsi_base[56]) [ 0.000000] IOAPIC[2]: apic_id 6, version 0, address 0xfeafc000, GSI 56-62 ... [ 0.000000] nr_irqs_gsi: 38 So nr_irqs_gsi is not right. some irq for MSI will overwrite with io_apic. need to get that with acpi_probe_gsi when acpi io_apic is used Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/io_apic.c')
-rw-r--r--arch/x86/kernel/io_apic.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index 855209a1b172..56e51eb551a5 100644
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -3824,14 +3824,24 @@ int __init io_apic_get_redir_entries (int ioapic)
3824 3824
3825void __init probe_nr_irqs_gsi(void) 3825void __init probe_nr_irqs_gsi(void)
3826{ 3826{
3827 int idx;
3828 int nr = 0; 3827 int nr = 0;
3829 3828
3830 for (idx = 0; idx < nr_ioapics; idx++) 3829 nr = acpi_probe_gsi();
3831 nr += io_apic_get_redir_entries(idx) + 1; 3830 if (nr > nr_irqs_gsi) {
3832
3833 if (nr > nr_irqs_gsi)
3834 nr_irqs_gsi = nr; 3831 nr_irqs_gsi = nr;
3832 } else {
3833 /* for acpi=off or acpi is not compiled in */
3834 int idx;
3835
3836 nr = 0;
3837 for (idx = 0; idx < nr_ioapics; idx++)
3838 nr += io_apic_get_redir_entries(idx) + 1;
3839
3840 if (nr > nr_irqs_gsi)
3841 nr_irqs_gsi = nr;
3842 }
3843
3844 printk(KERN_DEBUG "nr_irqs_gsi: %d\n", nr_irqs_gsi);
3835} 3845}
3836 3846
3837#ifdef CONFIG_SPARSE_IRQ 3847#ifdef CONFIG_SPARSE_IRQ