Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c30a752 authored by KAMEZAWA Hiroyuki's avatar KAMEZAWA Hiroyuki Committed by Linus Torvalds
Browse files

[PATCH] for_each_possible_cpu: documentaion



Replace for_each_cpu with for_each_possible_cpu.

Modifies occurences in documentaion.

for_each_cpu in whatisRCU.txt should be for_each_online_cpu ???
(I'm not sure..)

Signed-off-by: default avatarKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c8912599
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -605,7 +605,7 @@ are the same as those shown in the preceding section, so they are omitted.
	{
	{
		int cpu;
		int cpu;


		for_each_cpu(cpu)
		for_each_possible_cpu(cpu)
			run_on(cpu);
			run_on(cpu);
	}
	}


+2 −2
Original line number Original line Diff line number Diff line
@@ -97,13 +97,13 @@ at which time hotplug is disabled.


You really dont need to manipulate any of the system cpu maps. They should
You really dont need to manipulate any of the system cpu maps. They should
be read-only for most use. When setting up per-cpu resources almost always use
be read-only for most use. When setting up per-cpu resources almost always use
cpu_possible_map/for_each_cpu() to iterate.
cpu_possible_map/for_each_possible_cpu() to iterate.


Never use anything other than cpumask_t to represent bitmap of CPUs.
Never use anything other than cpumask_t to represent bitmap of CPUs.


#include <linux/cpumask.h>
#include <linux/cpumask.h>


for_each_cpu              - Iterate over cpu_possible_map
for_each_possible_cpu     - Iterate over cpu_possible_map
for_each_online_cpu       - Iterate over cpu_online_map
for_each_online_cpu       - Iterate over cpu_online_map
for_each_present_cpu      - Iterate over cpu_present_map
for_each_present_cpu      - Iterate over cpu_present_map
for_each_cpu_mask(x,mask) - Iterate over some random collection of cpu mask.
for_each_cpu_mask(x,mask) - Iterate over some random collection of cpu mask.