From: Chunyan Zhang <chunyan.zhang@spreadtrum.com>
To: Sudeep Holla <sudeep.holla@arm.com>
Cc: <devicetree@vger.kernel.org>, <orson.zhai@spreadtrum.com>,
open list <linux-kernel@vger.kernel.org>,
linux-arm <linux-arm-kernel@lists.infradead.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH 1/5] arm64: dts: Add basic DT to support Spreadtrum's SP9860G
Date: Mon, 20 Feb 2017 20:56:44 +0800 [thread overview]
Message-ID: <20170220125644.GB9600@spreadtrum.com> (raw)
In-Reply-To: <c28ee4e9-9abe-c019-2439-f9cb239b67e9@arm.com>
On 一, 2月 20, 2017 at 10:47:56上午 +0000, Sudeep Holla wrote:
>
>
> On 20/02/17 09:37, Chunyan Zhang wrote:
> > Hi Sudeep,
> >
> > On 五, 2月 17, 2017 at 10:28:00上午 +0000, Sudeep Holla wrote:
> >>
> >>
> >> On 17/02/17 07:28, Chunyan Zhang wrote:
> >>> Hi Sudeep,
> >>>
> >>> On 二, 2月 14, 2017 at 04:44:53下午 +0000, Sudeep Holla wrote:
> >>>> On Tue, Feb 14, 2017 at 9:19 AM, Chunyan Zhang
> >>>> <chunyan.zhang@spreadtrum.com> wrote:
> >>
> >> [..]
> >>
> >>>>
> >>>>> + idle-states{
> >>>>> + entry-method = "arm,psci";
> >>>>> +
> >>>>> + CORE_PD: core_pd {
> >>>>> + compatible = "arm,idle-state";
> >>>>> + entry-latency-us = <1000>;
> >>>>> + exit-latency-us = <700>;
> >>>>> + min-residency-us = <2500>;
> >>>>> + local-timer-stop;
> >>>>> + arm,psci-suspend-param = <0x00010002>;
> >>>>> + };
> >>>>> +
> >>>>> + CLUSTER_PD: cluster_pd {
> >>>>> + compatible = "arm,idle-state";
> >>>>> + entry-latency-us = <1000>;
> >>>>> + exit-latency-us = <1000>;
> >>>>> + min-residency-us = <3000>;
> >>>>> + local-timer-stop;
> >>>>> + arm,psci-suspend-param = <0x01010003>;
> >>>>> + };
> >>>>> +
> >>>>> + DEEP_SLEEP: deep_sleep {
> >>>>> + compatible = "arm,idle-state";
> >>>>> + wakeup-latency-us = <0xffffffff>;
> >>>>
> >>>> A value > 4294 seconds(i.e >1 hour) seems suspicious.
> >>>> Are you working around the firmware issue with high latency value so
> >>>> that it's never entered ? Why not remove advertising the state from DT.
> >>>>
> >>>
> >>> Haved checked with related colleagues, this node 'deep_sleep' was not for working
> >>> around any firmware issue, but was a trick utilization of idle subsystem, and that
> >>
> >> Really ? Any latency greater few milliseconds are sounds useless. I
> >> still don't understand what you mean by "trick utilization of idle
> >> subsystem".
> >>
> >
> > Sorry for confused expression, I meant it was not a right way to utilize idle mechanism
> > and shouldn't be upstreamed.
> >
>
> No problem.
>
> >>> was definitely not elegant, the author indeed intendly didn't want CPU entered this
> >>> state, I will remove this node therefore.
> >>
> >> It's quick and dirty "HACK* to retain and advertise the state but
> >> ensure it's never entered and obstruct the boot. It's not a trick to
> >> exploit any idle subsystem utilization.
> >>
> >
>
> > Right, actually deep_sleep was for 'suspend' (forces idleness upon
> > the OS until a wake-up event resumes the OS from suspend), for
> > example when users press power key on mobile phone to turn off the
> > screen. So the author implemented 'suspend' using cpu_psci_ops::cpu_suspend
> > I figure that this way is not correct, I will remove this state from DT.
>
> OK.
>
> > I would appreciate any suggestion for how to implement this kind of
> > function properly.
>
>
> For the 'suspend' functionality you have described above, all you need
> is the firmware to implement PSCI SYSTEM_SUSPEND API in the firmware.
> The kernel psci driver detects the presence of the same and registers
> the suspend ops automatically. You need not add anything in the code or
> DT for the same.
Thank you Sudeep, I will have my colleague to study further according to
the direction you provided here.
Thanks for your comments,
Chunyan
>
> --
> Regards,
> Sudeep
next prev parent reply other threads:[~2017-02-20 12:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-14 9:19 [PATCH 0/5] Add Spreadtrum SP9860G support Chunyan Zhang
2017-02-14 9:19 ` [PATCH 1/5] arm64: dts: Add basic DT to support Spreadtrum's SP9860G Chunyan Zhang
2017-02-14 15:57 ` Mark Rutland
2017-02-16 7:57 ` Chunyan Zhang
2017-02-14 16:44 ` Sudeep Holla
2017-02-17 7:28 ` Chunyan Zhang
2017-02-17 10:28 ` Sudeep Holla
2017-02-20 9:37 ` Chunyan Zhang
2017-02-20 10:47 ` Sudeep Holla
2017-02-20 12:56 ` Chunyan Zhang [this message]
2017-02-14 9:19 ` [PATCH 2/5] Documentation: sprd: Add bindings for SP9860G Chunyan Zhang
2017-02-14 9:19 ` [PATCH 3/5] devicetree: bindings: revise compatible string of sprd uart Chunyan Zhang
2017-02-14 17:02 ` Rob Herring
2017-02-14 9:19 ` [PATCH 4/5] sprd_serial: switch comptible string to sc-uart Chunyan Zhang
2017-02-16 13:31 ` Arnd Bergmann
2017-02-17 7:35 ` Chunyan Zhang
2017-02-14 9:19 ` [PATCH 5/5] serial: sprd: adjust TIMEOUT to a big value Chunyan Zhang
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=20170220125644.GB9600@spreadtrum.com \
--to=chunyan.zhang@spreadtrum.com \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=orson.zhai@spreadtrum.com \
--cc=robh+dt@kernel.org \
--cc=sudeep.holla@arm.com \
--cc=will.deacon@arm.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).