aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2010-09-27 14:55:03 -0400
committerThomas Gleixner <tglx@linutronix.de>2010-10-12 10:39:08 -0400
commitb683de2b3cb17bb10fa6fd4af614dc75b5749fe0 (patch)
treee1a799293b218f5c13d4903c57fab144b2f433b3 /kernel/irq
parentaa99ec0f3f26bf2bcd0fa5176de93598427f1e5e (diff)
genirq: Query arch for number of early descriptors
sparse irq sets up NR_IRQS_LEGACY irq descriptors and archs then go ahead and allocate more. Use the unused return value of arch_probe_nr_irqs() to let the architecture return the number of early allocations. Fix up all users. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/irqdesc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 7cbe4f93e2fb..a1fbd1d347af 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -226,16 +226,16 @@ struct irq_desc * __ref irq_to_desc_alloc_node(unsigned int irq, int node)
226 226
227int __init early_irq_init(void) 227int __init early_irq_init(void)
228{ 228{
229 int i, node = first_online_node; 229 int i, initcnt, node = first_online_node;
230 struct irq_desc *desc; 230 struct irq_desc *desc;
231 231
232 init_irq_default_affinity(); 232 init_irq_default_affinity();
233 233
234 /* initialize nr_irqs based on nr_cpu_ids */ 234 /* Let arch update nr_irqs and return the nr of preallocated irqs */
235 arch_probe_nr_irqs(); 235 initcnt = arch_probe_nr_irqs();
236 printk(KERN_INFO "NR_IRQS:%d nr_irqs:%d\n", NR_IRQS, nr_irqs); 236 printk(KERN_INFO "NR_IRQS:%d nr_irqs:%d %d\n", NR_IRQS, nr_irqs, initcnt);
237 237
238 for (i = 0; i < NR_IRQS_LEGACY; i++) { 238 for (i = 0; i < initcnt; i++) {
239 desc = alloc_desc(i, node); 239 desc = alloc_desc(i, node);
240 set_bit(i, allocated_irqs); 240 set_bit(i, allocated_irqs);
241 irq_insert_desc(i, desc); 241 irq_insert_desc(i, desc);