genirq, ARM: Fix boot on ARM platforms
authorAnand Gadiyar <gadiyar@ti.com>
Thu, 14 Oct 2010 17:29:57 +0000 (22:59 +0530)
committerIngo Molnar <mingo@elte.hu>
Sat, 16 Oct 2010 16:22:03 +0000 (18:22 +0200)
Commit b683de2b3 in linux-next as of 20101014 (genirq: Query
arch for number of early descriptors) seems to have broken
bootup on several ARM boards - my beagleboard gives the
following dump with earlyprintk:

 NR_IRQS:402
 Unable to handle kernel NULL pointer dereference at virtual
 address 00000028 pgd = c0004000
 [00000028] *pgd=00000000
 Internal error: Oops: 5 [#1]
 last sysfs file:
 Modules linked in:
 CPU: 0    Not tainted
 (2.6.36-rc7-next-20101014-linux-next-20101012+ #40) PC is at
 init_IRQ+0x14/0x48 LR is at start_kernel+0x150/0x2c0
 [...]

We seem to be using desc->status without assigning desc to
anything. Fix this by adding back the code that was originally
there.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Tested-by: Linus Walleij <linus.walleij@stericsson.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
LKML-Reference: <1287077397-21781-1-git-send-email-gadiyar@ti.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/arm/kernel/irq.c

index 5456d11d6ae4805e75ba9cbf0b87422b147795f6..0e65d7ec8209cc0f3c1a304104dd42bd0c11effb 100644 (file)
@@ -157,8 +157,10 @@ void __init init_IRQ(void)
        struct irq_desc *desc;
        int irq;
 
-       for (irq = 0; irq < nr_irqs; irq++)
+       for (irq = 0; irq < nr_irqs; irq++) {
+               desc = irq_to_desc_alloc_node(irq, 0);
                desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE;
+       }
 
        init_arch_irq();
 }