File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ static inline void rcu_irq_exit_irqson(void) { }
72
72
static inline void rcu_irq_enter_irqson (void ) { }
73
73
static inline void rcu_irq_exit (void ) { }
74
74
static inline void rcu_irq_exit_preempt (void ) { }
75
+ static inline void rcu_irq_exit_check_preempt (void ) { }
75
76
static inline void exit_rcu (void ) { }
76
77
static inline bool rcu_preempt_need_deferred_qs (struct task_struct * t )
77
78
{
Original file line number Diff line number Diff line change @@ -51,6 +51,12 @@ void rcu_irq_exit_preempt(void);
51
51
void rcu_irq_enter_irqson (void );
52
52
void rcu_irq_exit_irqson (void );
53
53
54
+ #ifdef CONFIG_PROVE_RCU
55
+ void rcu_irq_exit_check_preempt (void );
56
+ #else
57
+ static inline void rcu_irq_exit_check_preempt (void ) { }
58
+ #endif
59
+
54
60
void exit_rcu (void );
55
61
56
62
void rcu_scheduler_starting (void );
Original file line number Diff line number Diff line change @@ -765,6 +765,24 @@ void rcu_irq_exit_preempt(void)
765
765
"RCU in extended quiescent state!" );
766
766
}
767
767
768
+ #ifdef CONFIG_PROVE_RCU
769
+ /**
770
+ * rcu_irq_exit_check_preempt - Validate that scheduling is possible
771
+ */
772
+ void rcu_irq_exit_check_preempt (void )
773
+ {
774
+ lockdep_assert_irqs_disabled ();
775
+
776
+ RCU_LOCKDEP_WARN (__this_cpu_read (rcu_data .dynticks_nesting ) <= 0 ,
777
+ "RCU dynticks_nesting counter underflow/zero!" );
778
+ RCU_LOCKDEP_WARN (__this_cpu_read (rcu_data .dynticks_nmi_nesting ) !=
779
+ DYNTICK_IRQ_NONIDLE ,
780
+ "Bad RCU dynticks_nmi_nesting counter\n" );
781
+ RCU_LOCKDEP_WARN (rcu_dynticks_curr_cpu_in_eqs (),
782
+ "RCU in extended quiescent state!" );
783
+ }
784
+ #endif /* #ifdef CONFIG_PROVE_RCU */
785
+
768
786
/*
769
787
* Wrapper for rcu_irq_exit() where interrupts are enabled.
770
788
*
You can’t perform that action at this time.
0 commit comments