gpio: aspeed: Convert aspeed_gpio.lock to raw_spinlock
authorIwona Winiarska <iwona.winiarska@intel.com>
Sat, 4 Dec 2021 17:10:26 +0000 (18:10 +0100)
committerBartosz Golaszewski <brgl@bgdev.pl>
Fri, 10 Dec 2021 15:14:40 +0000 (16:14 +0100)
commit61a7904b6ace99b1bde0d0e867fa3097f5c8cee2
tree2ae31b78bee1666c8c7796428015e32ac5c7220a
parent9dbd1ab20509e85cd3fac9479a00c59e83c08196
gpio: aspeed: Convert aspeed_gpio.lock to raw_spinlock

The gpio-aspeed 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:
[    0.649797] [ BUG: Invalid wait context ]
because aspeed_gpio.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>
drivers/gpio/gpio-aspeed.c