diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2015-03-25 16:14:26 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-03-27 05:01:48 -0400 |
commit | 40e2ec657dcb0ae328db1abc8e37df4caa893391 (patch) | |
tree | 7d7e10f9713620864b0353954c74e2968b433ef7 | |
parent | 47eb582e702880c302036d17341c7ea1a7dc2a53 (diff) |
x86/irq/tracing: Move ARCH_LOCKDEP_SYS_EXIT defines closer to their users
This change simply moves defines around (even if it's not
obvious in a patch form). Nothing is changed.
This is a preparation for folding ARCH_LOCKDEP_SYS_EXIT defines
into their users.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Will Drewry <wad@chromium.org>
Link: http://lkml.kernel.org/r/1427314468-12763-2-git-send-email-dvlasenk@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | arch/x86/include/asm/irqflags.h | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/arch/x86/include/asm/irqflags.h b/arch/x86/include/asm/irqflags.h index 021bee9b86b6..55866c26d447 100644 --- a/arch/x86/include/asm/irqflags.h +++ b/arch/x86/include/asm/irqflags.h | |||
@@ -163,12 +163,20 @@ static inline int arch_irqs_disabled(void) | |||
163 | 163 | ||
164 | return arch_irqs_disabled_flags(flags); | 164 | return arch_irqs_disabled_flags(flags); |
165 | } | 165 | } |
166 | #endif /* !__ASSEMBLY__ */ | ||
166 | 167 | ||
168 | #ifdef __ASSEMBLY__ | ||
169 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
170 | # define TRACE_IRQS_ON call trace_hardirqs_on_thunk; | ||
171 | # define TRACE_IRQS_OFF call trace_hardirqs_off_thunk; | ||
167 | #else | 172 | #else |
168 | 173 | # define TRACE_IRQS_ON | |
169 | #ifdef CONFIG_X86_64 | 174 | # define TRACE_IRQS_OFF |
170 | #define ARCH_LOCKDEP_SYS_EXIT call lockdep_sys_exit_thunk | 175 | #endif |
171 | #define ARCH_LOCKDEP_SYS_EXIT_IRQ \ | 176 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
177 | # ifdef CONFIG_X86_64 | ||
178 | # define ARCH_LOCKDEP_SYS_EXIT call lockdep_sys_exit_thunk | ||
179 | # define ARCH_LOCKDEP_SYS_EXIT_IRQ \ | ||
172 | TRACE_IRQS_ON; \ | 180 | TRACE_IRQS_ON; \ |
173 | sti; \ | 181 | sti; \ |
174 | SAVE_EXTRA_REGS; \ | 182 | SAVE_EXTRA_REGS; \ |
@@ -176,9 +184,8 @@ static inline int arch_irqs_disabled(void) | |||
176 | RESTORE_EXTRA_REGS; \ | 184 | RESTORE_EXTRA_REGS; \ |
177 | cli; \ | 185 | cli; \ |
178 | TRACE_IRQS_OFF; | 186 | TRACE_IRQS_OFF; |
179 | 187 | # else | |
180 | #else | 188 | # define ARCH_LOCKDEP_SYS_EXIT \ |
181 | #define ARCH_LOCKDEP_SYS_EXIT \ | ||
182 | pushl %eax; \ | 189 | pushl %eax; \ |
183 | pushl %ecx; \ | 190 | pushl %ecx; \ |
184 | pushl %edx; \ | 191 | pushl %edx; \ |
@@ -186,24 +193,14 @@ static inline int arch_irqs_disabled(void) | |||
186 | popl %edx; \ | 193 | popl %edx; \ |
187 | popl %ecx; \ | 194 | popl %ecx; \ |
188 | popl %eax; | 195 | popl %eax; |
189 | 196 | # define ARCH_LOCKDEP_SYS_EXIT_IRQ | |
190 | #define ARCH_LOCKDEP_SYS_EXIT_IRQ | 197 | # endif |
191 | #endif | ||
192 | |||
193 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
194 | # define TRACE_IRQS_ON call trace_hardirqs_on_thunk; | ||
195 | # define TRACE_IRQS_OFF call trace_hardirqs_off_thunk; | ||
196 | #else | ||
197 | # define TRACE_IRQS_ON | ||
198 | # define TRACE_IRQS_OFF | ||
199 | #endif | ||
200 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
201 | # define LOCKDEP_SYS_EXIT ARCH_LOCKDEP_SYS_EXIT | 198 | # define LOCKDEP_SYS_EXIT ARCH_LOCKDEP_SYS_EXIT |
202 | # define LOCKDEP_SYS_EXIT_IRQ ARCH_LOCKDEP_SYS_EXIT_IRQ | 199 | # define LOCKDEP_SYS_EXIT_IRQ ARCH_LOCKDEP_SYS_EXIT_IRQ |
203 | # else | 200 | # else |
204 | # define LOCKDEP_SYS_EXIT | 201 | # define LOCKDEP_SYS_EXIT |
205 | # define LOCKDEP_SYS_EXIT_IRQ | 202 | # define LOCKDEP_SYS_EXIT_IRQ |
206 | # endif | 203 | # endif |
207 | |||
208 | #endif /* __ASSEMBLY__ */ | 204 | #endif /* __ASSEMBLY__ */ |
205 | |||
209 | #endif | 206 | #endif |