|
@@ -124,7 +124,7 @@ EXPORT_SYMBOL(rcu_read_lock_sched_held);
|
|
* non-expedited counterparts? Intended for use within RCU. Note
|
|
* non-expedited counterparts? Intended for use within RCU. Note
|
|
* that if the user specifies both rcu_expedited and rcu_normal, then
|
|
* that if the user specifies both rcu_expedited and rcu_normal, then
|
|
* rcu_normal wins. (Except during the time period during boot from
|
|
* rcu_normal wins. (Except during the time period during boot from
|
|
- * when the first task is spawned until the rcu_exp_runtime_mode()
|
|
|
|
|
|
+ * when the first task is spawned until the rcu_set_runtime_mode()
|
|
* core_initcall() is invoked, at which point everything is expedited.)
|
|
* core_initcall() is invoked, at which point everything is expedited.)
|
|
*/
|
|
*/
|
|
bool rcu_gp_is_normal(void)
|
|
bool rcu_gp_is_normal(void)
|
|
@@ -190,6 +190,39 @@ void rcu_end_inkernel_boot(void)
|
|
|
|
|
|
#endif /* #ifndef CONFIG_TINY_RCU */
|
|
#endif /* #ifndef CONFIG_TINY_RCU */
|
|
|
|
|
|
|
|
+/*
|
|
|
|
+ * Test each non-SRCU synchronous grace-period wait API. This is
|
|
|
|
+ * useful just after a change in mode for these primitives, and
|
|
|
|
+ * during early boot.
|
|
|
|
+ */
|
|
|
|
+void rcu_test_sync_prims(void)
|
|
|
|
+{
|
|
|
|
+ if (!IS_ENABLED(CONFIG_PROVE_RCU))
|
|
|
|
+ return;
|
|
|
|
+ synchronize_rcu();
|
|
|
|
+ synchronize_rcu_bh();
|
|
|
|
+ synchronize_sched();
|
|
|
|
+ synchronize_rcu_expedited();
|
|
|
|
+ synchronize_rcu_bh_expedited();
|
|
|
|
+ synchronize_sched_expedited();
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+#if !defined(CONFIG_TINY_RCU) || defined(CONFIG_SRCU)
|
|
|
|
+
|
|
|
|
+/*
|
|
|
|
+ * Switch to run-time mode once RCU has fully initialized.
|
|
|
|
+ */
|
|
|
|
+static int __init rcu_set_runtime_mode(void)
|
|
|
|
+{
|
|
|
|
+ rcu_test_sync_prims();
|
|
|
|
+ rcu_scheduler_active = RCU_SCHEDULER_RUNNING;
|
|
|
|
+ rcu_test_sync_prims();
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+core_initcall(rcu_set_runtime_mode);
|
|
|
|
+
|
|
|
|
+#endif /* #if !defined(CONFIG_TINY_RCU) || defined(CONFIG_SRCU) */
|
|
|
|
+
|
|
#ifdef CONFIG_PREEMPT_RCU
|
|
#ifdef CONFIG_PREEMPT_RCU
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -817,23 +850,6 @@ static void rcu_spawn_tasks_kthread(void)
|
|
|
|
|
|
#endif /* #ifdef CONFIG_TASKS_RCU */
|
|
#endif /* #ifdef CONFIG_TASKS_RCU */
|
|
|
|
|
|
-/*
|
|
|
|
- * Test each non-SRCU synchronous grace-period wait API. This is
|
|
|
|
- * useful just after a change in mode for these primitives, and
|
|
|
|
- * during early boot.
|
|
|
|
- */
|
|
|
|
-void rcu_test_sync_prims(void)
|
|
|
|
-{
|
|
|
|
- if (!IS_ENABLED(CONFIG_PROVE_RCU))
|
|
|
|
- return;
|
|
|
|
- synchronize_rcu();
|
|
|
|
- synchronize_rcu_bh();
|
|
|
|
- synchronize_sched();
|
|
|
|
- synchronize_rcu_expedited();
|
|
|
|
- synchronize_rcu_bh_expedited();
|
|
|
|
- synchronize_sched_expedited();
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
#ifdef CONFIG_PROVE_RCU
|
|
#ifdef CONFIG_PROVE_RCU
|
|
|
|
|
|
/*
|
|
/*
|