Re: [4.4-rc][PATCH] gpio: omap: drop omap1 mpuio specific irq_mask/unmask callbacks
On Fri, Nov 20, 2015 at 2:35 PM, Grygorii Strashko wrote: > Originally OMAP MPUIO GPIO irqchip was implemented using Generic irq > chip, but after set of reworks Generic irq chip code was replaced by > common OMAP GPIO implementation and finally removed by > commit d2d05c65c40e ("gpio: omap: Fix regression for MPUIO interrupts"). > Unfortunately, above commit left .irq_mask/unmask callbacks assigned > as below for MPUIO GPIO case: > irqc->irq_mask = irq_gc_mask_set_bit; > irqc->irq_unmask = irq_gc_mask_clr_bit; > > This now causes boot failure on OMAP1 platforms, after > commit 450fa54cfd66 ("gpio: omap: convert to use generic irq handler") > which forces these callbacks to be called during GPIO IRQs mapping > from gpiochip_irq_map: > > Unable to handle kernel NULL pointer dereference at virtual address > pgd = c0004000 > [] *pgd= > Internal error: Oops: 75 [#1] ARM > Modules linked in: > CPU: 0 PID: 1 Comm: swapper Not tainted > 4.4.0-rc1-e3-los_afe0c+-2-g25379c0-dirty #1 > Hardware name: Amstrad E3 (Delta) > task: c1836000 ti: c1838000 task.ti: c1838000 > PC is at irq_gc_mask_set_bit+0x1c/0x60 > LR is at __irq_do_set_handler+0x118/0x15c > pc : []lr : []psr: 60d3 > sp : c1839c90 ip : c1862c64 fp : c1839c9c > r10: r9 : c0411950 r8 : c0411bbc > r7 : r6 : c185c310 r5 : c00444e8 r4 : c185c300 > r3 : c1854b50 r2 : r1 : r0 : c185c310 > Flags: nZCv IRQs off FIQs off Mode SVC_32 ISA ARM Segment kernel > Control: 317f Table: 10004000 DAC: 0057 > Process swapper (pid: 1, stack limit = 0xc1838190) > Stack: (0xc1839c90 to 0xc183a000) > > [...] > > Backtrace: > [] (irq_gc_mask_set_bit) from [] > (__irq_do_set_handler+0x118/0x15c) > [] (__irq_do_set_handler) from [] > (__irq_set_handler+0x44/0x5c) > r6: r5:c00444e8 r4:c185c300 > [] (__irq_set_handler) from [] > (irq_set_chip_and_handler_name+0x30/0x34) > r7:0050 r6: r5:c00444e8 r4:0050 > [] (irq_set_chip_and_handler_name) from [] > (gpiochip_irq_map+0x3c/0x8c) > r7:0050 r6: r5:0050 r4:c1862c64 > [] (gpiochip_irq_map) from [] > (irq_domain_associate+0x7c/0x1c4) > r5:c185c310 r4:c185cb00 > [] (irq_domain_associate) from [] > (irq_domain_add_simple+0x98/0xc0) > r8:c0411bbc r7:c185cb00 r6:0050 r5:0010 r4:0001 > [] (irq_domain_add_simple) from [] > (_gpiochip_irqchip_add+0x64/0x10c) > r7:c1862c64 r6:c0419280 r5:c1862c64 r4:c1854b50 > [] (_gpiochip_irqchip_add) from [] > (omap_gpio_probe+0x2fc/0x63c) > r5:c1854b50 r4:c1862c10 > [] (omap_gpio_probe) from [] > (platform_drv_probe+0x2c/0x64) > r10: r9:c03e45e8 r8: r7:c0419294 r6:c0411984 r5:c0419294 > r4:c0411950 > [] (platform_drv_probe) from [] (really_probe+0x160/0x29c) > > Hence, fix it by remove obsolete callbacks assignment. After this > change omap_gpio_mask_irq()/omap_gpio_unmask_irq() will be used > for MPUIO IRQs masking, but this now happens anyway from > omap_gpio_irq_startup/shutdown(). > > Cc: Tony Lindgren > Fixes: commit d2d05c65c40e ("gpio: omap: Fix regression for MPUIO interrupts") > Reported-by: Aaro Koskinen > Signed-off-by: Grygorii Strashko Patch applied for fixes. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [4.4-rc][PATCH] gpio: omap: drop omap1 mpuio specific irq_mask/unmask callbacks
Hi, On Fri, Nov 20, 2015 at 03:35:14PM +0200, Grygorii Strashko wrote: > Originally OMAP MPUIO GPIO irqchip was implemented using Generic irq > chip, but after set of reworks Generic irq chip code was replaced by > common OMAP GPIO implementation and finally removed by > commit d2d05c65c40e ("gpio: omap: Fix regression for MPUIO interrupts"). > Unfortunately, above commit left .irq_mask/unmask callbacks assigned > as below for MPUIO GPIO case: > irqc->irq_mask = irq_gc_mask_set_bit; > irqc->irq_unmask = irq_gc_mask_clr_bit; > > This now causes boot failure on OMAP1 platforms, after > commit 450fa54cfd66 ("gpio: omap: convert to use generic irq handler") > which forces these callbacks to be called during GPIO IRQs mapping > from gpiochip_irq_map: > > Unable to handle kernel NULL pointer dereference at virtual address > pgd = c0004000 > [] *pgd= > Internal error: Oops: 75 [#1] ARM > Modules linked in: > CPU: 0 PID: 1 Comm: swapper Not tainted > 4.4.0-rc1-e3-los_afe0c+-2-g25379c0-dirty #1 > Hardware name: Amstrad E3 (Delta) > task: c1836000 ti: c1838000 task.ti: c1838000 > PC is at irq_gc_mask_set_bit+0x1c/0x60 > LR is at __irq_do_set_handler+0x118/0x15c > pc : []lr : []psr: 60d3 > sp : c1839c90 ip : c1862c64 fp : c1839c9c > r10: r9 : c0411950 r8 : c0411bbc > r7 : r6 : c185c310 r5 : c00444e8 r4 : c185c300 > r3 : c1854b50 r2 : r1 : r0 : c185c310 > Flags: nZCv IRQs off FIQs off Mode SVC_32 ISA ARM Segment kernel > Control: 317f Table: 10004000 DAC: 0057 > Process swapper (pid: 1, stack limit = 0xc1838190) > Stack: (0xc1839c90 to 0xc183a000) > > [...] > > Backtrace: > [] (irq_gc_mask_set_bit) from [] > (__irq_do_set_handler+0x118/0x15c) > [] (__irq_do_set_handler) from [] > (__irq_set_handler+0x44/0x5c) > r6: r5:c00444e8 r4:c185c300 > [] (__irq_set_handler) from [] > (irq_set_chip_and_handler_name+0x30/0x34) > r7:0050 r6: r5:c00444e8 r4:0050 > [] (irq_set_chip_and_handler_name) from [] > (gpiochip_irq_map+0x3c/0x8c) > r7:0050 r6: r5:0050 r4:c1862c64 > [] (gpiochip_irq_map) from [] > (irq_domain_associate+0x7c/0x1c4) > r5:c185c310 r4:c185cb00 > [] (irq_domain_associate) from [] > (irq_domain_add_simple+0x98/0xc0) > r8:c0411bbc r7:c185cb00 r6:0050 r5:0010 r4:0001 > [] (irq_domain_add_simple) from [] > (_gpiochip_irqchip_add+0x64/0x10c) > r7:c1862c64 r6:c0419280 r5:c1862c64 r4:c1854b50 > [] (_gpiochip_irqchip_add) from [] > (omap_gpio_probe+0x2fc/0x63c) > r5:c1854b50 r4:c1862c10 > [] (omap_gpio_probe) from [] > (platform_drv_probe+0x2c/0x64) > r10: r9:c03e45e8 r8: r7:c0419294 r6:c0411984 r5:c0419294 > r4:c0411950 > [] (platform_drv_probe) from [] (really_probe+0x160/0x29c) > > Hence, fix it by remove obsolete callbacks assignment. After this > changeomap_gpio_mask_irq()/omap_gpio_unmask_irq() will be used > for MPUIO IRQs masking, but this now happens anyway from > omap_gpio_irq_startup/shutdown(). > > Cc: Tony Lindgren > Fixes: commit d2d05c65c40e ("gpio: omap: Fix regression for MPUIO interrupts") > Reported-by: Aaro Koskinen > Signed-off-by: Grygorii Strashko Tested-by: Aaro Koskinen > --- > drivers/gpio/gpio-omap.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c > index 56d2d02..f7fbb46 100644 > --- a/drivers/gpio/gpio-omap.c > +++ b/drivers/gpio/gpio-omap.c > @@ -1122,8 +1122,6 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, > struct irq_chip *irqc) > /* MPUIO is a bit different, reading IRQ status clears it */ > if (bank->is_mpuio) { > irqc->irq_ack = dummy_irq_chip.irq_ack; > - irqc->irq_mask = irq_gc_mask_set_bit; > - irqc->irq_unmask = irq_gc_mask_clr_bit; > if (!bank->regs->wkup_en) > irqc->irq_set_wake = NULL; > } > -- > 2.6.3 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-omap" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [4.4-rc][PATCH] gpio: omap: drop omap1 mpuio specific irq_mask/unmask callbacks
On 11/20/2015 5:35 AM, Grygorii Strashko wrote: Originally OMAP MPUIO GPIO irqchip was implemented using Generic irq chip, but after set of reworks Generic irq chip code was replaced by common OMAP GPIO implementation and finally removed by commit d2d05c65c40e ("gpio: omap: Fix regression for MPUIO interrupts"). Unfortunately, above commit left .irq_mask/unmask callbacks assigned as below for MPUIO GPIO case: irqc->irq_mask = irq_gc_mask_set_bit; irqc->irq_unmask = irq_gc_mask_clr_bit; This now causes boot failure on OMAP1 platforms, after commit 450fa54cfd66 ("gpio: omap: convert to use generic irq handler") which forces these callbacks to be called during GPIO IRQs mapping from gpiochip_irq_map: Unable to handle kernel NULL pointer dereference at virtual address pgd = c0004000 [] *pgd= Internal error: Oops: 75 [#1] ARM Modules linked in: CPU: 0 PID: 1 Comm: swapper Not tainted 4.4.0-rc1-e3-los_afe0c+-2-g25379c0-dirty #1 Hardware name: Amstrad E3 (Delta) task: c1836000 ti: c1838000 task.ti: c1838000 PC is at irq_gc_mask_set_bit+0x1c/0x60 LR is at __irq_do_set_handler+0x118/0x15c pc : []lr : []psr: 60d3 sp : c1839c90 ip : c1862c64 fp : c1839c9c r10: r9 : c0411950 r8 : c0411bbc r7 : r6 : c185c310 r5 : c00444e8 r4 : c185c300 r3 : c1854b50 r2 : r1 : r0 : c185c310 Flags: nZCv IRQs off FIQs off Mode SVC_32 ISA ARM Segment kernel Control: 317f Table: 10004000 DAC: 0057 Process swapper (pid: 1, stack limit = 0xc1838190) Stack: (0xc1839c90 to 0xc183a000) [...] Backtrace: [] (irq_gc_mask_set_bit) from [] (__irq_do_set_handler+0x118/0x15c) [] (__irq_do_set_handler) from [] (__irq_set_handler+0x44/0x5c) r6: r5:c00444e8 r4:c185c300 [] (__irq_set_handler) from [] (irq_set_chip_and_handler_name+0x30/0x34) r7:0050 r6: r5:c00444e8 r4:0050 [] (irq_set_chip_and_handler_name) from [] (gpiochip_irq_map+0x3c/0x8c) r7:0050 r6: r5:0050 r4:c1862c64 [] (gpiochip_irq_map) from [] (irq_domain_associate+0x7c/0x1c4) r5:c185c310 r4:c185cb00 [] (irq_domain_associate) from [] (irq_domain_add_simple+0x98/0xc0) r8:c0411bbc r7:c185cb00 r6:0050 r5:0010 r4:0001 [] (irq_domain_add_simple) from [] (_gpiochip_irqchip_add+0x64/0x10c) r7:c1862c64 r6:c0419280 r5:c1862c64 r4:c1854b50 [] (_gpiochip_irqchip_add) from [] (omap_gpio_probe+0x2fc/0x63c) r5:c1854b50 r4:c1862c10 [] (omap_gpio_probe) from [] (platform_drv_probe+0x2c/0x64) r10: r9:c03e45e8 r8: r7:c0419294 r6:c0411984 r5:c0419294 r4:c0411950 [] (platform_drv_probe) from [] (really_probe+0x160/0x29c) Hence, fix it by remove obsolete callbacks assignment. After this change omap_gpio_mask_irq()/omap_gpio_unmask_irq() will be used for MPUIO IRQs masking, but this now happens anyway from omap_gpio_irq_startup/shutdown(). Cc: Tony Lindgren Fixes: commit d2d05c65c40e ("gpio: omap: Fix regression for MPUIO interrupts") Reported-by: Aaro Koskinen Signed-off-by: Grygorii Strashko --- Acked-by: Santosh Shilimkar -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html