x86: prepare for cpumask iterators to only go to nr_cpu_ids
Impact: cleanup, futureproof In fact, all cpumask ops will only be valid (in general) for bit numbers < nr_cpu_ids. So use that instead of NR_CPUS in various places. This is always safe: no cpu number can be >= nr_cpu_ids, and nr_cpu_ids is initialized to NR_CPUS at boot. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Mike Travis <travis@sgi.com> Acked-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -382,7 +382,7 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
|
||||
if (!node_online(i))
|
||||
setup_node_bootmem(i, nodes[i].start, nodes[i].end);
|
||||
|
||||
for (i = 0; i < NR_CPUS; i++) {
|
||||
for (i = 0; i < nr_cpu_ids; i++) {
|
||||
int node = early_cpu_to_node(i);
|
||||
|
||||
if (node == NUMA_NO_NODE)
|
||||
|
Reference in New Issue
Block a user