linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>, ldewangan@nvidia.com
Cc: Laxman Dewangan <ldewangan@nvidia.com>,
	Dmitry Osipenko <digetx@gmail.com>,
	Andi Shyti <andi.shyti@kernel.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	paulmck@kernel.org, apopple@nvidia.com,
	Michael van der Westhuizen <rmikey@meta.com>,
	"open list:I2C SUBSYSTEM HOST DRIVERS"
	<linux-i2c@vger.kernel.org>,
	"open list:TEGRA ARCHITECTURE SUPPORT"
	<linux-tegra@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [i2c-tegra] Do not mark ACPI devices as irq safe
Date: Wed, 12 Jun 2024 05:12:43 -0700	[thread overview]
Message-ID: <ZmmQu15Z2acgAjZQ@gmail.com> (raw)
In-Reply-To: <ZmhHvpHlkxe4kid7@smile.fi.intel.com>

Hello Andy,

On Tue, Jun 11, 2024 at 03:49:02PM +0300, Andy Shevchenko wrote:
> On Thu, Jun 06, 2024 at 06:27:07AM -0700, Breno Leitao wrote:

> > The problem arises because during __pm_runtime_resume(), the spinlock
> > &dev->power.lock is acquired before rpm_resume() is called. Later,
> > rpm_resume() invokes acpi_subsys_runtime_resume(), which relies on
> > mutexes, triggering the error.
> > 
> > To address this issue, devices on ACPI are now marked as not IRQ-safe,
> > considering the dependency of acpi_subsys_runtime_resume() on mutexes.
> 
> ...
> 
> While it's a move in the right direction, the real fix is to get rid of
> the IRQ safe PM hack completely.
> Look at how OMAP code was modified for
> the last few years and now it's pm_runtime_irq_safe()-free. The main
> (ab)users are SH code followed by Tegra drivers.

Thanks. 

I think these are two different goals here. This near term goal is just
fix the driver so it can use the pm_runtime_irq_safe() in a saner
way, avoiding calling mutexes inside spinlocks.

Getting rid of the IRQ safe PM seems to me to be more a long term
desirable goal, and unfortunately I cannot afford doing it now.

Laxman, what is your view on this topic?

--breno

  reply	other threads:[~2024-06-12 12:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-06 13:27 [PATCH] [i2c-tegra] Do not mark ACPI devices as irq safe Breno Leitao
2024-06-11 12:49 ` Andy Shevchenko
2024-06-12 12:12   ` Breno Leitao [this message]
2024-08-09 12:19     ` Andy Shevchenko
2024-08-16 14:44       ` Akhil R

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=ZmmQu15Z2acgAjZQ@gmail.com \
    --to=leitao@debian.org \
    --cc=andi.shyti@kernel.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=apopple@nvidia.com \
    --cc=digetx@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=rmikey@meta.com \
    --cc=thierry.reding@gmail.com \
    /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).