linux/drivers/pinctrl/mvebu
Vladimir Oltean 984245b66c pinctrl: armada-37xx: make irq_lock a raw spinlock 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(), takes a
plain spinlock, the kind that becomes 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.

Replace the driver's irq_lock with a raw spinlock, to disable preemption
even on RT.

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-2-vladimir.oltean@nxp.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2022-07-19 00:56:01 +02:00
..
Kconfig pinctrl: mvebu: pinctrl driver for 98DX2530 SoC 2022-04-18 01:15:34 +02:00
Makefile pinctrl: mvebu: pinctrl driver for 98DX2530 SoC 2022-04-18 01:15:34 +02:00
pinctrl-ac5.c pinctrl: mvebu: pinctrl driver for 98DX2530 SoC 2022-04-18 01:15:34 +02:00
pinctrl-armada-37xx.c pinctrl: armada-37xx: make irq_lock a raw spinlock to avoid invalid wait context 2022-07-19 00:56:01 +02:00
pinctrl-armada-38x.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pinctrl-armada-39x.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pinctrl-armada-370.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pinctrl-armada-375.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pinctrl-armada-ap806.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pinctrl-armada-cp110.c pinctrl: armada-cp110 - fix MPP54/MPP55 functions 2021-03-10 14:41:12 +01:00
pinctrl-armada-xp.c pinctrl: mvebu: Fix i2c sda definition for 98DX3236 2020-09-12 18:14:39 +02:00
pinctrl-dove.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pinctrl-kirkwood.c This is the bulk of pin control changes for the v5.3 kernel 2019-07-13 15:02:27 -07:00
pinctrl-mvebu.c pinctrl: mvebu: use devm_platform_ioremap_resource() to simplify code 2019-10-24 14:04:13 +02:00
pinctrl-mvebu.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pinctrl-orion.c pinctrl: mvebu: use devm_platform_ioremap_resource() to simplify code 2019-10-24 14:04:13 +02:00