From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: "Linux-sh list" <linux-sh@vger.kernel.org>
Cc: Linux PM list <linux-pm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Magnus Damm <magnus.damm@gmail.com>
Subject: [PATCH 1/4] PM / shmobile: Set PM domain on/off latencies directly
Date: Wed, 8 Aug 2012 00:27:10 +0200 [thread overview]
Message-ID: <201208080027.10394.rjw@sisk.pl> (raw)
In-Reply-To: <201208080026.01738.rjw@sisk.pl>
The results of adaptive latency computations in __pm_genpd_poweron()
and pm_genpd_poweroff() show that the power on/power off latencies
of all power domains in SH7372 are a little below 250 us. Therefore,
if 250 us is used as the common initial value of the latency fields
in struct generic_pm_domain for all domains, the latency values
will never have to change at run time and there won't be any overhead
related to re-computation of the corresponding PM QoS data.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
arch/arm/mach-shmobile/pm-sh7372.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
Index: linux/arch/arm/mach-shmobile/pm-sh7372.c
===================================================================
--- linux.orig/arch/arm/mach-shmobile/pm-sh7372.c
+++ linux/arch/arm/mach-shmobile/pm-sh7372.c
@@ -71,6 +71,8 @@
#ifdef CONFIG_PM
+#define PM_DOMAIN_ON_OFF_LATENCY_NS 250000
+
static int sh7372_a4r_pd_suspend(void)
{
sh7372_intcs_suspend();
@@ -110,32 +112,46 @@ static int sh7372_a3sp_pd_suspend(void)
static struct rmobile_pm_domain sh7372_pm_domains[] = {
{
.genpd.name = "A4LC",
+ .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
+ .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
.bit_shift = 1,
},
{
.genpd.name = "A4MP",
+ .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
+ .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
.bit_shift = 2,
},
{
.genpd.name = "D4",
+ .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
+ .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
.bit_shift = 3,
},
{
.genpd.name = "A4R",
+ .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
+ .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
.bit_shift = 5,
.suspend = sh7372_a4r_pd_suspend,
.resume = sh7372_intcs_resume,
},
{
.genpd.name = "A3RV",
+ .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
+ .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
.bit_shift = 6,
},
{
.genpd.name = "A3RI",
+ .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
+ .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
.bit_shift = 8,
},
{
.genpd.name = "A4S",
+ .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
+ .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
.bit_shift = 10,
.gov = &pm_domain_always_on_gov,
.no_debug = true,
@@ -144,6 +160,8 @@ static struct rmobile_pm_domain sh7372_p
},
{
.genpd.name = "A3SP",
+ .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
+ .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
.bit_shift = 11,
.gov = &pm_domain_always_on_gov,
.no_debug = true,
@@ -151,6 +169,8 @@ static struct rmobile_pm_domain sh7372_p
},
{
.genpd.name = "A3SG",
+ .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
+ .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
.bit_shift = 13,
},
};
next prev parent reply other threads:[~2012-08-08 9:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-21 21:49 [RFC][PATCH 0/5] PM / shmobile: Specify PM domain and device latency information directly Rafael J. Wysocki
2012-07-21 21:53 ` [RFC][PATCH 1/5] PM / shmobile: Set SH7372 PM domain on/off latencies directly Rafael J. Wysocki
2012-07-21 21:54 ` [RFC][PATCH 2/5] PM / shmobile: Allow device latencies to be specified directly Rafael J. Wysocki
2012-07-21 21:54 ` [RFC][PATCH 3/5] PM / shmobile: Specify device latencies for SH7372 devices directly Rafael J. Wysocki
2012-07-21 21:55 ` [RFC][PATCH 4/5] PM / shmobile: Specify device latencies for Mackerel " Rafael J. Wysocki
2012-07-21 21:56 ` [RFC][PATCH 5/5] PM / shmobile: Allow device latencies to be read from a DT Rafael J. Wysocki
2012-08-07 22:26 ` [PATCH 0/4] PM / shmobile: Specify PM domain and device latency information directly Rafael J. Wysocki
2012-08-07 22:27 ` Rafael J. Wysocki [this message]
2012-08-07 22:27 ` [PATCH 2/4] PM / shmobile: Allow device latencies to be specified directly Rafael J. Wysocki
2012-08-07 22:28 ` [PATCH 3/4] PM / shmobile: Specify device latencies for SH7372 devices directly Rafael J. Wysocki
2012-08-07 22:29 ` [PATCH 4/4] PM / shmobile: Specify device latencies for Mackerel " Rafael J. Wysocki
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=201208080027.10394.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.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).