diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-02-19 12:56:36 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-02-19 12:56:43 +0100 |
commit | 218502bfe674f570205367b9094048207b04ba15 (patch) | |
tree | c6187b97e7c79d902aef08f049e9fba04c421d56 /kernel/irq/irqdesc.c | |
parent | 51327ada7142ab520ed610a42572d1f4cbfbb2dc (diff) | |
parent | 6d83f94db95cfe65d2a6359cccdf61cf087c2598 (diff) | |
download | linux-218502bfe674f570205367b9094048207b04ba15.tar.gz linux-218502bfe674f570205367b9094048207b04ba15.tar.bz2 linux-218502bfe674f570205367b9094048207b04ba15.zip |
Merge branch 'irq/urgent' into irq/core
Reason: Further patches are conflicting with mainline fixes
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/irq/irqdesc.c')
-rw-r--r-- | kernel/irq/irqdesc.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index a7ac6e1e7074..a250d3a0af12 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c @@ -94,7 +94,7 @@ int nr_irqs = NR_IRQS; EXPORT_SYMBOL_GPL(nr_irqs); static DEFINE_MUTEX(sparse_irq_lock); -static DECLARE_BITMAP(allocated_irqs, NR_IRQS); +static DECLARE_BITMAP(allocated_irqs, IRQ_BITMAP_BITS); #ifdef CONFIG_SPARSE_IRQ @@ -217,6 +217,15 @@ int __init early_irq_init(void) initcnt = arch_probe_nr_irqs(); printk(KERN_INFO "NR_IRQS:%d nr_irqs:%d %d\n", NR_IRQS, nr_irqs, initcnt); + if (WARN_ON(nr_irqs > IRQ_BITMAP_BITS)) + nr_irqs = IRQ_BITMAP_BITS; + + if (WARN_ON(initcnt > IRQ_BITMAP_BITS)) + initcnt = IRQ_BITMAP_BITS; + + if (initcnt > nr_irqs) + nr_irqs = initcnt; + for (i = 0; i < initcnt; i++) { desc = alloc_desc(i, node); set_bit(i, allocated_irqs); |