mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hector Martin <marcan@marcan.st>
To: Eric Curtin <ecurtin@redhat.com>
Cc: Sven Peter <sven@svenpeter.dev>,
	Alyssa Rosenzweig <alyssa@rosenzweig.io>,
	Janne Grunau <j@jannau.net>,
	asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] soc: apple: apple-pmgr-pwrstate: Switch to IRQ-safe mode
Date: Mon, 23 Jan 2023 23:11:05 +0900	[thread overview]
Message-ID: <8790890e-f33c-47f2-6704-e6666e516f9f@marcan.st> (raw)
In-Reply-To: <CAOgh=FwEpMGx-F6GZumOBkBYShtU_SVUWTzZ+WWY0Euc-75YGQ@mail.gmail.com>

On 23/01/2023 20.22, Eric Curtin wrote:
> On Mon, 23 Jan 2023 at 07:01, Hector Martin <marcan@marcan.st> wrote:
>>
>> This requires changing the reset path locking primitives to the spinlock
>> path in genpd, instead of the mutex path.
>>
>> Signed-off-by: Hector Martin <marcan@marcan.st>
>> ---
> 
> It seems we need this to avoid a race from reading #asahi-dev IRC,
> commit message could be more detailed here.
> 
> Reviewed-by: Eric Curtin <ecurtin@redhat.com>

Not exactly, that was unrelated. We just need this to be able to switch
power states from IRQ/atomic context, which came up when adding runtime
PM to the DART driver (IIRC, this was a few weeks back and I threw
runtime PM into like 3 drivers that day so I might be misremembering,
but we definitely need it for one of them :-)).

The power state part of the driver itself is trivially IRQ-safe already,
so there is no reason not to do it. We just have to switch the locking
primitive the reset code uses (genpd already supports both), which is
only used to provide the reset functionality safely since it involves
the same register as the power state control.

- Hector

  reply	other threads:[~2023-01-23 14:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-23  6:51 Hector Martin
2023-01-23 11:22 ` Eric Curtin
2023-01-23 14:11   ` Hector Martin [this message]
2023-01-28 11:38 ` Sven Peter
2023-01-31 11:41 ` Hector Martin

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=8790890e-f33c-47f2-6704-e6666e516f9f@marcan.st \
    --to=marcan@marcan.st \
    --cc=alyssa@rosenzweig.io \
    --cc=asahi@lists.linux.dev \
    --cc=ecurtin@redhat.com \
    --cc=j@jannau.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sven@svenpeter.dev \
    /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

all inboxes | Powered by JetHome®