* Re: [SPLAT 3/3] gpio: dwapb: Sleeping spinlocks down IRQ mapping
[not found] ` <20210810134127.1394269-4-valentin.schneider@arm.com>
@ 2021-08-10 20:33 ` Thomas Gleixner
0 siblings, 0 replies; only message in thread
From: Thomas Gleixner @ 2021-08-10 20:33 UTC (permalink / raw)
To: Valentin Schneider, linux-kernel, linux-rt-users
Cc: Will Deacon, Mark Rutland, Marc Zyngier,
Sebastian Andrzej Siewior, Mel Gorman, Linus Walleij,
Bartosz Golaszewski, linux-gpio
On Tue, Aug 10 2021 at 14:41, Valentin Schneider wrote:
> [ 11.549824] rt_spin_lock (kernel/locking/rtmutex.c:1641 (discriminator 4) kernel/locking/spinlock_rt.c:30 (discriminator 4) kernel/locking/spinlock_rt.c:36 (discriminator 4) kernel/locking/spinlock_rt.c:44 (discriminator 4))
> [ 11.549827] dwapb_irq_ack (drivers/gpio/gpio-dwapb.c:151 drivers/gpio/gpio-dwapb.c:233) gpio_dwapb
> [ 11.549831] __irq_do_set_handler (kernel/irq/chip.c:414 kernel/irq/chip.c:406 kernel/irq/chip.c:1009)
> [ 11.549833] __irq_set_handler (kernel/irq/internals.h:178 kernel/irq/chip.c:1053)
This is gpio_chip->bgpio_lock which is a regular spinlock. AFAICT this
lock should merely serializing access to MMIO registers, so it should
not be a problem to make this lock raw.
Except for the obligatory exception:
grgpio_irq_handler() holds that lock from the demultiplexing
handler and invokes all handlers for the individual GPIOs which have
interrupts enabled without ever consulting a pending register.
That drivers usage of that lock is interesting in general, see
grgpio_map_irq() for illustration. Quality stuff for mission critical
systems...
But nevertheless it should just work with a raw lock on RT AFACIT.
Thanks,
tglx
^ permalink raw reply [flat|nested] only message in thread