From: Scott Wood <scottwood@freescale.com>
To: Wang Dongsheng-B40534 <B40534@freescale.com>
Cc: Wood Scott-B07421 <B07421@freescale.com>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH v3 4/4] powerpc/85xx: add sysfs for pw20 state and altivec idle
Date: Mon, 16 Sep 2013 16:09:29 -0500 [thread overview]
Message-ID: <1379365769.2536.169.camel@snotra.buserror.net> (raw)
In-Reply-To: <ABB05CD9C9F68C46A5CEDC7F154392590107C5F0@039-SN2MPN1-021.039d.mgd.msft.net>
On Thu, 2013-09-12 at 21:53 -0500, Wang Dongsheng-B40534 wrote:
>
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Friday, September 13, 2013 2:07 AM
> > To: Wang Dongsheng-B40534
> > Cc: Wood Scott-B07421; galak@kernel.crashing.org; linuxppc-
> > dev@lists.ozlabs.org
> > Subject: Re: [PATCH v3 4/4] powerpc/85xx: add sysfs for pw20 state and
> > altivec idle
> >
> > On Wed, 2013-09-11 at 22:48 -0500, Wang Dongsheng-B40534 wrote:
> > >
> > > > -----Original Message-----
> > > > From: Wood Scott-B07421
> > > > Sent: Thursday, September 12, 2013 7:04 AM
> > > > To: Wang Dongsheng-B40534
> > > > Cc: galak@kernel.crashing.org; linuxppc-dev@lists.ozlabs.org
> > > > Subject: Re: [PATCH v3 4/4] powerpc/85xx: add sysfs for pw20 state
> > > > and altivec idle
> > > >
> > > > On Wed, 2013-09-11 at 13:56 +0800, Dongsheng Wang wrote:
> > > > > From: Wang Dongsheng <dongsheng.wang@freescale.com>
> > > > >
> > > > > Add a sys interface to enable/diable pw20 state or altivec idle,
> > > > > and control the wait entry time.
> > > > >
> > > > > Enable/Disable interface:
> > > > > 0, disable. 1, enable.
> > > > > /sys/devices/system/cpu/cpuX/pw20_state
> > > > > /sys/devices/system/cpu/cpuX/altivec_idle
> > > > >
> > > > > Set wait entry bit interface:
> > > > > bit value range 0~63, 0 bit is Mintime, 63 bit is Maxtime.
> > > > > /sys/devices/system/cpu/cpuX/pw20_wait_entry_bit
> > > > > /sys/devices/system/cpu/cpuX/altivec_idle_wait_entry_bit
> > > >
> > > > I'm no fan of the way powerpc does bit numbering, but don't flip it
> > > > around here -- you'll just cause confusion.
> > > >
> > > OK. 0 bit is maxtime, 63 bit is mintime.
> > >
> > > > Better yet, this interface should take real time units rather than a
> > > > timebase bit.
> > > >
> > > I think the real time is not suitable, because timebase bit does not
> > > correspond with real time.
> >
> > It's a bit sloppy due to how the hardware works, but you could convert it
> > like you did in earlier patches. Semantically it should probably be the
> > minimum time to wait before entering the low power state.
> >
> But there has a problem, we can't convert bit to the real time when user read this sysfs.
> Like:
> echo 1000(us) > /sys/*/pw20_wait_entry_bit, after convert we get bit is 49.
> cat /sys/*/pw20_wait_entry_bit, after convert the time is 1598(us).
>
> The read out of the time is not real time. Unless we define a variable to save the real time.
It's not the end of the world if the value is different when read back.
It just gets rounded up when you write it.
> > > > Also, you disable the power saving mode if the maximum interval is
> > > > selected,
> > > It's not disable the pw20 state or altivec idle, just max-delay entry
> > time.
> >
> > No, the code checks for zero to set or clear the enabling bit (e.g.
> > PW20_WAIT).
> >
> There has pw20_state/altivec_idle sys interface to control "enable/disable",
> There is only to control wait bit. Did you mean remove "pw20_state/altivec_idle"
> sys interface, and reuse "pw20_wait_entry_bit/altivec_idle*" sys interface?
> When echo zero into "pw20_wait_entry_bit" we just to disable pw20 state, I think that is reasonable. :)
Sorry, I misread the patch and didn't realize these were separate
interfaces.
-Scott
next prev parent reply other threads:[~2013-09-16 21:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-11 5:56 [PATCH v3 1/4] powerpc/fsl: add E6500 PVR and SPRN_PWRMGTCR0 define Dongsheng Wang
2013-09-11 5:56 ` [PATCH v3 2/4] powerpc/85xx: add hardware automatically enter altivec idle state Dongsheng Wang
2013-09-11 22:42 ` Scott Wood
2013-09-12 2:27 ` Wang Dongsheng-B40534
2013-09-11 5:56 ` [PATCH v3 3/4] powerpc/85xx: add hardware automatically enter pw20 state Dongsheng Wang
2013-09-11 5:56 ` [PATCH v3 4/4] powerpc/85xx: add sysfs for pw20 state and altivec idle Dongsheng Wang
2013-09-11 23:04 ` Scott Wood
2013-09-12 3:48 ` Wang Dongsheng-B40534
2013-09-12 18:06 ` Scott Wood
2013-09-13 2:53 ` Wang Dongsheng-B40534
2013-09-16 21:09 ` Scott Wood [this message]
2013-09-18 3:35 ` Wang Dongsheng-B40534
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=1379365769.2536.169.camel@snotra.buserror.net \
--to=scottwood@freescale.com \
--cc=B07421@freescale.com \
--cc=B40534@freescale.com \
--cc=linuxppc-dev@lists.ozlabs.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;
as well as URLs for NNTP newsgroup(s).