This is a note to let you know that I've just added the patch titled
powerpc/cpuidle: Fix parsing of idle state flags from device-tree
to the 3.16-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
powerpc-cpuidle-fix-parsing-of-idle-state-flags-from-device-tree.patch
and it can be found in the queue-3.16 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 95707d852856aec1cbdad1873ff2dc5161a5cb91 Mon Sep 17 00:00:00 2001
From: Vaidyanathan Srinivasan <[email protected]>
Date: Sun, 3 Aug 2014 13:23:08 +0530
Subject: powerpc/cpuidle: Fix parsing of idle state flags from device-tree
From: Vaidyanathan Srinivasan <[email protected]>
commit 95707d852856aec1cbdad1873ff2dc5161a5cb91 upstream.
Flags from device-tree need to be parsed with accessors for
interpreting correct value in little-endian.
Signed-off-by: Vaidyanathan Srinivasan <[email protected]>
Reviewed-by: Preeti U. Murthy <[email protected]>
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/cpuidle/cpuidle-powernv.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
--- a/drivers/cpuidle/cpuidle-powernv.c
+++ b/drivers/cpuidle/cpuidle-powernv.c
@@ -160,10 +160,10 @@ static int powernv_cpuidle_driver_init(v
static int powernv_add_idle_states(void)
{
struct device_node *power_mgt;
- struct property *prop;
int nr_idle_states = 1; /* Snooze */
int dt_idle_states;
- u32 *flags;
+ const __be32 *idle_state_flags;
+ u32 len_flags, flags;
int i;
/* Currently we have snooze statically defined */
@@ -174,18 +174,18 @@ static int powernv_add_idle_states(void)
return nr_idle_states;
}
- prop = of_find_property(power_mgt, "ibm,cpu-idle-state-flags", NULL);
- if (!prop) {
+ idle_state_flags = of_get_property(power_mgt,
"ibm,cpu-idle-state-flags", &len_flags);
+ if (!idle_state_flags) {
pr_warn("DT-PowerMgmt: missing ibm,cpu-idle-state-flags\n");
return nr_idle_states;
}
- dt_idle_states = prop->length / sizeof(u32);
- flags = (u32 *) prop->value;
+ dt_idle_states = len_flags / sizeof(u32);
for (i = 0; i < dt_idle_states; i++) {
- if (flags[i] & IDLE_USE_INST_NAP) {
+ flags = be32_to_cpu(idle_state_flags[i]);
+ if (flags & IDLE_USE_INST_NAP) {
/* Add NAP state */
strcpy(powernv_states[nr_idle_states].name, "Nap");
strcpy(powernv_states[nr_idle_states].desc, "Nap");
@@ -196,7 +196,7 @@ static int powernv_add_idle_states(void)
nr_idle_states++;
}
- if (flags[i] & IDLE_USE_INST_SLEEP) {
+ if (flags & IDLE_USE_INST_SLEEP) {
/* Add FASTSLEEP state */
strcpy(powernv_states[nr_idle_states].name,
"FastSleep");
strcpy(powernv_states[nr_idle_states].desc,
"FastSleep");
Patches currently in stable-queue which might be from [email protected]
are
queue-3.16/powerpc-cpufreq-add-pr_warn-on-opal-firmware-failures.patch
queue-3.16/powerpc-cpuidle-fix-parsing-of-idle-state-flags-from-device-tree.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html