aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlan Mayer <ajm@sgi.com>2008-03-26 17:11:31 -0400
committerIngo Molnar <mingo@elte.hu>2008-05-12 15:28:05 -0400
commit6859a8402945cf1d74af75a2e1aa4e327a506ab4 (patch)
treefd663e47f31a8c30718af560132e1e58940c475f /include
parent492c2e476eac010962850006c49df326919b284c (diff)
x86: resize NR_IRQS for large machines
On machines with very large numbers of cpus, tables that are dimensioned by NR_IRQS get very large, especially the irq_desc table. They are also very sparsely used. When the cpu count is > MAX_IO_APICS, use MAX_IO_APICS to set NR_IRQS, otherwise use NR_CPUS. Signed-off-by: Alan Mayer <ajm@sgi.com> Reviewed-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/asm-x86/irq_64.h6
-rw-r--r--include/linux/kernel_stat.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/include/asm-x86/irq_64.h b/include/asm-x86/irq_64.h
index 083d35a62c9..7608176590b 100644
--- a/include/asm-x86/irq_64.h
+++ b/include/asm-x86/irq_64.h
@@ -10,6 +10,8 @@
10 * <tomsoft@informatik.tu-chemnitz.de> 10 * <tomsoft@informatik.tu-chemnitz.de>
11 */ 11 */
12 12
13#include <asm/apicdef.h>
14
13#define TIMER_IRQ 0 15#define TIMER_IRQ 0
14 16
15/* 17/*
@@ -31,7 +33,11 @@
31 33
32#define FIRST_SYSTEM_VECTOR 0xef /* duplicated in hw_irq.h */ 34#define FIRST_SYSTEM_VECTOR 0xef /* duplicated in hw_irq.h */
33 35
36#if NR_CPUS < MAX_IO_APICS
34#define NR_IRQS (NR_VECTORS + (32 * NR_CPUS)) 37#define NR_IRQS (NR_VECTORS + (32 * NR_CPUS))
38#else
39#define NR_IRQS (NR_VECTORS + (32 * MAX_IO_APICS))
40#endif
35#define NR_IRQ_VECTORS NR_IRQS 41#define NR_IRQ_VECTORS NR_IRQS
36 42
37static inline int irq_canonicalize(int irq) 43static inline int irq_canonicalize(int irq)
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h
index e8ffce898bf..cf9f40a91c9 100644
--- a/include/linux/kernel_stat.h
+++ b/include/linux/kernel_stat.h
@@ -1,11 +1,11 @@
1#ifndef _LINUX_KERNEL_STAT_H 1#ifndef _LINUX_KERNEL_STAT_H
2#define _LINUX_KERNEL_STAT_H 2#define _LINUX_KERNEL_STAT_H
3 3
4#include <asm/irq.h>
5#include <linux/smp.h> 4#include <linux/smp.h>
6#include <linux/threads.h> 5#include <linux/threads.h>
7#include <linux/percpu.h> 6#include <linux/percpu.h>
8#include <linux/cpumask.h> 7#include <linux/cpumask.h>
8#include <asm/irq.h>
9#include <asm/cputime.h> 9#include <asm/cputime.h>
10 10
11/* 11/*