| .. | .. |
|---|
| 54 | 54 | * types of kernel builds, the rcu_read_lock() nesting depth is unknowable. |
|---|
| 55 | 55 | */ |
|---|
| 56 | 56 | #define rcu_preempt_depth() (current->rcu_read_lock_nesting) |
|---|
| 57 | | -#ifndef CONFIG_PREEMPT_RT |
|---|
| 58 | | -#define sched_rcu_preempt_depth() rcu_preempt_depth() |
|---|
| 59 | | -#else |
|---|
| 60 | | -static inline int sched_rcu_preempt_depth(void) { return 0; } |
|---|
| 61 | | -#endif |
|---|
| 62 | 57 | |
|---|
| 63 | 58 | #else /* #ifdef CONFIG_PREEMPT_RCU */ |
|---|
| 64 | 59 | |
|---|
| .. | .. |
|---|
| 83 | 78 | { |
|---|
| 84 | 79 | return 0; |
|---|
| 85 | 80 | } |
|---|
| 86 | | - |
|---|
| 87 | | -#define sched_rcu_preempt_depth() rcu_preempt_depth() |
|---|
| 88 | 81 | |
|---|
| 89 | 82 | #endif /* #else #ifdef CONFIG_PREEMPT_RCU */ |
|---|
| 90 | 83 | |
|---|
| .. | .. |
|---|
| 336 | 329 | #define rcu_sleep_check() \ |
|---|
| 337 | 330 | do { \ |
|---|
| 338 | 331 | rcu_preempt_sleep_check(); \ |
|---|
| 339 | | - if (!IS_ENABLED(CONFIG_PREEMPT_RT)) \ |
|---|
| 340 | | - RCU_LOCKDEP_WARN(lock_is_held(&rcu_bh_lock_map), \ |
|---|
| 332 | + RCU_LOCKDEP_WARN(lock_is_held(&rcu_bh_lock_map), \ |
|---|
| 341 | 333 | "Illegal context switch in RCU-bh read-side critical section"); \ |
|---|
| 342 | 334 | RCU_LOCKDEP_WARN(lock_is_held(&rcu_sched_lock_map), \ |
|---|
| 343 | 335 | "Illegal context switch in RCU-sched read-side critical section"); \ |
|---|