[PATCH] x86: use nr_cpus in max_nr_irqs()

From: Yinghai Lu
Date: Mon Jan 12 2009 - 00:43:49 EST


Impact: save RAM with large NR_CPUS, get smaller nr_irqs

Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>
Cc: Mike Travis <travis@xxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
arch/x86/include/asm/irq_vectors.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/irq_vectors.h b/arch/x86/include/asm/irq_vectors.h
index 602361a..5b285ca 100644
--- a/arch/x86/include/asm/irq_vectors.h
+++ b/arch/x86/include/asm/irq_vectors.h
@@ -117,8 +117,8 @@

/* defined as a macro so nr_irqs = max_nr_irqs(nr_cpu_ids) can be used */
# define max_nr_irqs(nr_cpus) \
- ((8 * nr_cpus) > (32 * MAX_IO_APICS) ? \
- (NR_VECTORS + (8 * NR_CPUS)) : \
+ ((8 * (nr_cpus)) > (32 * MAX_IO_APICS) ? \
+ (NR_VECTORS + (8 * (nr_cpus)) : \
(NR_VECTORS + (32 * MAX_IO_APICS))) \

# define NR_IRQS max_nr_irqs(NR_CPUS)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/