diff options
Diffstat (limited to 'include/linux/rcupdate.h')
| -rw-r--r-- | include/linux/rcupdate.h | 46 |
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 */ | |||
| 51 | extern int rcutorture_runnable; /* for sysctl */ | 51 | extern int rcutorture_runnable; /* for sysctl */ |
| 52 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ | 52 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ |
| 53 | 53 | ||
| 54 | enum 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) |
| 63 | void rcutorture_get_gp_data(enum rcutorture_type test_type, int *flags, | ||
| 64 | unsigned long *gpnum, unsigned long *completed); | ||
| 55 | void rcutorture_record_test_transition(void); | 65 | void rcutorture_record_test_transition(void); |
| 56 | void rcutorture_record_progress(unsigned long vernum); | 66 | void rcutorture_record_progress(unsigned long vernum); |
| 57 | void do_trace_rcu_torture_read(const char *rcutorturename, | 67 | void 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 |
| 73 | static 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 | } | ||
| 63 | static inline void rcutorture_record_test_transition(void) | 82 | static inline void rcutorture_record_test_transition(void) |
| 64 | { | 83 | { |
| 65 | } | 84 | } |
| @@ -228,6 +247,18 @@ void rcu_idle_exit(void); | |||
| 228 | void rcu_irq_enter(void); | 247 | void rcu_irq_enter(void); |
| 229 | void rcu_irq_exit(void); | 248 | void rcu_irq_exit(void); |
| 230 | 249 | ||
| 250 | #ifdef CONFIG_RCU_STALL_COMMON | ||
| 251 | void rcu_sysrq_start(void); | ||
| 252 | void rcu_sysrq_end(void); | ||
| 253 | #else /* #ifdef CONFIG_RCU_STALL_COMMON */ | ||
| 254 | static inline void rcu_sysrq_start(void) | ||
| 255 | { | ||
| 256 | } | ||
| 257 | static 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 |
| 232 | void rcu_user_enter(void); | 263 | void rcu_user_enter(void); |
| 233 | void rcu_user_exit(void); | 264 | void 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 |
| 325 | void init_rcu_head(struct rcu_head *head); | ||
| 326 | void destroy_rcu_head(struct rcu_head *head); | ||
| 294 | void init_rcu_head_on_stack(struct rcu_head *head); | 327 | void init_rcu_head_on_stack(struct rcu_head *head); |
| 295 | void destroy_rcu_head_on_stack(struct rcu_head *head); | 328 | void destroy_rcu_head_on_stack(struct rcu_head *head); |
| 296 | #else /* !CONFIG_DEBUG_OBJECTS_RCU_HEAD */ | 329 | #else /* !CONFIG_DEBUG_OBJECTS_RCU_HEAD */ |
| 330 | static inline void init_rcu_head(struct rcu_head *head) | ||
| 331 | { | ||
| 332 | } | ||
| 333 | |||
| 334 | static inline void destroy_rcu_head(struct rcu_head *head) | ||
| 335 | { | ||
| 336 | } | ||
| 337 | |||
| 297 | static inline void init_rcu_head_on_stack(struct rcu_head *head) | 338 | static 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; | |||
| 328 | extern struct lockdep_map rcu_bh_lock_map; | 369 | extern struct lockdep_map rcu_bh_lock_map; |
| 329 | extern struct lockdep_map rcu_sched_lock_map; | 370 | extern struct lockdep_map rcu_sched_lock_map; |
| 330 | extern struct lockdep_map rcu_callback_map; | 371 | extern struct lockdep_map rcu_callback_map; |
| 331 | extern int debug_lockdep_rcu_enabled(void); | 372 | int 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 { \ |
