linux-stable/drivers/pinctrl
Lukas Wunner 9d9fcc11b8 pinctrl: bcm2835: Use raw spinlock for RT compatibility
[ Upstream commit 3c7b30f704 ]

The BCM2835 pinctrl driver acquires a spinlock in its ->irq_enable,
->irq_disable and ->irq_set_type callbacks.  Spinlocks become sleeping
locks with CONFIG_PREEMPT_RT_FULL=y, therefore invocation of one of the
callbacks in atomic context may cause a hard lockup if at least two GPIO
pins in the same bank are used as interrupts.  The issue doesn't occur
with just a single interrupt pin per bank because the lock is never
contended.  I'm experiencing such lockups with GPIO 8 and 28 used as
level-triggered interrupts, i.e. with ->irq_disable being invoked on
reception of every IRQ.

The critical section protected by the spinlock is very small (one bitop
and one RMW of an MMIO register), hence converting to a raw spinlock
seems a better trade-off than converting the driver to threaded IRQ
handling (which would increase latency to handle an interrupt).

Cc: Mathias Duckeck <m.duckeck@kunbus.de>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Acked-by: Julia Cartwright <julia@ni.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-02-12 19:46:57 +01:00
..
actions This is the bulk of pin control changes for v4.19: 2018-08-14 12:31:27 -07:00
aspeed pinctrl: aspeed: Fix documentation 2018-06-28 16:13:12 +02:00
bcm pinctrl: bcm2835: Use raw spinlock for RT compatibility 2019-02-12 19:46:57 +01:00
berlin pinctrl: berlin: fix 'pctrl->functions' allocation in berlin_pinctrl_build_state 2018-08-03 19:28:15 +02:00
cirrus pinctrl: madera: Fix possible NULL pointer with pdata config 2018-08-29 14:02:47 +02:00
freescale pinctrl: freescale: off by one in imx1_pinconf_group_dbg_show() 2018-08-01 23:01:07 +02:00
intel Revert "pinctrl: intel: Do pin translation when lock IRQ" 2018-09-25 12:50:00 +02:00
mediatek This is the bulk of pin control changes for v4.19: 2018-08-14 12:31:27 -07:00
meson pinctrl: meson: fix pull enable register calculation 2019-01-13 09:50:54 +01:00
mvebu pinctrl: armada-37xx: add suspend/resume support 2018-06-29 14:41:10 +02:00
nomadik pinctrl: nomadik: silence uninitialized variable warning 2018-08-10 23:14:04 +02:00
pxa pinctrl: pxa: pxa2xx: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE 2017-11-30 14:42:04 +01:00
qcom pinctrl: ssbi-gpio: Fix pm8xxx_pin_config_get() to be compliant 2018-11-13 11:08:29 -08:00
samsung pinctrl: samsung: Remove duplicated "wakeup" in printk 2018-08-10 23:01:01 +02:00
sh-pfc This is the bulk of pin control changes for v4.19: 2018-08-14 12:31:27 -07:00
sirf treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
spear treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
sprd headers: separate linux/mod_devicetable.h from linux/platform_device.h 2018-07-07 17:52:26 +02:00
stm32 pinctrl: stm32: add syscfg mask parameter 2018-07-29 22:14:59 +02:00
sunxi pinctrl: sunxi: a83t: Fix IRQ offset typo for PH11 2018-12-19 19:19:50 +01:00
tegra pinctrl: tegra: Move drivers registration to arch_init level 2018-08-03 19:17:39 +02:00
ti treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
uniphier Char/Misc driver patches for 4.19-rc1 2018-08-18 11:04:51 -07:00
vt8500 treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
zte treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
core.c pinctrl: core: Return selector to the pinctrl driver 2018-07-17 10:48:25 +02:00
core.h pinctrl: core: Remove broken remove_last group and pinmux functions 2018-07-17 10:49:49 +02:00
devicetree.c pinctrl: Support stopping deferred probe after initcalls 2018-07-10 17:22:35 +02:00
devicetree.h
Kconfig - New Drivers 2018-08-20 15:38:44 -07:00
Makefile Immutable branch (mfd, chrome) due for the v4.19 window 2018-07-27 08:11:37 +01:00
pinconf-generic.c pinctrl: Add skew-delay pin config and bindings 2017-11-08 13:49:45 +01:00
pinconf.c
pinconf.h
pinctrl-amd.c pinctrl/amd: poll InterruptEnable bits in amd_gpio_irq_set_type 2018-09-25 12:39:19 +02:00
pinctrl-amd.h pinctrl/amd: fix gpio irq level in debugfs 2018-07-29 22:20:15 +02:00
pinctrl-artpec6.c pinctrl: artpec-6: Add smaller groups for uarts 2018-03-01 17:04:09 +01:00
pinctrl-as3722.c
pinctrl-at91-pio4.c pinctrl: at91-pio4: Remove redundant return value check 2018-07-16 14:46:11 +02:00
pinctrl-at91.c treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
pinctrl-at91.h
pinctrl-axp209.c pinctrl: axp209: Fix NULL pointer dereference after allocation 2018-08-10 23:12:43 +02:00
pinctrl-coh901.c gpio: Move irqdomain into struct gpio_irq_chip 2017-11-08 14:06:21 +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-digicolor.c treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
pinctrl-falcon.c
pinctrl-gemini.c pinctrl: gemini: Mask properly 2018-06-26 09:51:42 +02:00
pinctrl-ingenic.c pinctrl: ingenic: Fix group & function error checking 2018-08-29 13:43:36 +02:00
pinctrl-lantiq.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
pinctrl-lantiq.h
pinctrl-lpc18xx.c treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
pinctrl-max77620.c pinctrl: max77620: Use common error handling code in max77620_pinconf_set() 2017-11-08 13:49:57 +01:00
pinctrl-mcp23s08.c pinctrl: mcp23s08: fix irq and irqchip setup order 2018-10-10 14:36:35 +02:00
pinctrl-ocelot.c pinctrl: ocelot: add support for interrupt controller 2018-08-06 13:00:17 +02:00
pinctrl-oxnas.c gpio: Move irqdomain into struct gpio_irq_chip 2017-11-08 14:06:21 +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 gpio: Move irqdomain into struct gpio_irq_chip 2017-11-08 14:06:21 +01:00
pinctrl-pic32.h
pinctrl-pistachio.c gpio: Move irqdomain into struct gpio_irq_chip 2017-11-08 14:06:21 +01:00
pinctrl-rk805.c
pinctrl-rockchip.c treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
pinctrl-rza1.c pinctrl: rza1: Fix selector use for groups and functions 2018-07-17 10:49:33 +02:00
pinctrl-single.c This is the bulk of pin control changes for v4.19: 2018-08-14 12:31:27 -07:00
pinctrl-st.c treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
pinctrl-sx150x.c pinctrl: sx150x: Add a static gpio/pinctrl pin range mapping 2018-01-18 11:04:47 +01:00
pinctrl-tb10x.c
pinctrl-u300.c headers: separate linux/mod_devicetable.h from linux/platform_device.h 2018-07-07 17:52:26 +02: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 treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
pinctrl-zynq.c
pinmux.c pinctrl: pinmux: Return selector to the pinctrl driver 2018-07-17 10:48:47 +02:00
pinmux.h pinctrl: core: Remove broken remove_last group and pinmux functions 2018-07-17 10:49:49 +02:00