summaryrefslogtreecommitdiffstats
path: root/kernel/rcu/tree.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-07-25 12:04:11 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-07-25 12:04:11 -0700
commitdf00ccca7201dcb78847de68538486dbcfa5deba (patch)
tree2e572a32d6d19e9be5736b82a62f4c23f6eac2d3 /kernel/rcu/tree.h
parentdd9506954539dcedd0294a065ff0976e61386fc6 (diff)
parent54d5f16e55a7cdd64e0f6bcadf2b5f871f94bb83 (diff)
downloadlinux-stable-df00ccca7201dcb78847de68538486dbcfa5deba.tar.gz
linux-stable-df00ccca7201dcb78847de68538486dbcfa5deba.tar.bz2
linux-stable-df00ccca7201dcb78847de68538486dbcfa5deba.zip
Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull RCU updates from Ingo Molnar: "The main changes in this cycle were: - documentation updates - miscellaneous fixes - minor reorganization of code - torture-test updates" * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (30 commits) rcu: Correctly handle sparse possible cpus rcu: sysctl: Panic on RCU Stall rcu: Fix a typo in a comment rcu: Make call_rcu_tasks() tolerate first call with irqs disabled rcu: Disable TASKS_RCU for usermode Linux rcu: No ordering for rcu_assign_pointer() of NULL rcutorture: Fix error return code in rcu_perf_init() torture: Inflict default jitter rcuperf: Don't treat gp_exp mis-setting as a WARN rcutorture: Drop "-soundhw pcspkr" from x86 boot arguments rcutorture: Don't specify the cpu type of QEMU on PPC rcutorture: Make -soundhw a x86 specific option rcutorture: Use vmlinux as the fallback kernel image rcutorture/doc: Create initrd using dracut torture: Stop onoff task if there is only one cpu torture: Add starvation events to error summary torture: Break online and offline functions out of torture_onoff() torture: Forgive lengthy trace dumps and preemption torture: Remove CONFIG_RCU_TORTURE_TEST_RUNNABLE, simplify code torture: Simplify code, eliminate RCU_PERF_TEST_RUNNABLE ...
Diffstat (limited to 'kernel/rcu/tree.h')
-rw-r--r--kernel/rcu/tree.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
index e3959f5e6ddf..f714f873bf9d 100644
--- a/kernel/rcu/tree.h
+++ b/kernel/rcu/tree.h
@@ -254,6 +254,13 @@ struct rcu_node {
} ____cacheline_internodealigned_in_smp;
/*
+ * Bitmasks in an rcu_node cover the interval [grplo, grphi] of CPU IDs, and
+ * are indexed relative to this interval rather than the global CPU ID space.
+ * This generates the bit for a CPU in node-local masks.
+ */
+#define leaf_node_cpu_bit(rnp, cpu) (1UL << ((cpu) - (rnp)->grplo))
+
+/*
* Do a full breadth-first scan of the rcu_node structures for the
* specified rcu_state structure.
*/
@@ -281,6 +288,14 @@ struct rcu_node {
(rnp) < &(rsp)->node[rcu_num_nodes]; (rnp)++)
/*
+ * Iterate over all possible CPUs in a leaf RCU node.
+ */
+#define for_each_leaf_node_possible_cpu(rnp, cpu) \
+ for ((cpu) = cpumask_next(rnp->grplo - 1, cpu_possible_mask); \
+ cpu <= rnp->grphi; \
+ cpu = cpumask_next((cpu), cpu_possible_mask))
+
+/*
* Union to allow "aggregate OR" operation on the need for a quiescent
* state by the normal and expedited grace periods.
*/