From: Kevin Hilman <khilman@ti.com>
To: Trinabh Gupta <trinabh@linux.vnet.ibm.com>
Cc: arjan@linux.intel.com, peterz@infradead.org, lenb@kernel.org,
venki@google.com, ak@linux.intel.com, len.brown@intel.com,
davinci-linux-open-source@linux.davincidsp.com,
linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-acpi@vger.kernel.org, linux-pm@lists.linux-foundation.org,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [linux-pm] [RFC PATCH V3 4/4] cpuidle: Single/Global registration of idle states
Date: Wed, 20 Apr 2011 10:33:25 -0700 [thread overview]
Message-ID: <87k4eo6d5m.fsf@ti.com> (raw)
In-Reply-To: <20110420065608.332.30043.stgit@tringupt.in.ibm.com> (Trinabh Gupta's message of "Wed, 20 Apr 2011 12:26:34 +0530")
Trinabh Gupta <trinabh@linux.vnet.ibm.com> writes:
> With this patch there is single copy of cpuidle_states structure
> instead of per-cpu. The statistics needed on per-cpu basis
> by the governor are kept per-cpu. This simplifies the cpuidle
> subsystem as state registration is done by single cpu only.
> Having single copy of cpuidle_states saves memory. Rare case
> of asymmetric C-states can be handled within the cpuidle driverand
> architectures such as POWER do not have asymmetric C-states.
I haven't actually tested this series on OMAP yet, but it currently
doesn't compile.
The patch below (on top of your series) is required to compile on OMAP,
I think it's doing what you intended, but please confirm.
Kevin
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index 6641574..ab77ba3 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -512,6 +512,7 @@ static int omap3_cpuidle_driver_init(void)
int i, retval, count = 0;
struct omap3_processor_cx *cx;
struct cpuidle_state *state;
+ struct cpuidle_driver *drv = &omap3_idle_driver;
mpu_pd = pwrdm_lookup("mpu_pwrdm");
core_pd = pwrdm_lookup("core_pwrdm");
@@ -532,7 +533,7 @@ static int omap3_cpuidle_driver_init(void)
state->enter = (state->flags & CPUIDLE_FLAG_CHECK_BM) ?
omap3_enter_idle_bm : omap3_enter_idle;
if (cx->type == OMAP3_STATE_C1)
- dev->safe_state_index = count;
+ drv->safe_state_index = count;
sprintf(state->name, "C%d", count+1);
strncpy(state->desc, cx->desc, CPUIDLE_DESC_LEN);
count++;
next prev parent reply other threads:[~2011-04-20 17:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-20 6:55 [RFC PATCH V3 0/4] cpuidle: global registration of idle states with per-cpu statistics Trinabh Gupta
2011-04-20 6:55 ` [RFC PATCH V3 1/4] cpuidle: Move dev->last_residency update to driver enter routine; remove dev->last_state Trinabh Gupta
2011-04-20 17:27 ` [linux-pm] " Kevin Hilman
2011-04-21 4:42 ` Trinabh Gupta
2011-04-20 6:55 ` [RFC PATCH V3 2/4] cpuidle: Remove CPUIDLE_FLAG_IGNORE and dev->prepare() Trinabh Gupta
2011-04-20 6:56 ` [RFC PATCH V3 3/4] Split cpuidle_state structure and move per-cpu statistics fields Trinabh Gupta
2011-04-20 6:56 ` [RFC PATCH V3 4/4] cpuidle: Single/Global registration of idle states Trinabh Gupta
2011-04-20 17:33 ` Kevin Hilman [this message]
2011-04-21 4:53 ` [linux-pm] " Trinabh Gupta
2011-04-22 23:06 ` Kevin Hilman
2011-04-25 12:00 ` Trinabh Gupta
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=87k4eo6d5m.fsf@ti.com \
--to=khilman@ti.com \
--cc=ak@linux.intel.com \
--cc=arjan@linux.intel.com \
--cc=davinci-linux-open-source@linux.davincidsp.com \
--cc=len.brown@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=linux-sh@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=trinabh@linux.vnet.ibm.com \
--cc=venki@google.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