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.h46
1 files changed, 45 insertions, 1 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 00a7fd61b3c6..6a94cc8b1ca0 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -51,7 +51,17 @@ extern int rcu_expedited; /* for sysctl */
51extern int rcutorture_runnable; /* for sysctl */ 51extern int rcutorture_runnable; /* for sysctl */
52#endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ 52#endif /* #ifdef CONFIG_RCU_TORTURE_TEST */
53 53
54enum rcutorture_type {
55 RCU_FLAVOR,
56 RCU_BH_FLAVOR,
57 RCU_SCHED_FLAVOR,
58 SRCU_FLAVOR,
59 INVALID_RCU_FLAVOR
60};
61
54#if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) 62#if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU)
63void rcutorture_get_gp_data(enum rcutorture_type test_type, int *flags,
64 unsigned long *gpnum, unsigned long *completed);
55void rcutorture_record_test_transition(void); 65void rcutorture_record_test_transition(void);
56void rcutorture_record_progress(unsigned long vernum); 66void rcutorture_record_progress(unsigned long vernum);
57void do_trace_rcu_torture_read(const char *rcutorturename, 67void do_trace_rcu_torture_read(const char *rcutorturename,
@@ -60,6 +70,15 @@ void do_trace_rcu_torture_read(const char *rcutorturename,
60 unsigned long c_old, 70 unsigned long c_old,
61 unsigned long c); 71 unsigned long c);
62#else 72#else
73static inline void rcutorture_get_gp_data(enum rcutorture_type test_type,
74 int *flags,
75 unsigned long *gpnum,
76 unsigned long *completed)
77{
78 *flags = 0;
79 *gpnum = 0;
80 *completed = 0;
81}
63static inline void rcutorture_record_test_transition(void) 82static inline void rcutorture_record_test_transition(void)
64{ 83{
65} 84}
@@ -228,6 +247,18 @@ void rcu_idle_exit(void);
228void rcu_irq_enter(void); 247void rcu_irq_enter(void);
229void rcu_irq_exit(void); 248void rcu_irq_exit(void);
230 249
250#ifdef CONFIG_RCU_STALL_COMMON
251void rcu_sysrq_start(void);
252void rcu_sysrq_end(void);
253#else /* #ifdef CONFIG_RCU_STALL_COMMON */
254static inline void rcu_sysrq_start(void)
255{
256}
257static inline void rcu_sysrq_end(void)
258{
259}
260#endif /* #else #ifdef CONFIG_RCU_STALL_COMMON */
261
231#ifdef CONFIG_RCU_USER_QS 262#ifdef CONFIG_RCU_USER_QS
232void rcu_user_enter(void); 263void rcu_user_enter(void);
233void rcu_user_exit(void); 264void rcu_user_exit(void);
@@ -291,9 +322,19 @@ void wait_rcu_gp(call_rcu_func_t crf);
291 * initialization. 322 * initialization.
292 */ 323 */
293#ifdef CONFIG_DEBUG_OBJECTS_RCU_HEAD 324#ifdef CONFIG_DEBUG_OBJECTS_RCU_HEAD
325void init_rcu_head(struct rcu_head *head);
326void destroy_rcu_head(struct rcu_head *head);
294void init_rcu_head_on_stack(struct rcu_head *head); 327void init_rcu_head_on_stack(struct rcu_head *head);
295void destroy_rcu_head_on_stack(struct rcu_head *head); 328void destroy_rcu_head_on_stack(struct rcu_head *head);
296#else /* !CONFIG_DEBUG_OBJECTS_RCU_HEAD */ 329#else /* !CONFIG_DEBUG_OBJECTS_RCU_HEAD */
330static inline void init_rcu_head(struct rcu_head *head)
331{
332}
333
334static inline void destroy_rcu_head(struct rcu_head *head)
335{
336}
337
297static inline void init_rcu_head_on_stack(struct rcu_head *head) 338static inline void init_rcu_head_on_stack(struct rcu_head *head)
298{ 339{
299} 340}
@@ -328,7 +369,7 @@ extern struct lockdep_map rcu_lock_map;
328extern struct lockdep_map rcu_bh_lock_map; 369extern struct lockdep_map rcu_bh_lock_map;
329extern struct lockdep_map rcu_sched_lock_map; 370extern struct lockdep_map rcu_sched_lock_map;
330extern struct lockdep_map rcu_callback_map; 371extern struct lockdep_map rcu_callback_map;
331extern int debug_lockdep_rcu_enabled(void); 372int debug_lockdep_rcu_enabled(void);
332 373
333/** 374/**
334 * rcu_read_lock_held() - might we be in RCU read-side critical section? 375 * rcu_read_lock_held() - might we be in RCU read-side critical section?
@@ -949,6 +990,9 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
949 * pointers, but you must use rcu_assign_pointer() to initialize the 990 * pointers, but you must use rcu_assign_pointer() to initialize the
950 * external-to-structure pointer -after- you have completely initialized 991 * external-to-structure pointer -after- you have completely initialized
951 * the reader-accessible portions of the linked structure. 992 * the reader-accessible portions of the linked structure.
993 *
994 * Note that unlike rcu_assign_pointer(), RCU_INIT_POINTER() provides no
995 * ordering guarantees for either the CPU or the compiler.
952 */ 996 */
953#define RCU_INIT_POINTER(p, v) \ 997#define RCU_INIT_POINTER(p, v) \
954 do { \ 998 do { \