Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Maulik Shah <quic_mkshah@quicinc.com>,
	andersson@kernel.org, dianders@chromium.org, swboyd@chromium.org,
	wingers@google.com, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	jwerner@chromium.org, quic_lsrao@quicinc.com,
	quic_rjendra@quicinc.com
Subject: Re: [PATCH v2 1/2] cpuidle: psci: Move enabling OSI mode after power domains creation
Date: Thu, 30 Mar 2023 14:13:34 +0100	[thread overview]
Message-ID: <20230330131334.idb25zf4tdf3zqn3@bogus> (raw)
In-Reply-To: <CAPDyKFpUmkF=pOwXNrva1k2R+RFBB39-Y4kA0Fve+-3NGbtDag@mail.gmail.com>

On Thu, Mar 30, 2023 at 02:06:19PM +0200, Ulf Hansson wrote:
> On Thu, 30 Mar 2023 at 11:34, Sudeep Holla <sudeep.holla@arm.com> wrote:
> >
> > On Thu, Mar 30, 2023 at 02:12:49PM +0530, Maulik Shah wrote:
> > > A switch from OSI to PC mode is only possible if all CPUs other than the
> > > calling one are OFF, either through a call to CPU_OFF or not yet booted.
> > >
> >
> > As per the spec, all cores are in one of the following states:
> >  - Running
> >  - OFF, either through a call to CPU_OFF or not yet booted
> >  - Suspended, through a call to CPU_DEFAULT_SUSPEND
> >
> > Better to provide full information.
> >
> > > Currently OSI mode is enabled before power domains are created. In cases
> > > where CPUidle states are not using hierarchical CPU topology the bail out
> > > path tries to switch back to PC mode which gets denied by firmware since
> > > other CPUs are online at this point and creates inconsistent state as
> > > firmware is in OSI mode and Linux in PC mode.
> > >
> >
> > OK what is the issue if the other cores are online ? As long as they are
> > running, it is allowed in the spec, so your statement is incorrect.
> >
> > Is CPUidle enabled before setting the OSI mode. I see only that can cause
> > issue as we don't use CPU_DEFAULT_SUSPEND. If idle is not yet enabled, it
> > shouldn't be a problem.
> 
> Sudeep, you may very well be correct here. Nevertheless, it looks like
> the current public TF-A implementation doesn't work exactly like this,
> as it reports an error in Maulik's case. We should fix it too, I
> think.
> 
> Although, to me it doesn't really matter as I think $subject patch
> makes sense anyway. It's always nice to simplify code when it's
> possible.
>

Agreed, I don't have any objection to the change. The wording the message
worried me and wanted to check if there are any other issues because of this.
As such it doesn't look like there are but the commit message needs to be
updated as it gives a different impression/understanding.

-- 
Regards,
Sudeep

  reply	other threads:[~2023-03-30 13:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-30  8:42 [PATCH v2 0/2] Use PSCI OS initiated mode for sc7280 Maulik Shah
2023-03-30  8:42 ` [PATCH v2 1/2] cpuidle: psci: Move enabling OSI mode after power domains creation Maulik Shah
2023-03-30  9:34   ` Sudeep Holla
2023-03-30 12:06     ` Ulf Hansson
2023-03-30 13:13       ` Sudeep Holla [this message]
2023-03-31  1:46         ` Wing Li
     [not found]         ` <CADut4F3UmMXCYHeE6sXfoJtgEp36Fv65Poe1Z0JKT0DETyaowQ@mail.gmail.com>
2023-03-31 14:27           ` Sudeep Holla
2023-03-30 12:19   ` Ulf Hansson
2023-03-30  8:42 ` [PATCH v2 2/2] arm64: dts: qcom: sc7280: Add power-domains for cpuidle states Maulik Shah
2023-03-30 12:21   ` Ulf Hansson
2023-03-30  9:38 ` [PATCH v2 0/2] Use PSCI OS initiated mode for sc7280 Sudeep Holla

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=20230330131334.idb25zf4tdf3zqn3@bogus \
    --to=sudeep.holla@arm.com \
    --cc=andersson@kernel.org \
    --cc=dianders@chromium.org \
    --cc=jwerner@chromium.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=quic_lsrao@quicinc.com \
    --cc=quic_mkshah@quicinc.com \
    --cc=quic_rjendra@quicinc.com \
    --cc=swboyd@chromium.org \
    --cc=ulf.hansson@linaro.org \
    --cc=wingers@google.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