Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

documentation: remove references to cpu_*_map.

This has been obsolescent for a while, fix documentation and
misc comments.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

+26 -26
+1 -1
Documentation/cgroups/cpusets.txt
··· 217 217 218 218 The cpus and mems files in the root (top_cpuset) cpuset are 219 219 read-only. The cpus file automatically tracks the value of 220 - cpu_online_map using a CPU hotplug notifier, and the mems file 220 + cpu_online_mask using a CPU hotplug notifier, and the mems file 221 221 automatically tracks the value of node_states[N_HIGH_MEMORY]--i.e., 222 222 nodes with memory--using the cpuset_track_online_nodes() hook. 223 223
+11 -11
Documentation/cpu-hotplug.txt
··· 47 47 other cpus later online, read FAQ's for more info. 48 48 49 49 additional_cpus=n (*) Use this to limit hotpluggable cpus. This option sets 50 - cpu_possible_map = cpu_present_map + additional_cpus 50 + cpu_possible_mask = cpu_present_mask + additional_cpus 51 51 52 52 cede_offline={"off","on"} Use this option to disable/enable putting offlined 53 53 processors to an extended H_CEDE state on ··· 64 64 on the apicid values in those tables for disabled apics. In the event 65 65 BIOS doesn't mark such hot-pluggable cpus as disabled entries, one could 66 66 use this parameter "additional_cpus=x" to represent those cpus in the 67 - cpu_possible_map. 67 + cpu_possible_mask. 68 68 69 69 possible_cpus=n [s390,x86_64] use this to set hotpluggable cpus. 70 70 This option sets possible_cpus bits in 71 - cpu_possible_map. Thus keeping the numbers of bits set 71 + cpu_possible_mask. Thus keeping the numbers of bits set 72 72 constant even if the machine gets rebooted. 73 73 74 74 CPU maps and such ··· 76 76 [More on cpumaps and primitive to manipulate, please check 77 77 include/linux/cpumask.h that has more descriptive text.] 78 78 79 - cpu_possible_map: Bitmap of possible CPUs that can ever be available in the 79 + cpu_possible_mask: Bitmap of possible CPUs that can ever be available in the 80 80 system. This is used to allocate some boot time memory for per_cpu variables 81 81 that aren't designed to grow/shrink as CPUs are made available or removed. 82 82 Once set during boot time discovery phase, the map is static, i.e no bits ··· 84 84 upfront can save some boot time memory. See below for how we use heuristics 85 85 in x86_64 case to keep this under check. 86 86 87 - cpu_online_map: Bitmap of all CPUs currently online. Its set in __cpu_up() 87 + cpu_online_mask: Bitmap of all CPUs currently online. Its set in __cpu_up() 88 88 after a cpu is available for kernel scheduling and ready to receive 89 89 interrupts from devices. Its cleared when a cpu is brought down using 90 90 __cpu_disable(), before which all OS services including interrupts are 91 91 migrated to another target CPU. 92 92 93 - cpu_present_map: Bitmap of CPUs currently present in the system. Not all 93 + cpu_present_mask: Bitmap of CPUs currently present in the system. Not all 94 94 of them may be online. When physical hotplug is processed by the relevant 95 95 subsystem (e.g ACPI) can change and new bit either be added or removed 96 96 from the map depending on the event is hot-add/hot-remove. There are currently ··· 99 99 100 100 You really dont need to manipulate any of the system cpu maps. They should 101 101 be read-only for most use. When setting up per-cpu resources almost always use 102 - cpu_possible_map/for_each_possible_cpu() to iterate. 102 + cpu_possible_mask/for_each_possible_cpu() to iterate. 103 103 104 104 Never use anything other than cpumask_t to represent bitmap of CPUs. 105 105 106 106 #include <linux/cpumask.h> 107 107 108 - for_each_possible_cpu - Iterate over cpu_possible_map 109 - for_each_online_cpu - Iterate over cpu_online_map 110 - for_each_present_cpu - Iterate over cpu_present_map 108 + for_each_possible_cpu - Iterate over cpu_possible_mask 109 + for_each_online_cpu - Iterate over cpu_online_mask 110 + for_each_present_cpu - Iterate over cpu_present_mask 111 111 for_each_cpu_mask(x,mask) - Iterate over some random collection of cpu mask. 112 112 113 113 #include <linux/cpu.h> 114 114 get_online_cpus() and put_online_cpus(): 115 115 116 116 The above calls are used to inhibit cpu hotplug operations. While the 117 - cpu_hotplug.refcount is non zero, the cpu_online_map will not change. 117 + cpu_hotplug.refcount is non zero, the cpu_online_mask will not change. 118 118 If you merely need to avoid cpus going away, you could also use 119 119 preempt_disable() and preempt_enable() for those sections. 120 120 Just remember the critical section cannot call any
+1 -1
arch/alpha/kernel/smp.c
··· 450 450 smp_num_probed = 1; 451 451 } 452 452 453 - printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_map = %lx\n", 453 + printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_mask = %lx\n", 454 454 smp_num_probed, cpumask_bits(cpu_present_mask)[0]); 455 455 } 456 456
+1 -1
arch/ia64/kernel/acpi.c
··· 839 839 early_param("additional_cpus", setup_additional_cpus); 840 840 841 841 /* 842 - * cpu_possible_map should be static, it cannot change as CPUs 842 + * cpu_possible_mask should be static, it cannot change as CPUs 843 843 * are onlined, or offlined. The reason is per-cpu data-structures 844 844 * are allocated by some modules at init time, and dont expect to 845 845 * do this dynamically on cpu arrival/departure.
+1 -1
arch/mips/cavium-octeon/smp.c
··· 78 78 } 79 79 80 80 /** 81 - * Detect available CPUs, populate cpu_possible_map 81 + * Detect available CPUs, populate cpu_possible_mask 82 82 */ 83 83 static void octeon_smp_hotplug_setup(void) 84 84 {
+1 -1
arch/mips/pmc-sierra/yosemite/smp.c
··· 146 146 } 147 147 148 148 /* 149 - * Detect available CPUs, populate cpu_possible_map before smp_init 149 + * Detect available CPUs, populate cpu_possible_mask before smp_init 150 150 * 151 151 * We don't want to start the secondary CPU yet nor do we have a nice probing 152 152 * feature in PMON so we just assume presence of the secondary core.
+1 -1
arch/mips/sibyte/bcm1480/smp.c
··· 138 138 139 139 /* 140 140 * Use CFE to find out how many CPUs are available, setting up 141 - * cpu_possible_map and the logical/physical mappings. 141 + * cpu_possible_mask and the logical/physical mappings. 142 142 * XXXKW will the boot CPU ever not be physical 0? 143 143 * 144 144 * Common setup before any secondaries are started
+1 -1
arch/tile/kernel/setup.c
··· 1100 1100 1101 1101 /* 1102 1102 * cpu_cacheable_map lists all the cpus whose caches the hypervisor can 1103 - * flush on our behalf. It is set to cpu_possible_map OR'ed with 1103 + * flush on our behalf. It is set to cpu_possible_mask OR'ed with 1104 1104 * hash_for_home_map, and it is what should be passed to 1105 1105 * hv_flush_remote() to flush all caches. Note that if there are 1106 1106 * dedicated hypervisor driver tiles that have authorized use of their
+1 -1
arch/x86/xen/enlighten.c
··· 967 967 xen_setup_mfn_list_list(); 968 968 } 969 969 970 - /* This is called once we have the cpu_possible_map */ 970 + /* This is called once we have the cpu_possible_mask */ 971 971 void xen_setup_vcpu_info_placement(void) 972 972 { 973 973 int cpu;
+2 -2
init/Kconfig
··· 1414 1414 config INIT_ALL_POSSIBLE 1415 1415 bool 1416 1416 help 1417 - Back when each arch used to define their own cpu_online_map and 1418 - cpu_possible_map, some of them chose to initialize cpu_possible_map 1417 + Back when each arch used to define their own cpu_online_mask and 1418 + cpu_possible_mask, some of them chose to initialize cpu_possible_mask 1419 1419 with all 1s, and others with all 0s. When they were centralised, 1420 1420 it was better to provide this option than to break all the archs 1421 1421 and have several arch maintainers pursuing me down dark alleys.
+5 -5
kernel/cpuset.c
··· 270 270 * are online. If none are online, walk up the cpuset hierarchy 271 271 * until we find one that does have some online cpus. If we get 272 272 * all the way to the top and still haven't found any online cpus, 273 - * return cpu_online_map. Or if passed a NULL cs from an exit'ing 274 - * task, return cpu_online_map. 273 + * return cpu_online_mask. Or if passed a NULL cs from an exit'ing 274 + * task, return cpu_online_mask. 275 275 * 276 276 * One way or another, we guarantee to return some non-empty subset 277 - * of cpu_online_map. 277 + * of cpu_online_mask. 278 278 * 279 279 * Call with callback_mutex held. 280 280 */ ··· 867 867 int retval; 868 868 int is_load_balanced; 869 869 870 - /* top_cpuset.cpus_allowed tracks cpu_online_map; it's read-only */ 870 + /* top_cpuset.cpus_allowed tracks cpu_online_mask; it's read-only */ 871 871 if (cs == &top_cpuset) 872 872 return -EACCES; 873 873 ··· 2149 2149 * 2150 2150 * Description: Returns the cpumask_var_t cpus_allowed of the cpuset 2151 2151 * attached to the specified @tsk. Guaranteed to return some non-empty 2152 - * subset of cpu_online_map, even if this means going outside the 2152 + * subset of cpu_online_mask, even if this means going outside the 2153 2153 * tasks cpuset. 2154 2154 **/ 2155 2155