linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Youngmin Nam <youngmin.nam@samsung.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Saravana Kannan <saravanak@google.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, kernel-team@android.com,
	hajun.sung@samsung.com, d7271.choe@samsung.com,
	joonki.min@samsung.com
Subject: Re: [GICv3 ITS]S2IDLE framework does not invoke syscore_ops in GICv3 ITS driver
Date: Thu, 03 Apr 2025 08:16:00 +0100	[thread overview]
Message-ID: <875xjlzpe7.wl-maz@kernel.org> (raw)
In-Reply-To: <CAPDyKFqs+o1snQL-kwC+4-ENDO=P9MwPnAN6YTkExJgLsosHhA@mail.gmail.com>

On Wed, 02 Apr 2025 11:57:31 +0100,
Ulf Hansson <ulf.hansson@linaro.org> wrote:
> 
> On Tue, 1 Apr 2025 at 15:11, Marc Zyngier <maz@kernel.org> wrote:
> >
> > On Tue, 01 Apr 2025 13:45:43 +0100,
> > Ulf Hansson <ulf.hansson@linaro.org> wrote:
> > >
> > > Assuming we can make the code for saving/restoring generic (not in FW)
> > > and that we are able to make sure the code is only executed for those
> > > platforms and states that really need it. Do you think there would
> > > there be any other drawback for doing this?
> >
> > Yes. We'd end-up having to implement all sort of split PM schemes
> > depending on the GIC implementation, what the firmware does, the
> > various braindead assumptions that the integration makes, and other
> > parameters I don't even want to consider.
> 
> I don't think it needs to be that complicated, at all. But let's not
> discuss the solution at this point, at least for me, that's too early.
> 
> However, I do understand your concerns and share them.
> 
> >
> > The GIC power management is, for better or worse, *outside* of the
> > scope of the architecture. Most of it is implementation defined,
> > because each and every implementer/vendor sees it as added value to
> > invent their own particular flavour of crap. For example, there is no
> > provision for wake-up interrupts, because nobody can agree on how
> > that's supposed to work.
> 
> Right. I guess it falls in the SoC specific area and we need to live
> with it, for now.
>
> Anyway, the main reason why I joined the discussion is exactly because
> of this. I have been working on enabling the same deep state for
> s2idle as the one that corresponds to s2ram for some legacy arm64
> platforms. To allow the system to wake up properly from this deep
> state, I needed to save/restore these types of GIC registers.

Or not. I will *NOT* entertain SoC-specific code in the GIC drivers
for anything that isn't a workaround for a functional erratum.

> 
> I intend to post a complete series for this soonish. It should show
> what is needed for a particular SoC in this regard. I will keep you
> posted.
> 
> >
> > Do we want to deal with this in the various GIC drivers? No. It is the
> > job of firmware to manage this mess, because this clearly delineates
> > where the responsibilities lie.
> 
> The FW could deal with this, but that would only work for platforms
> with new or upgrade-able FW, which is not the case for these legacy
> platforms that I am working on.

Then these platforms can die and be pruned from the tree, or live with
a sub-par power management.

> Moreover, we already implement the save/restore for some GIC variants
> - and in some cases using different ways to do it. In my opinion it
> would be nice to have a common solution that would only be enabled for
> the states/platforms that really need it. In the series above I will
> try to implement this, let's see if I can make it.

The solution is firmware. It's been advertised as such for over 10
years, and GICv5 doesn't change this. We spent years *removing* that
crap from the irqchip subsystem so that we could have something
manageable. I'm not going to go back in time for the sake of shit HW.

	M.

-- 
Jazz isn't dead. It just smells funny.


  reply	other threads:[~2025-04-03  7:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20250326030527epcas2p33aa30e62cc8a00c9e151c35bee71dac5@epcas2p3.samsung.com>
     [not found] ` <Z+Nv8U/4P3taDpUq@perf>
2025-03-26  8:59   ` [GICv3 ITS]S2IDLE framework does not invoke syscore_ops in GICv3 ITS driver Marc Zyngier
2025-03-27  3:22     ` Youngmin Nam
2025-03-27  8:25       ` Marc Zyngier
2025-03-28  2:10         ` Youngmin Nam
2025-04-01 12:45         ` Ulf Hansson
2025-04-01 13:11           ` Marc Zyngier
2025-04-02 10:57             ` Ulf Hansson
2025-04-03  7:16               ` Marc Zyngier [this message]
2025-04-02 11:56       ` Sudeep Holla
2025-04-03  1:30         ` Youngmin Nam
2025-04-03  9:18           ` Sudeep Holla
2025-04-04  4:13             ` Donghyeok Choe
2025-04-07  9:17               ` Sudeep Holla
2025-04-07 22:51                 ` Donghyeok Choe
2025-04-08  6:51                   ` Marc Zyngier
2025-04-08 22:28                     ` Donghyeok Choe
2025-04-08 10:46                   ` Sudeep Holla
2025-04-08 22:11                     ` Donghyeok Choe

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=875xjlzpe7.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=d7271.choe@samsung.com \
    --cc=hajun.sung@samsung.com \
    --cc=joonki.min@samsung.com \
    --cc=kernel-team@android.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=saravanak@google.com \
    --cc=tglx@linutronix.de \
    --cc=ulf.hansson@linaro.org \
    --cc=vincent.guittot@linaro.org \
    --cc=youngmin.nam@samsung.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).