linux-stable/drivers/pinctrl
Vladimir Oltean 4546760619 pinctrl: armada-37xx: use raw spinlocks for regmap to avoid invalid wait context
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>
2022-07-19 00:57:38 +02:00
..
actions
aspeed pinctrl: aspeed: Fix potential NULL dereference in aspeed_pinmux_set_mux() 2022-06-15 15:19:57 +02:00
bcm
berlin
cirrus
freescale pinctrl: imx: Add the zero base flag for imx93 2022-06-28 15:15:03 +02:00
intel
mediatek Pin control bulk changes for the v5.19 series: 2022-05-28 11:15:54 -07:00
meson
mvebu pinctrl: armada-37xx: use raw spinlocks for regmap to avoid invalid wait context 2022-07-19 00:57:38 +02:00
nomadik
nuvoton Pin control bulk changes for the v5.19 series: 2022-05-28 11:15:54 -07:00
pxa
qcom
ralink pinctrl: ralink: Check for null return of devm_kcalloc 2022-07-11 14:40:17 +02:00
renesas
samsung gpio updates for v5.19 2022-05-26 14:51:38 -07:00
spear
sprd
stm32 pinctrl: stm32: fix optional IRQ support to gpios 2022-06-28 16:12:40 +02:00
sunplus pinctrl: sunplus: Add check for kcalloc 2022-07-11 15:04:19 +02:00
sunxi pinctrl: sunxi: sunxi_pconf_set: use correct offset 2022-06-27 11:27:10 +02:00
tegra
ti
uniphier
visconti
vt8500
core.c
core.h
devicetree.c
devicetree.h
Kconfig pinctrl: Don't allow PINCTRL_AMD to be a module 2022-07-18 12:47:28 +02:00
Makefile
pinconf-generic.c
pinconf.c
pinconf.h
pinctrl-amd.c
pinctrl-amd.h
pinctrl-apple-gpio.c
pinctrl-artpec6.c
pinctrl-as3722.c
pinctrl-at91-pio4.c
pinctrl-at91.c
pinctrl-at91.h
pinctrl-axp209.c
pinctrl-bm1880.c
pinctrl-da850-pupd.c
pinctrl-da9062.c
pinctrl-digicolor.c
pinctrl-equilibrium.c
pinctrl-equilibrium.h
pinctrl-falcon.c
pinctrl-gemini.c
pinctrl-ingenic.c
pinctrl-k210.c
pinctrl-keembay.c
pinctrl-lantiq.c
pinctrl-lantiq.h
pinctrl-lpc18xx.c
pinctrl-max77620.c
pinctrl-mcp23s08.c
pinctrl-mcp23s08.h
pinctrl-mcp23s08_i2c.c
pinctrl-mcp23s08_spi.c
pinctrl-microchip-sgpio.c
pinctrl-ocelot.c pinctrl: ocelot: Fix pincfg 2022-07-18 11:22:43 +02:00
pinctrl-oxnas.c
pinctrl-palmas.c
pinctrl-pic32.c
pinctrl-pic32.h
pinctrl-pistachio.c
pinctrl-rk805.c
pinctrl-rockchip.c
pinctrl-rockchip.h
pinctrl-single.c
pinctrl-st.c
pinctrl-starfive.c
pinctrl-stmfx.c
pinctrl-sx150x.c
pinctrl-tb10x.c
pinctrl-thunderbay.c
pinctrl-utils.c
pinctrl-utils.h
pinctrl-xway.c
pinctrl-zynq.c
pinctrl-zynqmp.c
pinmux.c
pinmux.h