aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rcupdate.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/rcupdate.h')
-rw-r--r--include/linux/rcupdate.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 53ff1a752d7e..ed4f5939a452 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -57,7 +57,7 @@ enum rcutorture_type {
57 INVALID_RCU_FLAVOR 57 INVALID_RCU_FLAVOR
58}; 58};
59 59
60#if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) 60#if defined(CONFIG_TREE_RCU) || defined(CONFIG_PREEMPT_RCU)
61void rcutorture_get_gp_data(enum rcutorture_type test_type, int *flags, 61void rcutorture_get_gp_data(enum rcutorture_type test_type, int *flags,
62 unsigned long *gpnum, unsigned long *completed); 62 unsigned long *gpnum, unsigned long *completed);
63void rcutorture_record_test_transition(void); 63void rcutorture_record_test_transition(void);
@@ -260,7 +260,7 @@ static inline int rcu_preempt_depth(void)
260void rcu_init(void); 260void rcu_init(void);
261void rcu_sched_qs(void); 261void rcu_sched_qs(void);
262void rcu_bh_qs(void); 262void rcu_bh_qs(void);
263void rcu_check_callbacks(int cpu, int user); 263void rcu_check_callbacks(int user);
264struct notifier_block; 264struct notifier_block;
265void rcu_idle_enter(void); 265void rcu_idle_enter(void);
266void rcu_idle_exit(void); 266void rcu_idle_exit(void);
@@ -348,8 +348,8 @@ extern struct srcu_struct tasks_rcu_exit_srcu;
348 */ 348 */
349#define cond_resched_rcu_qs() \ 349#define cond_resched_rcu_qs() \
350do { \ 350do { \
351 rcu_note_voluntary_context_switch(current); \ 351 if (!cond_resched()) \
352 cond_resched(); \ 352 rcu_note_voluntary_context_switch(current); \
353} while (0) 353} while (0)
354 354
355#if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) || defined(CONFIG_SMP) 355#if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) || defined(CONFIG_SMP)
@@ -365,7 +365,7 @@ typedef void call_rcu_func_t(struct rcu_head *head,
365 void (*func)(struct rcu_head *head)); 365 void (*func)(struct rcu_head *head));
366void wait_rcu_gp(call_rcu_func_t crf); 366void wait_rcu_gp(call_rcu_func_t crf);
367 367
368#if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) 368#if defined(CONFIG_TREE_RCU) || defined(CONFIG_PREEMPT_RCU)
369#include <linux/rcutree.h> 369#include <linux/rcutree.h>
370#elif defined(CONFIG_TINY_RCU) 370#elif defined(CONFIG_TINY_RCU)
371#include <linux/rcutiny.h> 371#include <linux/rcutiny.h>
@@ -867,7 +867,7 @@ static inline void rcu_preempt_sleep_check(void)
867 * 867 *
868 * In non-preemptible RCU implementations (TREE_RCU and TINY_RCU), 868 * In non-preemptible RCU implementations (TREE_RCU and TINY_RCU),
869 * it is illegal to block while in an RCU read-side critical section. 869 * it is illegal to block while in an RCU read-side critical section.
870 * In preemptible RCU implementations (TREE_PREEMPT_RCU) in CONFIG_PREEMPT 870 * In preemptible RCU implementations (PREEMPT_RCU) in CONFIG_PREEMPT
871 * kernel builds, RCU read-side critical sections may be preempted, 871 * kernel builds, RCU read-side critical sections may be preempted,
872 * but explicit blocking is illegal. Finally, in preemptible RCU 872 * but explicit blocking is illegal. Finally, in preemptible RCU
873 * implementations in real-time (with -rt patchset) kernel builds, RCU 873 * implementations in real-time (with -rt patchset) kernel builds, RCU
@@ -902,7 +902,9 @@ static inline void rcu_read_lock(void)
902 * Unfortunately, this function acquires the scheduler's runqueue and 902 * Unfortunately, this function acquires the scheduler's runqueue and
903 * priority-inheritance spinlocks. This means that deadlock could result 903 * priority-inheritance spinlocks. This means that deadlock could result
904 * if the caller of rcu_read_unlock() already holds one of these locks or 904 * if the caller of rcu_read_unlock() already holds one of these locks or
905 * any lock that is ever acquired while holding them. 905 * any lock that is ever acquired while holding them; or any lock which
906 * can be taken from interrupt context because rcu_boost()->rt_mutex_lock()
907 * does not disable irqs while taking ->wait_lock.
906 * 908 *
907 * That said, RCU readers are never priority boosted unless they were 909 * That said, RCU readers are never priority boosted unless they were
908 * preempted. Therefore, one way to avoid deadlock is to make sure 910 * preempted. Therefore, one way to avoid deadlock is to make sure
@@ -1062,6 +1064,7 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
1062 */ 1064 */
1063#define RCU_INIT_POINTER(p, v) \ 1065#define RCU_INIT_POINTER(p, v) \
1064 do { \ 1066 do { \
1067 rcu_dereference_sparse(p, __rcu); \
1065 p = RCU_INITIALIZER(v); \ 1068 p = RCU_INITIALIZER(v); \
1066 } while (0) 1069 } while (0)
1067 1070
@@ -1118,7 +1121,7 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
1118 __kfree_rcu(&((ptr)->rcu_head), offsetof(typeof(*(ptr)), rcu_head)) 1121 __kfree_rcu(&((ptr)->rcu_head), offsetof(typeof(*(ptr)), rcu_head))
1119 1122
1120#if defined(CONFIG_TINY_RCU) || defined(CONFIG_RCU_NOCB_CPU_ALL) 1123#if defined(CONFIG_TINY_RCU) || defined(CONFIG_RCU_NOCB_CPU_ALL)
1121static inline int rcu_needs_cpu(int cpu, unsigned long *delta_jiffies) 1124static inline int rcu_needs_cpu(unsigned long *delta_jiffies)
1122{ 1125{
1123 *delta_jiffies = ULONG_MAX; 1126 *delta_jiffies = ULONG_MAX;
1124 return 0; 1127 return 0;