Re: [PATCHv2] gpio: mvebu: use raw spinlock for MMIO regmaps
From: Linus Walleij
Date: Wed Sep 30 2026 - 10:35:46 EST
On Fri, Sep 18, 2026 at 1:09 AM Rosen Penev <rosenp@xxxxxxxxx> wrote:
> The mask/unmask handlers run with the generic irqchip's raw spinlock
> held and call regmap_read()/regmap_write() on the GPIO regmaps. By
> default regmap protects itself with a plain spinlock, which becomes a
> sleeping rt_mutex on CONFIG_PREEMPT_RT; taking it while holding the raw
> irqchip lock trips might_sleep(), and PROVE_RAW_LOCK_NESTING flags the
> same nesting on non-RT builds.
>
> Configure both GPIO regmaps with .use_raw_spinlock = true so the MMIO
> accesses stay atomic in hardirq and raw-locked context.
>
> Assisted-by: LLM
> Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
> Reviewed-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>
Yours,
Linus Walleij