]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: samsung: use raw_spinlock for locking
authorChanho Park <chanho61.park@samsung.com>
Thu, 21 Jan 2021 03:00:09 +0000 (12:00 +0900)
committerLinus Walleij <linus.walleij@linaro.org>
Sat, 23 Jan 2021 22:33:35 +0000 (23:33 +0100)
commit1f306ecbe0f66681bd87a2bb9013630233a32f7f
treeb2e6255004453f22125882ed319f6ce1620b6c70
parentcd4919105c8f36378afba4cf0e9c869d523b4d6d
pinctrl: samsung: use raw_spinlock for locking

This patch converts spin_[lock|unlock] functions of pin bank to
raw_spinlock to support preempt-rt. This can avoid BUG() assertion when
irqchip callbacks are triggerred. Spinlocks can be converted rt_mutex
which is preemptible when we apply preempt-rt patches.

According to "Documentation/driver-api/gpio/driver.rst",

"Realtime considerations: a realtime compliant GPIO driver should not
use spinlock_t or any sleepable APIs (like PM runtime) as part of its
irqchip implementation.

- spinlock_t should be replaced with raw_spinlock_t.[1]
"

Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20210121030009.25673-1-chanho61.park@samsung.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/samsung/pinctrl-exynos.c
drivers/pinctrl/samsung/pinctrl-s3c24xx.c
drivers/pinctrl/samsung/pinctrl-samsung.c
drivers/pinctrl/samsung/pinctrl-samsung.h