From: Youngmin Nam <youngmin.nam@samsung.com>
To: Sudeep Holla <sudeep.holla@arm.com>
Cc: Marc Zyngier <maz@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Saravana Kannan <saravanak@google.com>,
Sudeep Holla <sudeep.holla@arm.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
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, Youngmin Nam <youngmin.nam@samsung.com>,
ne.yoo@samsung.com
Subject: Re: [GICv3 ITS]S2IDLE framework does not invoke syscore_ops in GICv3 ITS driver
Date: Thu, 3 Apr 2025 10:30:42 +0900 [thread overview]
Message-ID: <Z+3kwsesiXyC0hbO@perf> (raw)
In-Reply-To: <20250402-messy-wild-squid-7b4da9@sudeepholla>
[-- Attachment #1: Type: text/plain, Size: 2063 bytes --]
On Wed, Apr 02, 2025 at 12:56:53PM +0100, Sudeep Holla wrote:
> (Failed to find the original email, so reply on this instead)
>
> On Thu, Mar 27, 2025 at 12:22:19PM +0900, Youngmin Nam wrote:
> >
> > The problem is that syscore_ops is not invoked during the S2IDLE scenario,
> > so we cannot rely on it in that context.
> > We would like to use these suspend/resume functions during S2IDLE as well.
>
> I have one orthogonal question. The s2idle will just use the deepest
> cpuidle state registered. So if s2idle needs this save/restore of GICv3
> ITS, how does that work when all the CPUs enter that idle state.
>
> With respect to the PSCI CPU_SUSPEND call, it doesn't change. So I am
> bit confused as how it can work fine in normal cpuidle paths but no in
> s2idle path. What am I missing ? I do psci_enter_domain_idle_state handles
> s2idle little different but nothing to change this GICv3 ITS save/restore
> requirement between cpuidle and s2idle.
>
> --
> Regards,
> Sudeep
>
Hi Sudeep,
Thanks for asking.
As a SoC vendor, we are using the Android kernel, which includes a vendor hook like the one below.
In this function,
a vendor-specific handler attached to trace_android_vh_cpuidle_psci_enter is called.
54 static __cpuidle int __psci_enter_domain_idle_state(struct cpuidle_device *dev,
55 struct cpuidle_driver *drv, int idx,
56 bool s2idle)
57 {
58 struct psci_cpuidle_data *data = this_cpu_ptr(&psci_cpuidle_data);
59 u32 *states = data->psci_states;
60 struct device *pd_dev = data->dev;
61 u32 state;
62 int ret;
63
64 ret = cpu_pm_enter();
65 if (ret)
66 return -1;
67
68 /* Do runtime PM to manage a hierarchical CPU toplogy. */
69 trace_android_vh_cpuidle_psci_enter(dev, s2idle);
Within the vendor-specific handler, if the current mode is S2IDLE and the CPU logical number is 0,
the GIC ITS suspend function is executed.
Thanks.
Youngmin
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2025-04-03 1:28 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20250326030527epcas2p33aa30e62cc8a00c9e151c35bee71dac5@epcas2p3.samsung.com>
2025-03-26 3:09 ` [GICv3 ITS]S2IDLE framework does not invoke syscore_ops in GICv3 ITS driver Youngmin Nam
2025-03-26 8:59 ` 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
2025-04-02 11:56 ` Sudeep Holla
2025-04-03 1:30 ` Youngmin Nam [this message]
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=Z+3kwsesiXyC0hbO@perf \
--to=youngmin.nam@samsung.com \
--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=maz@kernel.org \
--cc=ne.yoo@samsung.com \
--cc=saravanak@google.com \
--cc=sudeep.holla@arm.com \
--cc=tglx@linutronix.de \
--cc=ulf.hansson@linaro.org \
--cc=vincent.guittot@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.