All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Gaignard <benjamin.gaignard@linaro.org>
To: Sudeep Holla <sudeep.holla@arm.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	Lorenzo Pieralisi <Lorenzo.Pieralisi@arm.com>,
	Benjamin Gaignard <benjamin.gaignard@st.com>,
	Linux PM <linux-pm@vger.kernel.org>,
	Stephen Boyd <sboyd@kernel.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Lina Iyer <ilina@codeaurora.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 4/4] cpuidle: psci: Allow WFI to be the only state for the hierarchical topology
Date: Fri, 6 Mar 2020 11:47:40 +0100	[thread overview]
Message-ID: <CA+M3ks764moVU2h9iZJuN6B-e4wBUMymBfPnob_zraf50xqezA@mail.gmail.com> (raw)
In-Reply-To: <20200306100431.GA16541@bogus>

Le ven. 6 mars 2020 à 11:04, Sudeep Holla <sudeep.holla@arm.com> a écrit :
>
> On Fri, Mar 06, 2020 at 10:28:10AM +0100, Ulf Hansson wrote:
> > On Thu, 5 Mar 2020 at 17:23, Sudeep Holla <sudeep.holla@arm.com> wrote:
> > >
>
> [...]
>
> > > OK. The only state that cluster can enter when CPUs are in WFI are
> > > cluster WFI and most hardware can handle it automatically. I don't see
> > > the need to do any extra work for that.
> >
> > This isn't about cluster WFI, but about deeper cluster states, such as
> > a cluster-clock-gated-state and a cluster-power-off-state. It's an ST
> > platform, which Benjamin is working on.
> >
>
> Then definitely something is completely wrong. You can't enter deeper
> cluster states(clock-gated and power-off to be specific) with CPU in
> just WFI state. So, if the attempt here is to enter those states, I
> disagree with the change.
>
> Benjamin, please share the complete hierarchical topology for your platform.

The platform is stm32mp157 SoC which embedded two Cortex A7 in one cluster.
I would like to be able to put the system in a state where clocks of CPUs and
hardware blocks are gated. In this state local timer are off.
The platform should be allowed to go in this state when the devices
within the power
domain are pm_runtime_suspend and the CPUs in WFI.
In DT I have one system power domain where the hardware blocks (i2,
uart; spi, etc..)
are attached + a power per CPU.

Benjamin

>
> > >
> > > > Then, after we have called pm_runtime_put_sync_suspend() a few lines
> > > > above, we may potentially have a "domain state" to use, instead of the
> > > > WFI state.
> > > >
> > >
> > > Are they any platforms with this potential "domain state" to use with
> > > CPU WFI. I want to understand this better.
> > >
> > > > In this case, if we would have called psci_enter_state(), that would
> > > > lead us to calling cpu_do_idle() from the __CPU_PM_CPU_IDLE_ENTER()
> > > > macro, becuase idx is zero. In other words, the domain state would
> > > > become unused.
> > > >
> > >
> > > For a domain state to become unused with WFI, it needs to be available
> > > and I am not 100% sure of that.
> >
> > With these changes from the series, we can fully conform to the
> > hierarchical DT bindings for PSCI.
> >
>
> Theoretically may be, but may not confirm to the hardware states.
>
> > I am not sure I understand your concern, is there a cost involved by
> > applying this?
> >
>
> Yes as mentioned above.
>
> --
> Regards,
> Sudeep
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Gaignard <benjamin.gaignard@linaro.org>
To: Sudeep Holla <sudeep.holla@arm.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	Lorenzo Pieralisi <Lorenzo.Pieralisi@arm.com>,
	Benjamin Gaignard <benjamin.gaignard@st.com>,
	Linux PM <linux-pm@vger.kernel.org>,
	Stephen Boyd <sboyd@kernel.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Lina Iyer <ilina@codeaurora.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 4/4] cpuidle: psci: Allow WFI to be the only state for the hierarchical topology
Date: Fri, 6 Mar 2020 11:47:40 +0100	[thread overview]
Message-ID: <CA+M3ks764moVU2h9iZJuN6B-e4wBUMymBfPnob_zraf50xqezA@mail.gmail.com> (raw)
In-Reply-To: <20200306100431.GA16541@bogus>

Le ven. 6 mars 2020 à 11:04, Sudeep Holla <sudeep.holla@arm.com> a écrit :
>
> On Fri, Mar 06, 2020 at 10:28:10AM +0100, Ulf Hansson wrote:
> > On Thu, 5 Mar 2020 at 17:23, Sudeep Holla <sudeep.holla@arm.com> wrote:
> > >
>
> [...]
>
> > > OK. The only state that cluster can enter when CPUs are in WFI are
> > > cluster WFI and most hardware can handle it automatically. I don't see
> > > the need to do any extra work for that.
> >
> > This isn't about cluster WFI, but about deeper cluster states, such as
> > a cluster-clock-gated-state and a cluster-power-off-state. It's an ST
> > platform, which Benjamin is working on.
> >
>
> Then definitely something is completely wrong. You can't enter deeper
> cluster states(clock-gated and power-off to be specific) with CPU in
> just WFI state. So, if the attempt here is to enter those states, I
> disagree with the change.
>
> Benjamin, please share the complete hierarchical topology for your platform.

The platform is stm32mp157 SoC which embedded two Cortex A7 in one cluster.
I would like to be able to put the system in a state where clocks of CPUs and
hardware blocks are gated. In this state local timer are off.
The platform should be allowed to go in this state when the devices
within the power
domain are pm_runtime_suspend and the CPUs in WFI.
In DT I have one system power domain where the hardware blocks (i2,
uart; spi, etc..)
are attached + a power per CPU.

Benjamin

>
> > >
> > > > Then, after we have called pm_runtime_put_sync_suspend() a few lines
> > > > above, we may potentially have a "domain state" to use, instead of the
> > > > WFI state.
> > > >
> > >
> > > Are they any platforms with this potential "domain state" to use with
> > > CPU WFI. I want to understand this better.
> > >
> > > > In this case, if we would have called psci_enter_state(), that would
> > > > lead us to calling cpu_do_idle() from the __CPU_PM_CPU_IDLE_ENTER()
> > > > macro, becuase idx is zero. In other words, the domain state would
> > > > become unused.
> > > >
> > >
> > > For a domain state to become unused with WFI, it needs to be available
> > > and I am not 100% sure of that.
> >
> > With these changes from the series, we can fully conform to the
> > hierarchical DT bindings for PSCI.
> >
>
> Theoretically may be, but may not confirm to the hardware states.
>
> > I am not sure I understand your concern, is there a cost involved by
> > applying this?
> >
>
> Yes as mentioned above.
>
> --
> Regards,
> Sudeep
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-03-06 10:47 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-03 20:35 [PATCH v2 0/4] cpuidle: psci: Some fixes when using the hierarchical layout Ulf Hansson
2020-03-03 20:35 ` Ulf Hansson
2020-03-03 20:35 ` [PATCH v2 1/4] PM / Domains: Allow no domain-idle-states DT property in genpd when parsing Ulf Hansson
2020-03-03 20:35   ` Ulf Hansson
2020-03-04 10:48   ` Sudeep Holla
2020-03-04 10:48     ` Sudeep Holla
2020-03-03 20:35 ` [PATCH v2 2/4] cpuidle: psci: Fixup support for domain idle states being zero Ulf Hansson
2020-03-03 20:35   ` Ulf Hansson
2020-03-04 10:50   ` Sudeep Holla
2020-03-04 10:50     ` Sudeep Holla
2020-03-04 12:17     ` Ulf Hansson
2020-03-04 12:17       ` Ulf Hansson
2020-03-03 20:35 ` [PATCH v2 3/4] cpuidle: psci: Split psci_dt_cpu_init_idle() Ulf Hansson
2020-03-03 20:35   ` Ulf Hansson
2020-03-04 12:12   ` Sudeep Holla
2020-03-04 12:12     ` Sudeep Holla
2020-03-04 12:20     ` Ulf Hansson
2020-03-04 12:20       ` Ulf Hansson
2020-03-03 20:35 ` [PATCH v2 4/4] cpuidle: psci: Allow WFI to be the only state for the hierarchical topology Ulf Hansson
2020-03-03 20:35   ` Ulf Hansson
2020-03-04 12:23   ` Sudeep Holla
2020-03-04 12:23     ` Sudeep Holla
2020-03-05 14:17     ` Ulf Hansson
2020-03-05 14:17       ` Ulf Hansson
2020-03-05 16:23       ` Sudeep Holla
2020-03-05 16:23         ` Sudeep Holla
2020-03-06  9:28         ` Ulf Hansson
2020-03-06  9:28           ` Ulf Hansson
2020-03-06 10:04           ` Sudeep Holla
2020-03-06 10:04             ` Sudeep Holla
2020-03-06 10:47             ` Benjamin Gaignard [this message]
2020-03-06 10:47               ` Benjamin Gaignard
2020-03-06 12:06               ` Sudeep Holla
2020-03-06 12:06                 ` Sudeep Holla
2020-03-06 12:32                 ` Benjamin Gaignard
2020-03-06 12:32                   ` Benjamin Gaignard
2020-03-06 14:23                   ` Sudeep Holla
2020-03-06 14:23                     ` Sudeep Holla
2020-03-06 14:44                     ` Benjamin Gaignard
2020-03-06 14:44                       ` Benjamin Gaignard
2020-03-06 14:50                       ` Sudeep Holla
2020-03-06 14:50                         ` Sudeep Holla
2020-03-06 15:35                         ` Benjamin Gaignard
2020-03-06 15:35                           ` Benjamin Gaignard
2020-03-06 15:55                           ` Sudeep Holla
2020-03-06 15:55                             ` Sudeep Holla
2020-03-03 22:27 ` [PATCH v2 0/4] cpuidle: psci: Some fixes when using the hierarchical layout Rafael J. Wysocki
2020-03-03 22:27   ` Rafael J. Wysocki
2020-03-09  7:20   ` Ulf Hansson
2020-03-09  7:20     ` Ulf Hansson
2020-03-10  8:37     ` Rafael J. Wysocki
2020-03-10  8:37       ` Rafael J. Wysocki

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=CA+M3ks764moVU2h9iZJuN6B-e4wBUMymBfPnob_zraf50xqezA@mail.gmail.com \
    --to=benjamin.gaignard@linaro.org \
    --cc=Lorenzo.Pieralisi@arm.com \
    --cc=benjamin.gaignard@st.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=ilina@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=sboyd@kernel.org \
    --cc=sudeep.holla@arm.com \
    --cc=ulf.hansson@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.