WSL2-Linux-Kernel/drivers/pinctrl
Vladimir Oltean fad55088ad pinctrl: armada-37xx: use raw spinlocks for regmap to avoid invalid wait context
[ Upstream commit 4546760619 ]

The irqchip->irq_set_type method is called by __irq_set_trigger() under
the desc->lock raw spinlock.

The armada-37xx implementation, armada_37xx_irq_set_type(), uses an MMIO
regmap created by of_syscon_register(), which uses plain spinlocks
(the kind that are sleepable on RT).

Therefore, this is an invalid locking scheme for which we get a kernel
splat stating just that ("[ BUG: Invalid wait context ]"), because the
context in which the plain spinlock may sleep is atomic due to the raw
spinlock. We need to go raw spinlocks all the way.

Make this driver create its own MMIO regmap, with use_raw_spinlock=true,
and stop relying on syscon to provide it.

This patch depends on commit 67021f25d9 ("regmap: teach regmap to use
raw spinlocks if requested in the config").

Cc: <stable@vger.kernel.org> # 5.15+
Fixes: 2f22760539 ("pinctrl: armada-37xx: Add irqchip support")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20220716233745.1704677-3-vladimir.oltean@nxp.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-07-29 17:25:20 +02:00
..
actions pinctrl: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:39 +01:00
aspeed pinctrl: aspeed: Fix potential NULL dereference in aspeed_pinmux_set_mux() 2022-07-21 21:24:36 +02:00
bcm pinctrl: bcm2835: implement hook for missing gpio-ranges 2022-06-09 10:23:07 +02:00
berlin
cirrus
freescale pinctrl: imx8dxl: Constify imx_pinctrl_soc_info 2021-07-30 12:06:02 +02:00
intel pinctrl: tigerlake: Revert "Add Alder Lake-M ACPI ID" 2022-03-16 14:23:40 +01:00
mediatek pinctrl: mediatek: mt8195: enable driver on mtk platforms 2022-06-09 10:23:07 +02:00
meson pinctrl/meson: enable building as modules 2020-11-05 14:51:38 +01:00
mvebu pinctrl: armada-37xx: use raw spinlocks for regmap to avoid invalid wait context 2022-07-29 17:25:20 +02:00
nomadik pinctrl: nomadik: Add missing of_node_put() in nmk_pinctrl_probe 2022-04-08 14:23:50 +02:00
nuvoton pinctrl: nuvoton: npcm7xx: Use %zu printk format for ARRAY_SIZE() 2022-04-08 14:24:11 +02:00
pxa pinctrl: Introduce MODE group in enum pin_config_param 2021-04-22 02:03:01 +02:00
qcom pinctrl: qcom: fix unmet dependencies on GPIOLIB for GPIOLIB_IRQCHIP 2021-12-08 09:04:38 +01:00
ralink pinctrl: ralink: Check for null return of devm_kcalloc 2022-07-29 17:25:10 +02:00
renesas pinctrl: renesas: core: Fix possible null-ptr-deref in sh_pfc_map_resources() 2022-06-09 10:23:09 +02:00
samsung pinctrl: samsung: fix missing GPIOLIB on ARM64 Exynos config 2022-05-09 09:14:30 +02:00
spear pinctrl: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:39 +01:00
sprd pinctrl: sprd: Simplify bool comparison 2021-01-18 14:41:42 +01:00
stm32 pinctrl: stm32: fix optional IRQ support to gpios 2022-07-29 17:25:05 +02:00
sunxi pinctrl: sunxi: sunxi_pconf_set: use correct offset 2022-07-12 16:35:14 +02:00
tegra
ti pinctrl: ti: fix error return code of ti_iodelay_dt_node_to_map() 2021-04-08 15:57:14 +02:00
uniphier
visconti gpio: visconti: Add Toshiba Visconti GPIO support 2021-02-15 11:43:26 +01:00
vt8500
Kconfig pinctrl: Add Intel Keem Bay pinctrl driver 2021-08-11 15:13:14 +02:00
Makefile pinctrl: Add Intel Keem Bay pinctrl driver 2021-08-11 15:13:14 +02:00
core.c pinctrl: core: fix possible memory leak in pinctrl_enable() 2021-11-18 19:16:06 +01:00
core.h
devicetree.c pinctrl: devicetree: Keep deferring even on timeout 2020-09-12 18:19:53 +02:00
devicetree.h
pinconf-generic.c pinctrl: pinconf-generic: Print arguments for bias-pull-* 2022-04-08 14:24:11 +02:00
pinconf.c pinctrl: use to octal permissions for debugfs files 2021-03-10 14:41:58 +01:00
pinconf.h
pinctrl-amd.c pinctrl: amd: Fix wakeups when IRQ is shared with SCI 2021-12-22 09:32:37 +01:00
pinctrl-amd.h pinctrl: amd: Add irq field data 2021-09-17 00:48:45 +02:00
pinctrl-artpec6.c
pinctrl-as3722.c
pinctrl-at91-pio4.c pinctrl: at91-pio4: Fix slew rate disablement 2021-04-13 09:42:18 +02:00
pinctrl-at91.c pinctrl: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:39 +01:00
pinctrl-at91.h
pinctrl-axp209.c
pinctrl-bm1880.c
pinctrl-da850-pupd.c
pinctrl-da9062.c
pinctrl-digicolor.c
pinctrl-equilibrium.c pinctrl: equilibrium: Fix function addition in multiple groups 2021-11-18 19:16:55 +01:00
pinctrl-equilibrium.h
pinctrl-falcon.c pinctrl: falcon: add missing put_device() call in pinctrl_falcon_probe() 2020-12-04 09:17:51 +01:00
pinctrl-gemini.c
pinctrl-ingenic.c pinctrl: ingenic: Fix regmap on X series SoCs 2022-04-08 14:22:52 +02:00
pinctrl-k210.c pinctrl: k210: Fix bias-pull-up 2022-03-02 11:48:09 +01:00
pinctrl-keembay.c pinctrl: Add Intel Keem Bay pinctrl driver 2021-08-11 15:13:14 +02:00
pinctrl-lantiq.c
pinctrl-lantiq.h
pinctrl-lpc18xx.c pinctrl: Introduce MODE group in enum pin_config_param 2021-04-22 02:03:01 +02:00
pinctrl-max77620.c
pinctrl-mcp23s08.c pinctrl: mcp23s08: Add optional reset GPIO 2021-06-12 01:58:10 +02:00
pinctrl-mcp23s08.h pinctrl: mcp23s08: Add optional reset GPIO 2021-06-12 01:58:10 +02:00
pinctrl-mcp23s08_i2c.c
pinctrl-mcp23s08_spi.c pinctrl: mcp23s08: Print error message when regmap init fails 2020-11-05 11:30:31 +01:00
pinctrl-microchip-sgpio.c pinctrl: microchip-sgpio: lock RMW access 2022-04-08 14:23:49 +02:00
pinctrl-ocelot.c pinctrl: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:39 +01:00
pinctrl-oxnas.c pinctrl: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:39 +01:00
pinctrl-palmas.c
pinctrl-pic32.c pinctrl: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:39 +01:00
pinctrl-pic32.h
pinctrl-pistachio.c pinctrl: pistachio: fix use of irq_of_parse_and_map() 2022-05-09 09:14:36 +02:00
pinctrl-rk805.c
pinctrl-rockchip.c pinctrl/rockchip: support setting input-enable param 2022-06-09 10:23:32 +02:00
pinctrl-rockchip.h pinctrl/rockchip: support deferring other gpio params 2022-06-09 10:23:07 +02:00
pinctrl-single.c This is the bulk of pin control changes for the v5.15 kernel cycle, 2021-09-02 14:22:56 -07:00
pinctrl-st.c pinctrl: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:39 +01:00
pinctrl-stmfx.c pinctrl: stmfx: Fix hazardous u8[] to unsigned long cast 2021-08-10 14:47:59 +02:00
pinctrl-sx150x.c pinctrl: remove empty lines in pinctrl subsystem 2021-01-05 16:09:24 +01:00
pinctrl-tb10x.c
pinctrl-utils.c pinctrl: use krealloc_array() 2020-12-15 12:13:37 -08:00
pinctrl-utils.h
pinctrl-xway.c
pinctrl-zynq.c pinctrl: pinctrl-zynq: Add support for 'power-source' parameter 2021-07-30 14:40:42 +02:00
pinctrl-zynqmp.c pinctrl: zynqmp: Drop pinctrl_unregister for devm_ registered device 2021-08-11 15:09:22 +02:00
pinmux.c pinctrl: pinmux: Add pinmux-select debugfs file 2021-03-10 14:41:58 +01:00
pinmux.h