Thread (26 messages) 26 messages, 5 authors, 2012-02-29
STALE5208d
Revisions (4)
  1. v5 current
  2. v6 [diff vs current]
  3. v7 [diff vs current]
  4. v8 [diff vs current]

[PATCH v5 5/9] ARM: shmobile: Consolidate cpuidle functionality

From: Robert Lee <hidden>
Date: 2012-02-27 04:47:39
Subsystem: arm port, arm/risc-v/renesas architecture, the rest · Maintainers: Russell King, Geert Uytterhoeven, Magnus Damm, Linus Torvalds

Use newly added core cpuidle functionality and remove this duplicated
code from the platform cpuidle.

Signed-off-by: Robert Lee <redacted>
---
 arch/arm/mach-shmobile/cpuidle.c |   22 ++--------------------
 1 files changed, 2 insertions(+), 20 deletions(-)
diff --git a/arch/arm/mach-shmobile/cpuidle.c b/arch/arm/mach-shmobile/cpuidle.c
index 1b23342..e01a73f 100644
--- a/arch/arm/mach-shmobile/cpuidle.c
+++ b/arch/arm/mach-shmobile/cpuidle.c
@@ -29,21 +29,8 @@ static int shmobile_cpuidle_enter(struct cpuidle_device *dev,
 				  struct cpuidle_driver *drv,
 				  int index)
 {
-	ktime_t before, after;
-
-	before = ktime_get();
-
-	local_irq_disable();
-	local_fiq_disable();
-
 	shmobile_cpuidle_modes[index]();
 
-	local_irq_enable();
-	local_fiq_enable();
-
-	after = ktime_get();
-	dev->last_residency = ktime_to_ns(ktime_sub(after, before)) >> 10;
-
 	return index;
 }
 
@@ -51,13 +38,8 @@ static struct cpuidle_device shmobile_cpuidle_dev;
 static struct cpuidle_driver shmobile_cpuidle_driver = {
 	.name =		"shmobile_cpuidle",
 	.owner =	THIS_MODULE,
-	.states[0] = {
-		.name = "C1",
-		.desc = "WFI",
-		.exit_latency = 1,
-		.target_residency = 1 * 2,
-		.flags = CPUIDLE_FLAG_TIME_VALID,
-	},
+	.en_core_tk_irqen = 1,
+	.states[0] = CPUIDLE_ARM_WFI_STATE,
 	.safe_state_index = 0, /* C1 */
 	.state_count = 1,
 };
-- 
1.7.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help