diff options
Diffstat (limited to 'include/linux/hardirq.h')
-rw-r--r-- | include/linux/hardirq.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 89a56d79e4c6..f83288347dda 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
@@ -119,13 +119,17 @@ static inline void account_system_vtime(struct task_struct *tsk) | |||
119 | } | 119 | } |
120 | #endif | 120 | #endif |
121 | 121 | ||
122 | #if defined(CONFIG_PREEMPT_RCU) && defined(CONFIG_NO_HZ) | 122 | #if defined(CONFIG_NO_HZ) && !defined(CONFIG_CLASSIC_RCU) |
123 | extern void rcu_irq_enter(void); | 123 | extern void rcu_irq_enter(void); |
124 | extern void rcu_irq_exit(void); | 124 | extern void rcu_irq_exit(void); |
125 | extern void rcu_nmi_enter(void); | ||
126 | extern void rcu_nmi_exit(void); | ||
125 | #else | 127 | #else |
126 | # define rcu_irq_enter() do { } while (0) | 128 | # define rcu_irq_enter() do { } while (0) |
127 | # define rcu_irq_exit() do { } while (0) | 129 | # define rcu_irq_exit() do { } while (0) |
128 | #endif /* CONFIG_PREEMPT_RCU */ | 130 | # define rcu_nmi_enter() do { } while (0) |
131 | # define rcu_nmi_exit() do { } while (0) | ||
132 | #endif /* #if defined(CONFIG_NO_HZ) && !defined(CONFIG_CLASSIC_RCU) */ | ||
129 | 133 | ||
130 | /* | 134 | /* |
131 | * It is safe to do non-atomic ops on ->hardirq_context, | 135 | * It is safe to do non-atomic ops on ->hardirq_context, |
@@ -135,7 +139,6 @@ extern void rcu_irq_exit(void); | |||
135 | */ | 139 | */ |
136 | #define __irq_enter() \ | 140 | #define __irq_enter() \ |
137 | do { \ | 141 | do { \ |
138 | rcu_irq_enter(); \ | ||
139 | account_system_vtime(current); \ | 142 | account_system_vtime(current); \ |
140 | add_preempt_count(HARDIRQ_OFFSET); \ | 143 | add_preempt_count(HARDIRQ_OFFSET); \ |
141 | trace_hardirq_enter(); \ | 144 | trace_hardirq_enter(); \ |
@@ -154,7 +157,6 @@ extern void irq_enter(void); | |||
154 | trace_hardirq_exit(); \ | 157 | trace_hardirq_exit(); \ |
155 | account_system_vtime(current); \ | 158 | account_system_vtime(current); \ |
156 | sub_preempt_count(HARDIRQ_OFFSET); \ | 159 | sub_preempt_count(HARDIRQ_OFFSET); \ |
157 | rcu_irq_exit(); \ | ||
158 | } while (0) | 160 | } while (0) |
159 | 161 | ||
160 | /* | 162 | /* |
@@ -166,11 +168,14 @@ extern void irq_exit(void); | |||
166 | do { \ | 168 | do { \ |
167 | ftrace_nmi_enter(); \ | 169 | ftrace_nmi_enter(); \ |
168 | lockdep_off(); \ | 170 | lockdep_off(); \ |
171 | rcu_nmi_enter(); \ | ||
169 | __irq_enter(); \ | 172 | __irq_enter(); \ |
170 | } while (0) | 173 | } while (0) |
174 | |||
171 | #define nmi_exit() \ | 175 | #define nmi_exit() \ |
172 | do { \ | 176 | do { \ |
173 | __irq_exit(); \ | 177 | __irq_exit(); \ |
178 | rcu_nmi_exit(); \ | ||
174 | lockdep_on(); \ | 179 | lockdep_on(); \ |
175 | ftrace_nmi_exit(); \ | 180 | ftrace_nmi_exit(); \ |
176 | } while (0) | 181 | } while (0) |