[PATCH] pinctrl: samsung: use raw_spinlock for locking

Linus Walleij linus.walleij at linaro.org
Sat Jan 23 17:34:05 EST 2021


On Thu, Jan 21, 2021 at 4:00 AM Chanho Park <chanho61.park at samsung.com> wrote:

> 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 at gmail.com>
> Cc: Krzysztof Kozlowski <krzk at kernel.org>
> Cc: Sylwester Nawrocki <s.nawrocki at samsung.com>
> Cc: Linus Walleij <linus.walleij at linaro.org>
> Signed-off-by: Chanho Park <chanho61.park at samsung.com>

Patch applied!

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list