aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hardirq.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/hardirq.h')
-rw-r--r--include/linux/hardirq.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h
index 2961ec788046..49829988bfa0 100644
--- a/include/linux/hardirq.h
+++ b/include/linux/hardirq.h
@@ -109,6 +109,14 @@ static inline void account_system_vtime(struct task_struct *tsk)
109} 109}
110#endif 110#endif
111 111
112#if defined(CONFIG_PREEMPT_RCU) && defined(CONFIG_NO_HZ)
113extern void rcu_irq_enter(void);
114extern void rcu_irq_exit(void);
115#else
116# define rcu_irq_enter() do { } while (0)
117# define rcu_irq_exit() do { } while (0)
118#endif /* CONFIG_PREEMPT_RCU */
119
112/* 120/*
113 * It is safe to do non-atomic ops on ->hardirq_context, 121 * It is safe to do non-atomic ops on ->hardirq_context,
114 * because NMI handlers may not preempt and the ops are 122 * because NMI handlers may not preempt and the ops are
@@ -117,6 +125,7 @@ static inline void account_system_vtime(struct task_struct *tsk)
117 */ 125 */
118#define __irq_enter() \ 126#define __irq_enter() \
119 do { \ 127 do { \
128 rcu_irq_enter(); \
120 account_system_vtime(current); \ 129 account_system_vtime(current); \
121 add_preempt_count(HARDIRQ_OFFSET); \ 130 add_preempt_count(HARDIRQ_OFFSET); \
122 trace_hardirq_enter(); \ 131 trace_hardirq_enter(); \
@@ -135,6 +144,7 @@ extern void irq_enter(void);
135 trace_hardirq_exit(); \ 144 trace_hardirq_exit(); \
136 account_system_vtime(current); \ 145 account_system_vtime(current); \
137 sub_preempt_count(HARDIRQ_OFFSET); \ 146 sub_preempt_count(HARDIRQ_OFFSET); \
147 rcu_irq_exit(); \
138 } while (0) 148 } while (0)
139 149
140/* 150/*