linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Valentin Schneider <valentin.schneider@arm.com>,
	linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org
Cc: Will Deacon <will@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Marc Zyngier <maz@kernel.org>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Mel Gorman <mgorman@techsingularity.net>,
	Linus Walleij <linusw@kernel.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	linux-gpio@vger.kernel.org
Subject: Re: [SPLAT 3/3] gpio: dwapb: Sleeping spinlocks down IRQ mapping
Date: Tue, 10 Aug 2021 22:33:01 +0200	[thread overview]
Message-ID: <87v94doxaa.ffs@tglx> (raw)
In-Reply-To: <20210810134127.1394269-4-valentin.schneider@arm.com>

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

  reply	other threads:[~2021-08-10 20:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-10 13:41 [SPLAT 0/3] Sleeping spinlocks in troublesome contexts on v5.14-rc4-rt6 Valentin Schneider
2021-08-10 13:41 ` [SPLAT 1/3] arm_pmu: Sleeping spinlocks down armpmu_alloc_atomic() Valentin Schneider
2021-08-10 13:54   ` Sebastian Andrzej Siewior
2021-08-10 17:16     ` Thomas Gleixner
2021-08-10 18:39       ` Sebastian Andrzej Siewior
2021-08-10 19:56         ` Thomas Gleixner
2021-08-10 13:41 ` [SPLAT 2/3] irqchip/gic-v3-its: Sleeping spinlocks down gic_reserve_range() Valentin Schneider
2021-08-11  8:50   ` Marc Zyngier
2021-08-11 12:28     ` Thomas Gleixner
2021-08-11 15:14       ` Marc Zyngier
2021-08-17 15:16     ` Ard Biesheuvel
2021-08-10 13:41 ` [SPLAT 3/3] gpio: dwapb: Sleeping spinlocks down IRQ mapping Valentin Schneider
2021-08-10 20:33   ` Thomas Gleixner [this message]
2021-08-11 10:52   ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v94doxaa.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=bgolaszewski@baylibre.com \
    --cc=bigeasy@linutronix.de \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=mgorman@techsingularity.net \
    --cc=valentin.schneider@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).