Commit 4a90a0681cf6cd21cd444184302aa045156486b3

Authored by Paul E. McKenney
1 parent 4300aa642c

rcu: permit discontiguous cpu_possible_mask CPU numbering

TREE_RCU assumes that CPU numbering is contiguous, but some users need
large holes in the numbering to better map to hardware layout.  This patch
makes TREE_RCU (and TREE_PREEMPT_RCU) tolerate large holes in the CPU
numbering.  However, NR_CPUS must still be greater than the largest
CPU number.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -1913,7 +1913,7 @@
1913 1913  
1914 1914 rnp = rsp->level[NUM_RCU_LVLS - 1];
1915 1915 for_each_possible_cpu(i) {
1916   - if (i > rnp->grphi)
  1916 + while (i > rnp->grphi)
1917 1917 rnp++;
1918 1918 rsp->rda[i]->mynode = rnp;
1919 1919 rcu_boot_init_percpu_data(i, rsp);