[PATCH 3/4]: ACPI/ARM: Register for cpuidle_pm_idle indrivers/acpi/processor_idle.c and arch/arm/mach-kirkwood/cpuidle.c

From: Arun R Bharadwaj
Date: Thu Aug 27 2009 - 07:55:48 EST


* Arun R Bharadwaj <arun@xxxxxxxxxxxxxxxxxx> [2009-08-27 17:19:08]:

Set the idle routine to cpuidle_pm_idle after registering cpuidle
devices. Earlier pm_idle was assumed as the defualt idle loop by
cpuidle infrastructure. This is changed to an architecture independent
cpuidle_pm_idle.

There are 2 instances which are using cpuidle infrastructure currently.
This patch makes the change in both the places.

Signed-off-by: Arun R Bharadwaj <arun@xxxxxxxxxxxxxxxxxx>
---
arch/arm/mach-kirkwood/cpuidle.c | 6 ++++++
drivers/acpi/processor_idle.c | 5 +++++
2 files changed, 11 insertions(+)

Index: linux.trees.git/arch/arm/mach-kirkwood/cpuidle.c
===================================================================
--- linux.trees.git.orig/arch/arm/mach-kirkwood/cpuidle.c
+++ linux.trees.git/arch/arm/mach-kirkwood/cpuidle.c
@@ -90,6 +90,12 @@ static int kirkwood_init_cpuidle(void)
printk(KERN_ERR "kirkwood_init_cpuidle: Failed registering\n");
return -EIO;
}
+
+ if (pm_idle != cpuidle_pm_idle) {
+ printk(KERN_INFO "using cpuidle idle loop\n");
+ pm_idle = cpuidle_pm_idle;
+ }
+
return 0;
}

Index: linux.trees.git/drivers/acpi/processor_idle.c
===================================================================
--- linux.trees.git.orig/drivers/acpi/processor_idle.c
+++ linux.trees.git/drivers/acpi/processor_idle.c
@@ -1216,6 +1216,11 @@ int __cpuinit acpi_processor_power_init(
printk(" C%d[C%d]", i,
pr->power.states[i].type);
printk(")\n");
+
+ if (pm_idle != cpuidle_pm_idle) {
+ printk(KERN_INFO "using cpuidle idle loop\n");
+ pm_idle = cpuidle_pm_idle;
+ }
}

/* 'power' [R] */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/