Currently PREEMPT_RCU and TREE_RCU are mutually exclusive Kconfig options. But PREEMPT_RCU actually specifies a kind of TREE_RCU, namely a preemptible TREE_RCU. This commit therefore makes PREEMPT_RCU be a modifer to the TREE_RCU Kconfig option. This has the benefit of simplifying several of the #if expressions that formerly needed to check both, but now need only check one or the other.
Showing the changes to include/linux (1 of 7 files). Show all
Unified · Split
| @@ -167,7 +167,7 @@ do { \ · 166 unmodified lines | |||
| 167 | * TREE_RCU and rcu_barrier_() primitives in TINY_RCU. | 167 | * TREE_RCU and rcu_barrier_() primitives in TINY_RCU. |
| 168 | */ | 168 | */ |
| 169 | 169 | ||
| 170 | #if defined(CONFIG_TREE_RCU) || defined(CONFIG_PREEMPT_RCU) | 170 | #if defined(CONFIG_TREE_RCU) |
| 171 | #include <linux/rcutree.h> | 171 | #include <linux/rcutree.h> |
| 172 | #elif defined(CONFIG_TINY_RCU) | 172 | #elif defined(CONFIG_TINY_RCU) |
| 173 | #include <linux/rcutiny.h> | 173 | #include <linux/rcutiny.h> |
| @@ -601,7 +601,7 @@ do { \ · 427 unmodified lines | |||
| 601 | * read-side critical section that would block in a !PREEMPT kernel. | 601 | * read-side critical section that would block in a !PREEMPT kernel. |
| 602 | * But if you want the full story, read on! | 602 | * But if you want the full story, read on! |
| 603 | * | 603 | * |
| 604 | * In non-preemptible RCU implementations (TREE_RCU and TINY_RCU), | 604 | * In non-preemptible RCU implementations (pure TREE_RCU and TINY_RCU), |
| 605 | * it is illegal to block while in an RCU read-side critical section. | 605 | * it is illegal to block while in an RCU read-side critical section. |
| 606 | * In preemptible RCU implementations (PREEMPT_RCU) in CONFIG_PREEMPTION | 606 | * In preemptible RCU implementations (PREEMPT_RCU) in CONFIG_PREEMPTION |
| 607 | * kernel builds, RCU read-side critical sections may be preempted, | 607 | * kernel builds, RCU read-side critical sections may be preempted, |