Skip to content

Commit a39741d

Browse files
claudiubezneageertu
authored andcommitted
pinctrl: renesas: rzg2l: Use spin_{lock,unlock}_irq{save,restore}
On PREEMPT_RT kernels the spinlock_t maps to an rtmutex. Using raw_spin_lock_irqsave()/raw_spin_unlock_irqrestore() on &pctrl->lock.rlock breaks the PREEMPT_RT builds. To fix this use spin_lock_irqsave()/spin_unlock_irqrestore() on &pctrl->lock. Fixes: 02cd2d3 ("pinctrl: renesas: rzg2l: Configure the interrupt type on resume") Reported-by: Diederik de Haas <[email protected]> Closes: https://lore.kernel.org/all/131999629.KQPSlr0Zke@bagend Signed-off-by: Claudiu Beznea <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent 1613e60 commit a39741d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/pinctrl/renesas/pinctrl-rzg2l.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2071,11 +2071,11 @@ static void rzg2l_gpio_irq_restore(struct rzg2l_pinctrl *pctrl)
20712071
* This has to be atomically executed to protect against a concurrent
20722072
* interrupt.
20732073
*/
2074-
raw_spin_lock_irqsave(&pctrl->lock.rlock, flags);
2074+
spin_lock_irqsave(&pctrl->lock, flags);
20752075
ret = rzg2l_gpio_irq_set_type(data, irqd_get_trigger_type(data));
20762076
if (!ret && !irqd_irq_disabled(data))
20772077
rzg2l_gpio_irq_enable(data);
2078-
raw_spin_unlock_irqrestore(&pctrl->lock.rlock, flags);
2078+
spin_unlock_irqrestore(&pctrl->lock, flags);
20792079

20802080
if (ret)
20812081
dev_crit(pctrl->dev, "Failed to set IRQ type for virq=%u\n", virq);

0 commit comments

Comments
 (0)