WSL2-Linux-Kernel/drivers/gpio
Grygorii Strashko 000255b7df gpio: omap: drop omap1 mpuio specific irq_mask/unmask callbacks
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 d2d05c65c4 ("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 450fa54cfd ("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 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 75 [#1] ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Not tainted 4.4.0-rc1-e3-los_afe0c+-00002-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 : [<c004848c>]    lr : [<c0047d4c>]    psr: 600000d3
sp : c1839c90  ip : c1862c64  fp : c1839c9c
r10: 00000000  r9 : c0411950  r8 : c0411bbc
r7 : 00000000  r6 : c185c310  r5 : c00444e8  r4 : c185c300
r3 : c1854b50  r2 : 00000000  r1 : 00000000  r0 : c185c310
Flags: nZCv  IRQs off  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
Control: 0000317f  Table: 10004000  DAC: 00000057
Process swapper (pid: 1, stack limit = 0xc1838190)
Stack: (0xc1839c90 to 0xc183a000)

[...]

Backtrace:
[<c0048470>] (irq_gc_mask_set_bit) from [<c0047d4c>] (__irq_do_set_handler+0x118/0x15c)
[<c0047c34>] (__irq_do_set_handler) from [<c0047dd4>] (__irq_set_handler+0x44/0x5c)
 r6:00000000 r5:c00444e8 r4:c185c300
[<c0047d90>] (__irq_set_handler) from [<c0047e1c>] (irq_set_chip_and_handler_name+0x30/0x34)
 r7:00000050 r6:00000000 r5:c00444e8 r4:00000050
[<c0047dec>] (irq_set_chip_and_handler_name) from [<c01b345c>] (gpiochip_irq_map+0x3c/0x8c)
 r7:00000050 r6:00000000 r5:00000050 r4:c1862c64
[<c01b3420>] (gpiochip_irq_map) from [<c0049670>] (irq_domain_associate+0x7c/0x1c4)
 r5:c185c310 r4:c185cb00
[<c00495f4>] (irq_domain_associate) from [<c0049894>] (irq_domain_add_simple+0x98/0xc0)
 r8:c0411bbc r7:c185cb00 r6:00000050 r5:00000010 r4:00000001
[<c00497fc>] (irq_domain_add_simple) from [<c01b3328>] (_gpiochip_irqchip_add+0x64/0x10c)
 r7:c1862c64 r6:c0419280 r5:c1862c64 r4:c1854b50
[<c01b32c4>] (_gpiochip_irqchip_add) from [<c01b79f4>] (omap_gpio_probe+0x2fc/0x63c)
 r5:c1854b50 r4:c1862c10
[<c01b76f8>] (omap_gpio_probe) from [<c01fcf58>] (platform_drv_probe+0x2c/0x64)
 r10:00000000 r9:c03e45e8 r8:00000000 r7:c0419294 r6:c0411984 r5:c0419294
 r4:c0411950
[<c01fcf2c>] (platform_drv_probe) from [<c01fb668>] (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 <tony@atomide.com>
Fixes: commit d2d05c65c4 ("gpio: omap: Fix regression for MPUIO interrupts")
Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-11-30 13:50:21 +01:00
..
Kconfig gpio: fix up SPI submenu 2015-11-01 10:50:19 +01:00
Makefile gpio: Add GPIO support for the ACCES 104-IDIO-16 2015-10-27 11:01:19 +01:00
devres.c
gpio-74x164.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
gpio-74xx-mmio.c gpio: 74xx: fix a possible NULL dereference 2015-11-17 14:39:17 +01:00
gpio-104-idio-16.c gpio: Add GPIO support for the ACCES 104-IDIO-16 2015-10-27 11:01:19 +01:00
gpio-adnp.c
gpio-adp5520.c
gpio-adp5588.c
gpio-altera.c gpio: altera: use container_of() to get state container 2015-10-02 04:19:32 -07:00
gpio-amd8111.c
gpio-amdpt.c gpio: driver for AMD Promontory 2015-10-26 14:45:26 +01:00
gpio-arizona.c gpio: arizona: add support for WM8998 and WM1814 2015-10-02 04:19:34 -07:00
gpio-ath79.c gpio: ath79: Convert to the state container design pattern 2015-10-02 04:19:34 -07:00
gpio-bcm-kona.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
gpio-brcmstb.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
gpio-bt8xx.c
gpio-clps711x.c
gpio-crystalcove.c
gpio-cs5535.c
gpio-da9052.c
gpio-da9055.c
gpio-davinci.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
gpio-dln2.c
gpio-dwapb.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
gpio-em.c
gpio-ep93xx.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
gpio-etraxfs.c gpio: etraxfs: use container_of() to get state container 2015-10-02 04:19:31 -07:00
gpio-f7188x.c
gpio-ge.c
gpio-generic.c gpio: generic: Revert to old error handling in bgpio_map 2015-10-27 11:26:31 +01:00
gpio-grgpio.c
gpio-ich.c
gpio-intel-mid.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
gpio-iop.c
gpio-it87.c gpio: add GPIO support for IT87xx, replacing gpio-it8761e 2015-10-02 04:19:35 -07:00
gpio-janz-ttl.c
gpio-kempld.c
gpio-ks8695.c
gpio-loongson.c
gpio-lp3943.c
gpio-lpc18xx.c gpio: replace trivial implementations of request/free with generic one 2015-10-16 22:13:43 +02:00
gpio-lpc32xx.c
gpio-lynxpoint.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
gpio-max730x.c gpio: max730x: eliminate double free 2015-10-02 15:06:41 -07:00
gpio-max732x.c
gpio-max7300.c
gpio-max7301.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
gpio-mb86s7x.c
gpio-mc9s08dz60.c
gpio-mc33880.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
gpio-mcp23s08.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
gpio-ml-ioh.c
gpio-mm-lantiq.c
gpio-moxart.c gpio: replace trivial implementations of request/free with generic one 2015-10-16 22:13:43 +02:00
gpio-mpc8xxx.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
gpio-mpc5200.c
gpio-msic.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
gpio-mvebu.c gpio: replace trivial implementations of request/free with generic one 2015-10-16 22:13:43 +02:00
gpio-mxc.c gpio-mxc: stop including <asm-generic/bug> 2015-10-15 00:21:12 +02:00
gpio-mxs.c Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-09-18 08:11:42 -07:00
gpio-octeon.c
gpio-omap.c gpio: omap: drop omap1 mpuio specific irq_mask/unmask callbacks 2015-11-30 13:50:21 +01:00
gpio-palmas.c gpio: palmas: fix a possible NULL dereference 2015-11-17 14:40:24 +01:00
gpio-pca953x.c gpio: pca953x: support ACPI devices found on Galileo Gen2 2015-10-05 10:57:22 +02:00
gpio-pcf857x.c
gpio-pch.c
gpio-pl061.c gpio: pl061: use the generic request/free implementations 2015-10-16 22:17:14 +02:00
gpio-pxa.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
gpio-rc5t583.c
gpio-rcar.c
gpio-rdc321x.c
gpio-sa1100.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
gpio-samsung.c
gpio-sch.c
gpio-sch311x.c
gpio-sodaville.c irqdomain: Use irq_domain_get_of_node() instead of direct field access 2015-10-13 19:01:23 +02:00
gpio-spear-spics.c
gpio-sta2x11.c
gpio-stmpe.c
gpio-stp-xway.c
gpio-sx150x.c gpio: sx150x: use container_of() to get state container 2015-10-02 04:19:32 -07:00
gpio-syscon.c gpio: syscon: fix a possible NULL dereference 2015-11-17 14:39:22 +01:00
gpio-tb10x.c gpio: replace trivial implementations of request/free with generic one 2015-10-16 22:13:43 +02:00
gpio-tc3589x.c
gpio-tegra.c gpio-tegra: Do not create the debugfs entry by default 2015-11-17 15:18:51 +01:00
gpio-timberdale.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
gpio-tps6586x.c
gpio-tps65910.c
gpio-tps65912.c
gpio-ts5500.c
gpio-twl4030.c
gpio-twl6040.c
gpio-tz1090-pdc.c gpio: replace trivial implementations of request/free with generic one 2015-10-16 22:13:43 +02:00
gpio-tz1090.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
gpio-ucb1400.c
gpio-vf610.c gpio: replace trivial implementations of request/free with generic one 2015-10-16 22:13:43 +02:00
gpio-viperboard.c
gpio-vr41xx.c
gpio-vx855.c
gpio-wm831x.c
gpio-wm8350.c
gpio-wm8994.c
gpio-xgene-sb.c
gpio-xgene.c
gpio-xilinx.c
gpio-xlp.c gpio: xlp: Convert to use gpiolib irqchip helpers 2015-10-22 14:36:41 +02:00
gpio-xtensa.c
gpio-zevio.c
gpio-zx.c gpio: gpio-xz: use the generic request/free implementations 2015-10-16 22:15:51 +02:00
gpio-zynq.c gpio: zynq: use container_of() to get state container 2015-10-02 04:19:33 -07:00
gpiolib-acpi.c Power management and ACPI updates for v4.4-rc1 2015-11-04 18:10:13 -08:00
gpiolib-legacy.c gpiolib: Split GPIO flags parsing and GPIO configuration 2015-10-16 22:46:46 +02:00
gpiolib-of.c gpiolib-of: Rename gpio_hog functions to be generic 2015-09-24 10:48:51 -07:00
gpiolib-sysfs.c Revert "gpio-sysfs: Use gpio descriptor name instead of gpiochip names array" 2015-10-05 13:07:47 +02:00
gpiolib.c gpiolib: fix oops, if gpio name is NULL 2015-11-29 22:17:40 +01:00
gpiolib.h Power management and ACPI updates for v4.4-rc1 2015-11-04 18:10:13 -08:00