]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] 5316/1: AT91: oops (regression) fix on gpio irq
authorDavid Brownell <david-b@pacbell.net>
Tue, 21 Oct 2008 22:34:23 +0000 (23:34 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 22 Oct 2008 18:40:06 +0000 (19:40 +0100)
From: David Brownell <dbrownell@users.sourceforge.net>

The "5298/1: Drop desc_handle_irq()" patch went overboard
and deleted an essential line of code, causing all AT91
GPIO interrupts to oops (in irq).  Trimmed example:

Unable to handle kernel NULL pointer dereference at virtual address 000000c4
...
PC is at gpio_irq_handler+0x78/0xd0
LR is at gpio_irq_handler+0x38/0xd0
...
Backtrace:
[<c0029884>] (gpio_irq_handler+0x0/0xd0) from [<c0020054>] (__exception_text_start+0x54/0x7c)
[<c0020000>] (__exception_text_start+0x0/0x7c) from [<c00209ec>] (__irq_svc+0x2c/0x60)
Exception stack(0xc1c1de00 to 0xc1c1de48)
[<c01f4ca8>] (_spin_unlock_irq+0x0/0x3c) from [<c01389f8>] (at91ether_open+0x220/0x318)
[<c01387d8>] (at91ether_open+0x0/0x318) from [<c018caa4>] (dev_open+0xa8/0x10c)
[<c018c9fc>] (dev_open+0x0/0x10c) from [<c018b874>] (dev_change_flags+0x98/0x164)
[<c018b7dc>] (dev_change_flags+0x0/0x164) from [<c0019f8c>] (ip_auto_config+0x164/0xe28)
[<c0019e28>] (ip_auto_config+0x0/0xe28) from [<c0020318>] (__exception_text_end+0x60/0x180)
[<c00202b8>] (__exception_text_end+0x0/0x180) from [<c0008738>] (kernel_init+0x70/0xd8)
[<c00086c8>] (kernel_init+0x0/0xd8) from [<c00398e0>] (do_exit+0x0/0x6ac)

This patch restores the missing line'o'code.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-at91/gpio.c

index 7e5ebb5bdd17c8e43fb2f25ccf93e5e824e17c3e..9b0447c3d59b15443539c44eb1cb3a23dedd3a3b 100644 (file)
@@ -404,6 +404,7 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
                }
 
                pin = bank->chipbase;
+               gpio = &irq_desc[pin];
 
                while (isr) {
                        if (isr & 1) {