Thread (12 messages) 12 messages, 5 authors, 2017-02-01

Re: [PATCH v6 3/5] cpuidle:powernv: Add helper function to populate powernv idle states.

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2017-01-30 03:47:46
Also in: linux-devicetree, linux-pm, lkml

"Gautham R. Shenoy" [off-list ref] writes:
From: "Gautham R. Shenoy" <redacted>

In the current code for powernv_add_idle_states, there is a lot of code
duplication while initializing an idle state in powernv_states table.

Add an inline helper function to populate the powernv_states[] table
for a given idle state. Invoke this for populating the "Nap",
"Fastsleep" and the stop states in powernv_add_idle_states.

Acked-by: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Gautham R. Shenoy <redacted>
---
 drivers/cpuidle/cpuidle-powernv.c | 89 +++++++++++++++++++++++----------------
 include/linux/cpuidle.h           |  1 +
I was going to merge this, but I see you've touched cpuidle.h, so I feel
like I should get an ACK from the cpuidle folks.

It's a fairly uncontroversial change, but it's their API.

cheers

quoted hunk ↗ jump to hunk
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index da346f2..fc1e5d7 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -62,6 +62,7 @@ struct cpuidle_state {
 };
 
 /* Idle State Flags */
+#define CPUIDLE_FLAG_NONE       (0x00)
 #define CPUIDLE_FLAG_COUPLED	(0x02) /* state applies to multiple cpus */
 #define CPUIDLE_FLAG_TIMER_STOP (0x04)  /* timer is stopped on this state */
 
-- 
1.9.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help