aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/io_apic.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2009-01-12 20:39:24 -0500
committerMike Travis <travis@sgi.com>2009-01-12 20:39:24 -0500
commit4a046d1754ee6ebb6f399696805ed61ea0444d4c (patch)
tree9b9e8e63d9490aea4c2f06263ad541cb8115eb63 /arch/x86/kernel/io_apic.c
parente65e49d0f3714f4a6a42f6f6a19926ba33fcda75 (diff)
x86: arch_probe_nr_irqs
Impact: save RAM with large NR_CPUS, get smaller nr_irqs Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Mike Travis <travis@sgi.com>
Diffstat (limited to 'arch/x86/kernel/io_apic.c')
-rw-r--r--arch/x86/kernel/io_apic.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index ae80638012de..157986916cd1 100644
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -3850,6 +3850,22 @@ void __init probe_nr_irqs_gsi(void)
3850 nr_irqs_gsi = nr; 3850 nr_irqs_gsi = nr;
3851} 3851}
3852 3852
3853#ifdef CONFIG_SPARSE_IRQ
3854int __init arch_probe_nr_irqs(void)
3855{
3856 int nr;
3857
3858 nr = ((8 * nr_cpu_ids) > (32 * nr_ioapics) ?
3859 (NR_VECTORS + (8 * nr_cpu_ids)) :
3860 (NR_VECTORS + (32 * nr_ioapics)));
3861
3862 if (nr < nr_irqs && nr > nr_irqs_gsi)
3863 nr_irqs = nr;
3864
3865 return 0;
3866}
3867#endif
3868
3853/* -------------------------------------------------------------------------- 3869/* --------------------------------------------------------------------------
3854 ACPI-based IOAPIC Configuration 3870 ACPI-based IOAPIC Configuration
3855 -------------------------------------------------------------------------- */ 3871 -------------------------------------------------------------------------- */