]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - Documentation/cpu-hotplug.txt
cpu-hotplug: replace lock_cpu_hotplug() with get_online_cpus()
[karo-tx-linux.git] / Documentation / cpu-hotplug.txt
index a741f658a3c9d7393c9693bb4486d30473438222..fb94f5a71b688ae6fda63156a2b0bbdcf5387873 100644 (file)
@@ -109,12 +109,13 @@ Never use anything other than cpumask_t to represent bitmap of CPUs.
        for_each_cpu_mask(x,mask) - Iterate over some random collection of cpu mask.
 
        #include <linux/cpu.h>
-       lock_cpu_hotplug() and unlock_cpu_hotplug():
+       get_online_cpus() and put_online_cpus():
 
-The above calls are used to inhibit cpu hotplug operations. While holding the
-cpucontrol mutex, cpu_online_map will not change. If you merely need to avoid
-cpus going away, you could also use preempt_disable() and preempt_enable()
-for those sections. Just remember the critical section cannot call any
+The above calls are used to inhibit cpu hotplug operations. While the
+cpu_hotplug.refcount is non zero, the cpu_online_map will not change.
+If you merely need to avoid cpus going away, you could also use
+preempt_disable() and preempt_enable() for those sections.
+Just remember the critical section cannot call any
 function that can sleep or schedule this process away. The preempt_disable()
 will work as long as stop_machine_run() is used to take a cpu down.