1
linux/drivers/pinctrl
Linus Walleij 1cada2f307 pinctrl: qcom: Assign irq_eoi conditionally
The hierarchical parts of MSM pinctrl/GPIO is only
used when the device tree has a "wakeup-parent" as
a phandle, but the .irq_eoi is anyway assigned leading
to semantic problems on elder Qualcomm chipsets.

When the drivers/mfd/qcom-pm8xxx.c driver calls
chained_irq_exit() that call will in turn call chip->irq_eoi()
which is set to irq_chip_eoi_parent() by default on a
hierachical IRQ chip, and the parent is pinctrl-msm.c
so that will in turn unconditionally call
irq_chip_eoi_parent() again, but its parent is invalid
so we get the following crash:

 Unnable to handle kernel NULL pointer dereference at
 virtual address 00000010
 pgd = (ptrval)
 [00000010] *pgd=00000000
 Internal error: Oops: 5 [#1] PREEMPT SMP ARM
 (...)
 PC is at irq_chip_eoi_parent+0x4/0x10
 LR is at pm8xxx_irq_handler+0x1b4/0x2d8

If we solve this crash by avoiding to call up to
irq_chip_eoi_parent(), the machine will hang and get
reset by the watchdog, because of semantic issues,
probably inside irq_chip.

As a solution, just assign the .irq_eoi conditionally if
we are actually using a wakeup parent.

Cc: David Heidelberg <david@ixit.cz>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Lina Iyer <ilina@codeaurora.org>
Cc: Stephen Boyd <swboyd@chromium.org>
Cc: stable@vger.kernel.org
Fixes: e35a6ae0eb ("pinctrl/msm: Setup GPIO chip in hierarchy")
Link: https://lore.kernel.org/r/20200306121221.1231296-1-linus.walleij@linaro.org
Link: https://lore.kernel.org/r/20200309125207.571840-1-linus.walleij@linaro.org
Link: https://lore.kernel.org/r/20200309152604.585112-1-linus.walleij@linaro.org
Tested-by: David Heidelberg <david@ixit.cz>
Acked-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2020-03-09 16:31:34 +01:00
..
actions pinctrl: actions: remove duplicate dsi entry 2020-01-07 00:22:57 +01:00
aspeed Linux 5.5-rc3 2019-12-29 00:30:37 +01:00
bcm This is the bulk of pin control changes for the v5.6 kernel cycle: 2020-01-29 09:51:36 -08:00
berlin pinctrl: berlin: as370: fix a typo s/spififib/spdifib 2019-10-16 14:12:55 +02:00
cirrus pinctrl: madera: Add missing call to pinctrl_unregister_mappings 2020-02-29 00:34:23 +01:00
freescale pinctrl: imx: scu: Align imx sc msg structs to 4 2020-02-21 16:33:27 +01:00
intel pinctrl: tigerlake: Tiger Lake uses _HID enumeration 2020-01-16 13:30:40 +02:00
mediatek pinctrl: mediatek: Use the correct style for SPDX License Identifier 2019-12-12 11:30:33 +01:00
meson pinctrl: meson-gxl: fix GPIOX sdio pins 2020-02-21 16:28:16 +01:00
mvebu pinctrl: mvebu: armada-37xx: use use platform api 2020-01-23 16:06:11 +01:00
nomadik pinctrl: nomadik: db8500: Add mc0_a_2 pin group without direction control 2019-11-19 15:49:22 +01:00
nuvoton pinctrl: nuvoton: npcm7xx: constify copied structure 2020-01-07 13:55:55 +01:00
pxa pinctrl: fix pxa2xx.c build warnings 2020-02-04 03:05:24 +00:00
qcom pinctrl: qcom: Assign irq_eoi conditionally 2020-03-09 16:31:34 +01:00
samsung pinctrl: samsung: Fix missing OF and GPIOLIB dependency on S3C24xx and S3C64xx 2019-12-15 12:47:52 +01:00
sh-pfc pinctrl: sh-pfc: Split R-Car H3 support in two independent drivers 2020-01-08 09:56:28 +01:00
sirf
spear pinctrl: use devm_platform_ioremap_resource() to simplify code 2019-11-05 15:33:40 +01:00
sprd pinctrl: sprd: Add CM4 sleep mode support 2019-10-16 16:01:24 +02:00
stm32 pinctrl: stm32: Use the correct style for SPDX License Identifier 2019-12-12 11:33:51 +01:00
sunxi pinctrl: sunxi: sun50i-h5 use platform_irq_count 2020-01-07 09:55:33 +01:00
tegra pinctrl: tegra: fix missing __iomem in suspend/resume 2020-01-07 00:01:09 +01:00
ti
uniphier
vt8500 pinctrl: use devm_platform_ioremap_resource() to simplify code 2019-11-05 15:33:40 +01:00
zte pinctrl: use devm_platform_ioremap_resource() to simplify code 2019-11-05 15:33:40 +01:00
core.c pinctrl: core: Remove extra kref_get which blocks hogs being freed 2020-02-29 00:32:41 +01:00
core.h pinctrl: Allow modules to use pinctrl_[un]register_mappings 2019-12-30 14:27:17 +01:00
devicetree.c pinctrl: Allow modules to use pinctrl_[un]register_mappings 2019-12-30 14:27:17 +01:00
devicetree.h
Kconfig pinctrl: ingenic: Fixup PIN_CONFIG_OUTPUT config 2019-12-16 11:38:20 +01:00
Makefile pinctrl: Add pinmux & GPIO controller driver for a new SoC 2019-11-21 14:47:44 +01:00
pinconf-generic.c
pinconf.c
pinconf.h
pinctrl-amd.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
pinctrl-amd.h
pinctrl-artpec6.c pinctrl: artpec6: fix __iomem on reg in set 2020-01-07 13:57:17 +01:00
pinctrl-as3722.c
pinctrl-at91-pio4.c pinctrl: use devm_platform_ioremap_resource() to simplify code 2019-11-05 15:33:40 +01:00
pinctrl-at91.c pinctrl: use devm_platform_ioremap_resource() to simplify code 2019-11-05 15:33:40 +01:00
pinctrl-at91.h
pinctrl-axp209.c
pinctrl-bm1880.c pinctrl: use devm_platform_ioremap_resource() to simplify code 2019-11-05 15:33:40 +01:00
pinctrl-coh901.c pinctrl: use devm_platform_ioremap_resource() to simplify code 2019-11-05 15:33:40 +01:00
pinctrl-coh901.h
pinctrl-da850-pupd.c pinctrl: use devm_platform_ioremap_resource() to simplify code 2019-11-05 15:33:40 +01:00
pinctrl-digicolor.c pinctrl: use devm_platform_ioremap_resource() to simplify code 2019-11-05 15:33:40 +01:00
pinctrl-equilibrium.c pinctrl: Fix warning by adding missing MODULE_LICENSE 2019-11-28 09:12:43 +01:00
pinctrl-equilibrium.h pinctrl: Add pinmux & GPIO controller driver for a new SoC 2019-11-21 14:47:44 +01:00
pinctrl-falcon.c pinctrl: falcon: fix syntax error 2020-03-09 13:52:37 +01:00
pinctrl-gemini.c
pinctrl-ingenic.c pinctrl: ingenic: Use devm_platform_ioremap_resource() 2020-01-07 13:57:17 +01:00
pinctrl-lantiq.c
pinctrl-lantiq.h
pinctrl-lpc18xx.c pinctrl: use devm_platform_ioremap_resource() to simplify code 2019-11-05 15:33:40 +01:00
pinctrl-max77620.c
pinctrl-mcp23s08.c
pinctrl-ocelot.c pinctrl: ocelot: Pass irqchip when adding gpiochip 2019-10-16 15:03:40 +02:00
pinctrl-oxnas.c pinctrl: use devm_platform_ioremap_resource() to simplify code 2019-11-05 15:33:40 +01:00
pinctrl-palmas.c
pinctrl-pic32.c pinctrl: use devm_platform_ioremap_resource() to simplify code 2019-11-05 15:33:40 +01:00
pinctrl-pic32.h
pinctrl-pistachio.c pinctrl: use devm_platform_ioremap_resource() to simplify code 2019-11-05 15:33:40 +01:00
pinctrl-rk805.c
pinctrl-rockchip.c pinctrl: rockchip: add rk3308 SoC support 2019-10-16 15:56:19 +02:00
pinctrl-rza1.c pinctrl: rza1: Reduce printed messages 2019-12-20 15:48:14 +01:00
pinctrl-rza2.c pinctrl: use devm_platform_ioremap_resource() to simplify code 2019-11-05 15:33:40 +01:00
pinctrl-rzn1.c
pinctrl-single.c
pinctrl-st.c pinctrl: st: Pass irqchip when adding gpiochip 2019-10-16 13:45:27 +02:00
pinctrl-stmfx.c This is the bulk of pin control changes for the v5.5 kernel 2019-11-27 10:00:33 -08:00
pinctrl-sx150x.c
pinctrl-tb10x.c pinctrl: use devm_platform_ioremap_resource() to simplify code 2019-11-05 15:33:40 +01:00
pinctrl-u300.c pinctrl: use devm_platform_ioremap_resource() to simplify code 2019-11-05 15:33:40 +01:00
pinctrl-utils.c
pinctrl-utils.h
pinctrl-xway.c pinctrl: use devm_platform_ioremap_resource() to simplify code 2019-11-05 15:33:40 +01:00
pinctrl-zynq.c
pinmux.c pinctrl: pinmux: fix a possible null pointer in pinmux_can_be_used_for_gpio 2019-12-13 10:57:23 +01:00
pinmux.h