From: Tero Kristo <t-kristo@ti.com>
To: Paul Walmsley <paul@pwsan.com>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Jean Pihet <j-pihet@ti.com>
Subject: Re: [PATCH 07/12] ARM: OMAP2+: PM: use power domain functional state in stats counters
Date: Fri, 4 Jan 2013 16:07:17 +0200 [thread overview]
Message-ID: <1357308437.2221.106.camel@sokoban> (raw)
In-Reply-To: <20121209175314.6933.92188.stgit@dusk.lan>
Hi Paul,
On Sun, 2012-12-09 at 10:53 -0700, Paul Walmsley wrote:
> From: Jean Pihet <jean.pihet@newoldbits.com>
>
> The PM code uses some counters to keep track of the power domains
> transitions, in order to provide the information to drivers (in
> pwrdm_get_context_loss_count) and to expose the information to
> sysfs for debug purpose.
>
> This patch provides the information for each functional state.
>
> Signed-off-by: Jean Pihet <j-pihet@ti.com>
> [paul@pwsan.com: use PWRDM_FPWRSTS_COUNT due to functional power state offset;
> use powerdomain.c fn to convert func pwrsts to names; rename 'state' to
> 'fpwrst' to indicate use of func pwrsts; convert remaining users of the
> non-func pwrst API; add some kerneldoc]
> Signed-off-by: Paul Walmsley <paul@pwsan.com>
> ---
> arch/arm/mach-omap2/pm-debug.c | 42 ++++-----
> arch/arm/mach-omap2/powerdomain.c | 167 ++++++++++++++++++-------------------
> arch/arm/mach-omap2/powerdomain.h | 17 ++--
> 3 files changed, 108 insertions(+), 118 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
> index 806a06b..72cf9e0 100644
> --- a/arch/arm/mach-omap2/pm-debug.c
> +++ b/arch/arm/mach-omap2/pm-debug.c
> @@ -53,13 +53,6 @@ enum {
> DEBUG_FILE_TIMERS,
> };
>
> -static const char pwrdm_state_names[][PWRDM_MAX_PWRSTS] = {
> - "OFF",
> - "RET",
> - "INA",
> - "ON"
> -};
> -
> void pm_dbg_update_time(struct powerdomain *pwrdm, int prev)
> {
> s64 t;
> @@ -70,7 +63,7 @@ void pm_dbg_update_time(struct powerdomain *pwrdm, int prev)
> /* Update timer for previous state */
> t = sched_clock();
>
> - pwrdm->state_timer[prev] += t - pwrdm->timer;
> + pwrdm->fpwrst_timer[prev - PWRDM_FPWRST_OFFSET] += t - pwrdm->timer;
>
> pwrdm->timer = t;
> }
> @@ -79,6 +72,7 @@ static int clkdm_dbg_show_counter(struct clockdomain *clkdm, void *user)
> {
> struct seq_file *s = (struct seq_file *)user;
>
> + /* XXX This needs to be implemented in a better way */
IMO, this part should be dropped, or re-implemented completely. It is
uninformative and I don't think anybody uses it. With the usecounting
fixes in place, it is better than before but still doesn't provide too
much useful information. Would be good to show the clocks that actually
are enabled along with the clockdomain use counts, but in either case,
it doesn't belong in the same debugfs file as the pwrdm counters.
-Tero
next prev parent reply other threads:[~2013-01-04 14:07 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-09 17:52 [PATCH 00/12] ARM: OMAP2+: powerdomain/PM: convert to functional power states Paul Walmsley
2012-12-09 17:52 ` [PATCH 01/12] ARM: OMAP2+: powerdomain: add functions that report on powerdomain capabilities Paul Walmsley
2012-12-09 17:53 ` [PATCH 02/12] ARM: OMAP2+: PM: introduce power domains functional states Paul Walmsley
2012-12-12 10:00 ` Jean Pihet
2013-01-29 21:20 ` Paul Walmsley
2012-12-12 10:21 ` Vaibhav Hiremath
2012-12-12 10:33 ` Jean Pihet
2013-01-04 13:22 ` Tero Kristo
2012-12-26 6:06 ` Bedia, Vaibhav
2012-12-09 17:53 ` [PATCH 03/12] ARM: OMAP2+: PM debug: trace the functional power domains states Paul Walmsley
2012-12-09 17:53 ` [PATCH 04/12] ARM: OMAP2xxx: PM: convert to use the functional power states API Paul Walmsley
2012-12-09 17:53 ` [PATCH 05/12] ARM: OMAP3xxx: " Paul Walmsley
2012-12-12 10:18 ` Jean Pihet
2012-12-12 10:29 ` Jean Pihet
2013-01-04 13:45 ` Tero Kristo
2012-12-09 17:53 ` [PATCH 06/12] ARM: OMAP44xx: " Paul Walmsley
2012-12-12 10:41 ` Jean Pihet
2013-01-04 14:01 ` Tero Kristo
2012-12-09 17:53 ` [PATCH 07/12] ARM: OMAP2+: PM: use power domain functional state in stats counters Paul Walmsley
2012-12-12 10:46 ` Jean Pihet
2013-01-04 14:07 ` Tero Kristo [this message]
2012-12-09 17:53 ` [PATCH 08/12] ARM: OMAP2+: powerdomain: drop many low-level powerdomain funcs Paul Walmsley
2012-12-09 17:53 ` [PATCH 09/12] ARM: OMAP2+: powerdomain: add ability to test for supported power states Paul Walmsley
2012-12-09 17:53 ` [PATCH 10/12] ARM: OMAP2+: powerdomain/PM: only program " Paul Walmsley
2012-12-09 17:53 ` [PATCH 11/12] ARM: OMAP2+: powerdomain: program memory bank next-power-state upon init Paul Walmsley
2012-12-09 17:53 ` [PATCH 12/12] ARM: OMAP2+: powerdomain: assume memory bank power states follow powerdomain Paul Walmsley
2013-01-04 14:12 ` [PATCH 00/12] ARM: OMAP2+: powerdomain/PM: convert to functional power states Tero Kristo
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=1357308437.2221.106.camel@sokoban \
--to=t-kristo@ti.com \
--cc=j-pihet@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.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).