[PATCH] pinctrl: samsung: use raw_spinlock for locking
Linus Walleij
linus.walleij at linaro.org
Fri Jan 22 08:15:18 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>
Looks correct to me.
Reviewed-by: Linus Walleij <linus.walleij at linaro.org>
Krzysztof, will you collect Samsung patches for this merge window or
shall I apply it directly?
Yours,
Linus Walleij
More information about the linux-arm-kernel
mailing list