diff options
Diffstat (limited to 'kernel/rcu/tiny_plugin.h')
| -rw-r--r-- | kernel/rcu/tiny_plugin.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/rcu/tiny_plugin.h b/kernel/rcu/tiny_plugin.h index df3a60e19f07..371034e77f87 100644 --- a/kernel/rcu/tiny_plugin.h +++ b/kernel/rcu/tiny_plugin.h | |||
| @@ -52,7 +52,7 @@ static struct rcu_ctrlblk rcu_bh_ctrlblk = { | |||
| 52 | RCU_TRACE(.name = "rcu_bh") | 52 | RCU_TRACE(.name = "rcu_bh") |
| 53 | }; | 53 | }; |
| 54 | 54 | ||
| 55 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 55 | #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_SRCU) |
| 56 | #include <linux/kernel_stat.h> | 56 | #include <linux/kernel_stat.h> |
| 57 | 57 | ||
| 58 | int rcu_scheduler_active __read_mostly; | 58 | int rcu_scheduler_active __read_mostly; |
| @@ -65,15 +65,16 @@ EXPORT_SYMBOL_GPL(rcu_scheduler_active); | |||
| 65 | * to RCU_SCHEDULER_RUNNING, skipping the RCU_SCHEDULER_INIT stage. | 65 | * to RCU_SCHEDULER_RUNNING, skipping the RCU_SCHEDULER_INIT stage. |
| 66 | * The reason for this is that Tiny RCU does not need kthreads, so does | 66 | * The reason for this is that Tiny RCU does not need kthreads, so does |
| 67 | * not have to care about the fact that the scheduler is half-initialized | 67 | * not have to care about the fact that the scheduler is half-initialized |
| 68 | * at a certain phase of the boot process. | 68 | * at a certain phase of the boot process. Unless SRCU is in the mix. |
| 69 | */ | 69 | */ |
| 70 | void __init rcu_scheduler_starting(void) | 70 | void __init rcu_scheduler_starting(void) |
| 71 | { | 71 | { |
| 72 | WARN_ON(nr_context_switches() > 0); | 72 | WARN_ON(nr_context_switches() > 0); |
| 73 | rcu_scheduler_active = RCU_SCHEDULER_RUNNING; | 73 | rcu_scheduler_active = IS_ENABLED(CONFIG_SRCU) |
| 74 | ? RCU_SCHEDULER_INIT : RCU_SCHEDULER_RUNNING; | ||
| 74 | } | 75 | } |
| 75 | 76 | ||
| 76 | #endif /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | 77 | #endif /* #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_SRCU) */ |
| 77 | 78 | ||
| 78 | #ifdef CONFIG_RCU_TRACE | 79 | #ifdef CONFIG_RCU_TRACE |
| 79 | 80 | ||
