public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Jon Hunter <jonathanh@nvidia.com>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mikko Perttunen <mperttunen@nvidia.com>,
	Laxman Dewangan <ldewangan@nvidia.com>,
	Dmitry Osipenko <digetx@gmail.com>,
	Andi Shyti <andi.shyti@kernel.org>,
	Linus Walleij <linusw@kernel.org>,
	linux-gpio@vger.kernel.org, linux-i2c@vger.kernel.org,
	linux-tegra@vger.kernel.org
Subject: Re: [PATCH net-next] i2c: tegra: runtime PM is not IRQ-safe
Date: Wed, 18 Mar 2026 18:17:47 +0000	[thread overview]
Message-ID: <abrsS1UW-q6J1rEU@shell.armlinux.org.uk> (raw)
In-Reply-To: <b7ede8c7-acc6-485a-b433-35d780d6ad1c@nvidia.com>

On Wed, Feb 18, 2026 at 08:30:49AM +0000, Jon Hunter wrote:
> 
> On 18/02/2026 01:35, Mikko Perttunen wrote:
> 
> ...
> 
> > > > > Yes we should always follow that rule. However, in this case, I believe
> > > > > that the build time dependency on the PINCTRL subsystem was only exposed
> > > > > by adding the 'i2c_dev->dev->pins'. Unless I am misunderstanding ...
> > > > 
> > > > Yes, it looks like it.
> > > > 
> > > > However, I wonder why the dependency has to be complicated.
> > > > 
> > > > ARCH_TEGRA in both arm64 and arm selects PINCTRL, so we can assume that
> > > > 
> > > > PINCTRL will be set for ARCH_TEGRA. So:
> > > >    config I2C_TEGRA
> > > >    	tristate "NVIDIA Tegra internal I2C controller"
> > > >    	depends on ARCH_TEGRA || (COMPILE_TEST && (ARC || ARM || ARM64 ||
> > M68K
> > > >    	|| RISCV || SUPERH || SPARC))>
> > > > +	depends on PINCTRL
> > > > 
> > > > is a shorter way of writing this, and it makes sense - pinctrl isn't
> > > > required because we're doing a compile test, it's required because
> > > > the driver itself fundamentally requires it with this change whether
> > > > or not we're doing a compile test.
> > > 
> > > Yes that's true indeed.
> > > 
> > > Mikko, do you want to take care of this?
> > 
> > My thought was it would be better to keep the PINCTRL dependency grouped with
> > COMPILE_TEST. That makes it clear it's only needed because of it -- clearer to
> > the reader that ARCH_TEGRA implies it. Kind of like not checking for NULL
> > pointers in C code when the contract is that the pointer is not NULL.
> 
> Russell's point is that regardless of the compile test, the driver has a
> dependency on pinctrl and so should always be dependent on it. The I2C
> instances for the DPAUX device on certain devices require this and will not
> work without it (before your change was added). I guess I should have added
> this dependency back with commit 718917b9875f ("i2c: tegra: Add pinctrl
> support").
> 
> > I can change it though if you'd like.
> 
> I think we should.
> 
> Thanks!

When is this bug going to be fixed? This is a regression that's
affecting Xavier systems. It's been over a month since I proposed
a patch to fix this:

BUG: sleeping function called from invalid context at kernel/locking/mutex.c:591
in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 59, name: kworker/u24:6

Please see:

https://lore.kernel.org/r/E1vsNBv-00000009nfA-27ZK@rmk-PC.armlinux.org.uk

for my original proposed fix, complete kernel messages and analysis.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

  reply	other threads:[~2026-03-18 18:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-17 15:40 [PATCH net-next] i2c: tegra: runtime PM is not IRQ-safe Russell King (Oracle)
2026-02-17 15:50 ` Russell King (Oracle)
2026-02-17 15:55 ` Jon Hunter
2026-02-17 16:04   ` Russell King (Oracle)
2026-02-17 16:15     ` Jon Hunter
2026-02-17 16:40       ` Russell King (Oracle)
2026-02-17 16:46         ` Jon Hunter
2026-02-18  1:35           ` Mikko Perttunen
2026-02-18  8:30             ` Jon Hunter
2026-03-18 18:17               ` Russell King (Oracle) [this message]
2026-03-19  2:16                 ` Mikko Perttunen

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=abrsS1UW-q6J1rEU@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andi.shyti@kernel.org \
    --cc=digetx@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=ldewangan@nvidia.com \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mperttunen@nvidia.com \
    --cc=torvalds@linux-foundation.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