[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87v94doxaa.ffs@tglx>
Date: Tue, 10 Aug 2021 22:33:01 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Valentin Schneider <valentin.schneider@....com>,
linux-kernel@...r.kernel.org, linux-rt-users@...r.kernel.org
Cc: Will Deacon <will@...nel.org>, Mark Rutland <mark.rutland@....com>,
Marc Zyngier <maz@...nel.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Mel Gorman <mgorman@...hsingularity.net>,
Linus Walleij <linusw@...nel.org>,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
linux-gpio@...r.kernel.org
Subject: Re: [SPLAT 3/3] gpio: dwapb: Sleeping spinlocks down IRQ mapping
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
Powered by blists - more mailing lists