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