linux_old1/drivers/cpuidle
Daniel Lezcano 137b944e10 cpuidle: Make it clear that governors cannot be modules
cpufreq governors are defined as modules in the code, but the Kconfig
options do not allow them to be built as modules.  This is not really
a problem, but the cpuidle init ordering is: the cpuidle init
functions (framework and driver) and then the governors.  That leads
to some weirdness in the cpuidle framework.

Namely,  cpuidle_register_device() calls cpuidle_enable_device() which
fails at the first attempt, because governors have not been registered
yet.  When a governor is registered, the framework calls
cpuidle_enable_device() again which runs __cpuidle_register_device()
only then.  Of course, for that to work, the cpuidle_enable_device()
return value has to be ignored by cpuidle_register_device().

Instead of having this cyclic call graph and relying on a positive
side effects of the hackish back and forth cpuidle_enable_device()
calls it is better to fix the cpuidle init ordering.

To that end, replace the module init code with postcore_initcall()
so we have:

 * cpuidle framework : core_initcall
 * cpuidle governors : postcore_initcall
 * cpuidle drivers   : device_initcall

and remove the corresponding module exit code as it is dead anyway
(governors can't be built as modules).

[rjw: Changelog]
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-07-15 02:09:47 +02:00
..
governors cpuidle: Make it clear that governors cannot be modules 2013-07-15 02:09:47 +02:00
Kconfig Power management and ACPI updates for 3.11-rc1 2013-07-03 14:35:40 -07:00
Makefile ARM: zynq: Add cpuidle support 2013-06-05 14:04:26 +02:00
coupled.c cpuidle / coupled: fix ready counter decrement 2013-01-03 13:11:05 +01:00
cpuidle-calxeda.c ARM: introduce common set_auxcr/get_auxcr functions 2013-05-29 15:50:34 -04:00
cpuidle-kirkwood.c cpuidle: add maintainer entry 2013-04-26 22:30:25 +02:00
cpuidle-zynq.c ARM: zynq: Add cpuidle support 2013-06-05 14:04:26 +02:00
cpuidle.c cpuidle: simplify multiple driver support 2013-06-11 13:42:38 +02:00
cpuidle.h cpuidle: support multiple drivers 2012-11-15 00:34:23 +01:00
driver.c cpuidle: Comment the driver's framework code 2013-06-11 14:18:33 +02:00
governor.c cpuidle: create bootparam "cpuidle.off=1" 2011-08-03 19:06:36 -04:00
sysfs.c cpuidle: fix number of initialized/destroyed states 2013-01-11 23:20:09 +01:00