From: jean.pihet@newoldbits.com (jean.pihet at newoldbits.com)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/5] ARM: OMAP2+: PM debug: use the power domains registers caching API
Date: Tue, 1 May 2012 15:07:43 +0200 [thread overview]
Message-ID: <1335877663-32649-6-git-send-email-j-pihet@ti.com> (raw)
In-Reply-To: <1335877663-32649-1-git-send-email-j-pihet@ti.com>
From: Jean Pihet <j-pihet@ti.com>
Use the caching API instead of using the internal pwrdm->state field
for PM debug statistics display.
Note: some power domains states mismatch messages can be printed out with
the power domains states statstics, indicating that the power domains are
not controlled by any driver or that the invalidate API is not correctly
used.
Signed-off-by: Jean Pihet <j-pihet@ti.com>
---
arch/arm/mach-omap2/pm-debug.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
index 13c00fb..ed9846e 100644
--- a/arch/arm/mach-omap2/pm-debug.c
+++ b/arch/arm/mach-omap2/pm-debug.c
@@ -96,19 +96,20 @@ static int clkdm_dbg_show_counter(struct clockdomain *clkdm, void *user)
static int pwrdm_dbg_show_counter(struct powerdomain *pwrdm, void *user)
{
struct seq_file *s = (struct seq_file *)user;
- int i;
+ int i, pwrst;
if (strcmp(pwrdm->name, "emu_pwrdm") == 0 ||
strcmp(pwrdm->name, "wkup_pwrdm") == 0 ||
strncmp(pwrdm->name, "dpll", 4) == 0)
return 0;
- if (pwrdm->state != pwrdm_read_func_pwrst(pwrdm))
- printk(KERN_ERR "pwrdm state mismatch(%s) %d != %d\n",
- pwrdm->name, pwrdm->state, pwrdm_read_func_pwrst(pwrdm));
+ pwrst = pwrdm_read_func_pwrst(pwrdm);
+ if (pwrdm->state != pwrst)
+ printk(KERN_ERR "pwrdm state mismatch(%s): last saved %d != current %d\n",
+ pwrdm->name, pwrdm->state, pwrst);
seq_printf(s, "%s (%s)", pwrdm->name,
- pwrdm_state_names[pwrdm->state]);
+ pwrdm_state_names[pwrst]);
for (i = 0; i < PWRDM_MAX_FUNC_PWRSTS; i++)
seq_printf(s, ",%s:%d", pwrdm_state_names[i],
pwrdm->state_counter[i]);
@@ -126,7 +127,7 @@ static int pwrdm_dbg_show_counter(struct powerdomain *pwrdm, void *user)
static int pwrdm_dbg_show_timer(struct powerdomain *pwrdm, void *user)
{
struct seq_file *s = (struct seq_file *)user;
- int i;
+ int i, pwrst;
if (strcmp(pwrdm->name, "emu_pwrdm") == 0 ||
strcmp(pwrdm->name, "wkup_pwrdm") == 0 ||
@@ -134,9 +135,10 @@ static int pwrdm_dbg_show_timer(struct powerdomain *pwrdm, void *user)
return 0;
pwrdm_state_switch(pwrdm);
+ pwrst = pwrdm_read_func_pwrst(pwrdm);
seq_printf(s, "%s (%s)", pwrdm->name,
- pwrdm_state_names[pwrdm->state]);
+ pwrdm_state_names[pwrst]);
for (i = 0; i < PWRDM_MAX_FUNC_PWRSTS; i++)
seq_printf(s, ",%s:%lld", pwrdm_state_names[i],
--
1.7.7.6
next prev parent reply other threads:[~2012-05-01 13:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-01 13:07 [PATCH 0/5] ARM: OMAP2+: PM: implement a caching mechanism on the power domains state registers jean.pihet at newoldbits.com
2012-05-01 13:07 ` [PATCH 1/5] " jean.pihet at newoldbits.com
2012-05-01 13:07 ` [PATCH 2/5] ARM: OMAP2+: PM: use the power domains registers cache for the power states jean.pihet at newoldbits.com
2012-05-01 15:37 ` Jon Hunter
2012-05-03 6:38 ` Bedia, Vaibhav
2012-05-03 7:28 ` Jean Pihet
2012-05-01 13:07 ` [PATCH 3/5] ARM: OMAP2+: PM: use the power domains registers cache for the logic and mem states jean.pihet at newoldbits.com
2012-05-01 15:37 ` Jon Hunter
2012-05-01 13:07 ` [PATCH 4/5] ARM: OMAP2+: PM: use the power domains registers cache invalidate API jean.pihet at newoldbits.com
2012-05-01 13:07 ` jean.pihet at newoldbits.com [this message]
2012-05-01 15:37 ` [PATCH 0/5] ARM: OMAP2+: PM: implement a caching mechanism on the power domains state registers Jon Hunter
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=1335877663-32649-6-git-send-email-j-pihet@ti.com \
--to=jean.pihet@newoldbits.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;
as well as URLs for NNTP newsgroup(s).