]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
gpio: aspeed-sgpio: Convert aspeed_sgpio.lock to raw_spinlock
authorIwona Winiarska <iwona.winiarska@intel.com>
Sat, 4 Dec 2021 17:10:27 +0000 (18:10 +0100)
committerPaolo Pisati <paolo.pisati@canonical.com>
Fri, 28 Jan 2022 10:02:33 +0000 (11:02 +0100)
commit48f4c44515887c58314b146d4bc59eff66bf23cb
tree52422de07300149eb58706b9173b0e2d8d3d5d7e
parent0cb638e306c37097e03f53c4225b17599167942e
gpio: aspeed-sgpio: Convert aspeed_sgpio.lock to raw_spinlock

BugLink: https://bugs.launchpad.net/bugs/1959376
[ Upstream commit ab39d6988dd53f354130438d8afa5596a2440fed ]

The gpio-aspeed-sgpio driver implements an irq_chip which need to be
invoked from hardirq context. Since spin_lock() can sleep with
PREEMPT_RT, it is no longer legal to invoke it while interrupts are
disabled.
This also causes lockdep to complain about:
[   25.919465] [ BUG: Invalid wait context ]
because aspeed_sgpio.lock (spin_lock_t) is taken under irq_desc.lock
(raw_spinlock_t).
Let's use of raw_spinlock_t instead of spinlock_t.

Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/gpio/gpio-aspeed-sgpio.c