aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
authorMike Travis <travis@sgi.com>2009-01-11 01:24:07 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-11 13:13:38 -0500
commit9332fccdedf8e09448f3b69b624211ae879f6c45 (patch)
tree81f74838f7c5388dc83a3cfd8009a22e223b4888 /kernel/irq
parent0fa0ebbf15addc1be8f73325d809c8547a9de304 (diff)
irq: initialize nr_irqs based on nr_cpu_ids
Impact: Reduce memory usage. This is the second half of the changes to make the irq_desc_ptrs be variable sized based on nr_cpu_ids. This is done by adding a new "max_nr_irqs" macro to irq_vectors.h (and a dummy in irqnr.h) to return a max NR_IRQS value based on NR_CPUS or nr_cpu_ids. This necessitated moving the define of MAX_IO_APICS to a separate file (asm/apicnum.h) so it could be included without the baggage of the other asm/apicdef.h declarations. Signed-off-by: Mike Travis <travis@sgi.com>
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/handle.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index d0b8f7e72790..ebba7a116f14 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -133,6 +133,9 @@ int __init early_irq_init(void)
133 int legacy_count; 133 int legacy_count;
134 int i; 134 int i;
135 135
136 /* initialize nr_irqs based on nr_cpu_ids */
137 nr_irqs = max_nr_irqs(nr_cpu_ids);
138
136 printk(KERN_INFO "NR_IRQS:%d nr_irqs:%d\n", NR_IRQS, nr_irqs); 139 printk(KERN_INFO "NR_IRQS:%d nr_irqs:%d\n", NR_IRQS, nr_irqs);
137 140
138 desc = irq_desc_legacy; 141 desc = irq_desc_legacy;