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>
This commit is contained in:
Mike Travis
2009-01-10 22:24:07 -08:00
committed by Ingo Molnar
parent 0fa0ebbf15
commit 9332fccded
5 changed files with 35 additions and 11 deletions

View File

@@ -133,6 +133,9 @@ int __init early_irq_init(void)
int legacy_count;
int i;
/* initialize nr_irqs based on nr_cpu_ids */
nr_irqs = max_nr_irqs(nr_cpu_ids);
printk(KERN_INFO "NR_IRQS:%d nr_irqs:%d\n", NR_IRQS, nr_irqs);
desc = irq_desc_legacy;