From: lorenzo.pieralisi@arm.com (Lorenzo Pieralisi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: dts: Add idle-states for Juno
Date: Thu, 7 May 2015 13:40:29 +0100 [thread overview]
Message-ID: <20150507124029.GE30328@red-moon> (raw)
In-Reply-To: <20150501135811.GW7440@e106497-lin.cambridge.arm.com>
On Fri, May 01, 2015 at 02:58:11PM +0100, Liviu Dudau wrote:
> On Fri, May 01, 2015 at 12:55:07PM +0100, Leo Yan wrote:
> > On Fri, May 01, 2015 at 11:45:06AM +0100, Lorenzo Pieralisi wrote:
> > > On Fri, May 01, 2015 at 11:22:31AM +0100, Jon Medhurst (Tixy) wrote:
> > > > On Fri, 2015-05-01 at 09:55 +0800, Leo Yan wrote:
> > > > [...]
> > > > > > arch/arm64/boot/dts/arm/juno.dts | 28 ++++++++++++++++++++++++++++
> > > > > > 1 file changed, 28 insertions(+)
> > > > > >
> > > > > > diff --git a/arch/arm64/boot/dts/arm/juno.dts b/arch/arm64/boot/dts/arm/juno.dts
> > > > > > index 133ee59..7a9a449 100644
> > > > > > --- a/arch/arm64/boot/dts/arm/juno.dts
> > > > > > +++ b/arch/arm64/boot/dts/arm/juno.dts
> > > > > > @@ -34,12 +34,35 @@
> > > > > > #address-cells = <2>;
> > > > > > #size-cells = <0>;
> > > > > >
> > > > > > + idle-states {
> > > > > > + entry-method = "arm,psci";
> > > > > > +
> > > > > > + CPU_SLEEP_0: cpu-sleep-0 {
> > > > > > + compatible = "arm,idle-state";
> > > > > > + arm,psci-suspend-param = <0x0010000>;
> > > > > > + local-timer-stop;
> > > > >
> > > > > Just want to figure out the best way for big.LITTLE system; so have
> > > > > one question: CA53 and CA57 have different power domain for arch
> > > > > timer, right?
> > > >
> > > > I'm not sure of the answer to that. The documentation I have does seem
> > > > to state the timer is lost on cluster power down, which would imply that
> > > > it's not when just powering down a cpu, but I'm not at all clear on the
> > > > matter.
> > > >
> > > > > If this is the case, should we define two kinds of cpu
> > > > > sleep states, one of them will not migrate to broadcast timer and
> > > > > keep using arch timer after cpu has been powered down?
> > > >
> > > > Do you mean that if the local timer is not lost (and so we should not
> > > > have local-timer-stop above), then we should have another identical idle
> > > > state except that it _does_ specify local-timer-stop to force the
> > > > broadcast time to be used? If so, would that second state ever be more
> > > > power efficient than the first? (I don't know the answer to that, this
> > > > whole area is pretty new to me).
> > >
> > > Ok, to start with, if we want the generic CPUidle driver to work on bL
> > > systems, we should get this patch merged:
> > >
> > > http://www.spinics.net/lists/arm-kernel/msg412790.html
> >
> > Thanks pointing out this.
> >
> > > Architected timer is always lost on power down, unless we are talking
> > > about a logic retention state (or if we are talking about local timers
> > > that are not the architected ones). Anyway, with the patch above, different
> > > cpus can have different idle states, so different behaviours when it
> > > comes to the local timer behaviour. If, say, on a A53/A57 system, A53
> > > cpus lose the local timer on idle state entry and A57 cpus do not
> > > (that's a non-existing example though), those cpus will have different
> > > idle states so different local-timer-stop flags.
> >
> > For A57, not sure if arch timer will be powered off if cpu has been
> > powered off.
> >
> > From A53's TRM figure 2-1 Cortex-A53 processor block diagram, the arch
> > timer is not within CPU power domain, so likey arch timer still will
> > work even cpu has been powered off (PDCPU/PDADVSIMD both have been off).
> > This looks like is not aligning w/t your upper description. Could u
> > confirm this understanding is right?
>
> Not quite. Behind the architected timers there is a system shared counter
> that is used as a basis for the local CPU's counter. So when a CPU is being
> powered off the system counter still counts and the CPU's copy gets updated
> on power on by the firmware (hopefully).
There is nothing to be updated (ie CPUidle will never shut off the PDSOC
power domain), the system counter still counts on cpu and cluster power off,
but the logic implementing the arch timer in the cpu (ie comparators) is lost
on power off, so the arch timer has to be offloaded to the broadcast device.
HTH,
Lorenzo
next prev parent reply other threads:[~2015-05-07 12:40 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-30 13:57 [PATCH] arm64: dts: Add idle-states for Juno Jon Medhurst (Tixy)
2015-04-30 15:42 ` Liviu Dudau
2015-04-30 16:28 ` Jon Medhurst (Tixy)
2015-04-30 16:00 ` Sudeep Holla
2015-04-30 16:40 ` Jon Medhurst (Tixy)
2015-04-30 16:57 ` Sudeep Holla
2015-04-30 17:17 ` Lorenzo Pieralisi
2015-04-30 17:36 ` Jon Medhurst (Tixy)
2015-04-30 17:40 ` Sudeep Holla
2015-05-01 8:52 ` Jon Medhurst (Tixy)
2015-05-01 9:02 ` Catalin Marinas
2015-05-01 10:12 ` Lorenzo Pieralisi
2015-05-01 10:22 ` Liviu Dudau
2015-05-01 11:20 ` Lorenzo Pieralisi
2015-05-01 13:30 ` Catalin Marinas
2015-05-01 14:28 ` Lorenzo Pieralisi
2015-05-01 1:55 ` Leo Yan
2015-05-01 10:22 ` Jon Medhurst (Tixy)
2015-05-01 10:45 ` Lorenzo Pieralisi
2015-05-01 11:55 ` Leo Yan
2015-05-01 13:58 ` Liviu Dudau
2015-05-07 12:40 ` Lorenzo Pieralisi [this message]
2015-05-07 14:32 ` Leo Yan
2015-05-01 11:39 ` Leo Yan
2015-10-22 13:22 ` Punit Agrawal
2015-10-26 14:12 ` Jon Medhurst (Tixy)
2015-10-26 15:17 ` Lorenzo Pieralisi
2015-11-23 17:45 ` Punit Agrawal
2015-11-24 17:53 ` Lorenzo Pieralisi
2015-12-07 16:59 ` Punit Agrawal
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=20150507124029.GE30328@red-moon \
--to=lorenzo.pieralisi@arm.com \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox