lkml.org 
[lkml]   [2010]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 5/5] x86: update nr_irqs according cpu num
that is max number on run time.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
arch/x86/kernel/apic/io_apic.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)

Index: linux-2.6/arch/x86/kernel/apic/io_apic.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/apic/io_apic.c
+++ linux-2.6/arch/x86/kernel/apic/io_apic.c
@@ -3840,16 +3840,14 @@ int __init arch_probe_nr_irqs(void)
{
int nr;

- if (nr_irqs > (NR_VECTORS * nr_cpu_ids))
- nr_irqs = NR_VECTORS * nr_cpu_ids;
-
- nr = nr_irqs_gsi + 8 * nr_cpu_ids;
-#if defined(CONFIG_PCI_MSI) || defined(CONFIG_HT_IRQ)
- /*
- * for MSI and HT dyn irq
- */
- nr += nr_irqs_gsi * 64;
+ nr = NR_VECTORS - FIRST_DEVICE_VECTOR;
+#ifdef CONFIG_SMP
+ /* system vectors */
+ nr -= 0x10;
#endif
+ nr *= nr_cpu_ids;
+ nr += FIRST_DEVICE_VECTOR - IRQ0_VECTOR;
+
if (nr < nr_irqs)
nr_irqs = nr;


\
 
 \ /
  Last update: 2010-01-08 12:57    [W:0.110 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site