linux/drivers/cpufreq
Arjan van de Ven 153d7f3fca [PATCH] Reorganize the cpufreq cpu hotplug locking to not be totally bizare
The patch below moves the cpu hotplugging higher up in the cpufreq
layering; this is needed to avoid recursive taking of the cpu hotplug
lock and to otherwise detangle the mess.

The new rules are:
1. you must do lock_cpu_hotplug() around the following functions:
   __cpufreq_driver_target
   __cpufreq_governor (for CPUFREQ_GOV_LIMITS operation only)
   __cpufreq_set_policy
2. governer methods (.governer) must NOT take the lock_cpu_hotplug()
   lock in any way; they are called with the lock taken already
3. if your governer spawns a thread that does things, like calling
   __cpufreq_driver_target, your thread must honor rule #1.
4. the policy lock and other cpufreq internal locks nest within
   the lock_cpu_hotplug() lock.

I'm not entirely happy about how the __cpufreq_governor rule ended up
(conditional locking rule depending on the argument) but basically all
callers pass this as a constant so it's not too horrible.

The patch also removes the cpufreq_governor() function since during the
locking audit it turned out to be entirely unused (so no need to fix it)

The patch works on my testbox, but it could use more testing
(otoh... it can't be much worse than the current code)

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-26 07:21:40 -07:00
..
cpufreq.c [PATCH] Reorganize the cpufreq cpu hotplug locking to not be totally bizare 2006-07-26 07:21:40 -07:00
cpufreq_conservative.c [PATCH] Reorganize the cpufreq cpu hotplug locking to not be totally bizare 2006-07-26 07:21:40 -07:00
cpufreq_ondemand.c [PATCH] Reorganize the cpufreq cpu hotplug locking to not be totally bizare 2006-07-26 07:21:40 -07:00
cpufreq_performance.c [CPUFREQ] Lots of whitespace & CodingStyle cleanup. 2006-02-28 00:43:23 -05:00
cpufreq_powersave.c [CPUFREQ] Lots of whitespace & CodingStyle cleanup. 2006-02-28 00:43:23 -05:00
cpufreq_stats.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
cpufreq_userspace.c [PATCH] Reorganize the cpufreq cpu hotplug locking to not be totally bizare 2006-07-26 07:21:40 -07:00
freq_table.c [CPUFREQ] Remove more freq_table reinitialisations. 2006-05-30 18:09:31 -04:00
Kconfig [CPUFREQ] Update LART site URL 2006-04-03 07:25:54 -05:00
Makefile [CPUFREQ] Conservative cpufreq governer 2005-05-31 19:03:47 -07:00