linux-sg2042/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 pinctrl: sirf/atlas7: Pass irqchip when adding gpiochip 2019-09-30 23:13:08 +02:00
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 pinctl: ti: iodelay: fix error checking on pinctrl_count_index_with_args call 2019-10-04 23:08:47 +02:00
uniphier pinctrl: uniphier: Fix Pro5 SD pin-mux setting 2019-08-05 13:21:31 +02:00
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
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
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 pinctrl: devicetree.c: remove orphan pinctrl_dt_has_hogs() 2019-10-04 23:26:23 +02:00
pinconf-generic.c This is the bulk of pin control changes for the v5.3 kernel 2019-07-13 15:02:27 -07:00
pinconf.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
pinconf.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
pinctrl-amd.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
pinctrl-amd.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 422 2019-06-05 17:37:15 +02:00
pinctrl-artpec6.c pinctrl: artpec6: fix __iomem on reg in set 2020-01-07 13:57:17 +01:00
pinctrl-as3722.c pinctrl: Include <linux/gpio/driver.h> nothing else 2018-09-14 15:10:57 +02:00
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 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pinctrl-axp209.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
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: gemini: Fix up TVC clock group 2018-10-10 21:05:35 +02:00
pinctrl-ingenic.c pinctrl: ingenic: Use devm_platform_ioremap_resource() 2020-01-07 13:57:17 +01:00
pinctrl-lantiq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 332 2019-06-05 17:37:06 +02:00
pinctrl-lantiq.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 332 2019-06-05 17:37:06 +02:00
pinctrl-lpc18xx.c pinctrl: use devm_platform_ioremap_resource() to simplify code 2019-11-05 15:33:40 +01:00
pinctrl-max77620.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 422 2019-06-05 17:37:15 +02:00
pinctrl-mcp23s08.c pinctrl: mcp23s08: Fix add_data and irqchip_add_nested call order 2019-06-25 14:14:26 +02:00
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: palmas: Delete an error message for a failed memory allocation in palmas_pinctrl_probe() 2018-01-03 08:46:49 +01:00
pinctrl-pic32.c pinctrl: use devm_platform_ioremap_resource() to simplify code 2019-11-05 15:33:40 +01:00
pinctrl-pic32.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 445 2019-06-05 17:37:18 +02:00
pinctrl-pistachio.c pinctrl: use devm_platform_ioremap_resource() to simplify code 2019-11-05 15:33:40 +01:00
pinctrl-rk805.c pinctrl: rk805: Make structures constant 2019-08-21 09:00:16 +02:00
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: rzn1: Make array reg_drive static, makes object smaller 2019-10-14 12:11:12 +02:00
pinctrl-single.c pinctrl: Convert to using %pOFn instead of device_node.name 2018-08-29 14:05:36 +02:00
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 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
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: Delete an error message for a failed memory allocation in pinctrl_utils_add_map_configs() 2018-01-03 08:46:53 +01:00
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 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
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 pinctrl/gpio: Take MUX usage into account 2019-08-23 11:09:41 +02:00