]> git.karo-electronics.de Git - karo-tx-linux.git/blob - include/linux/ftrace_irq.h
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[karo-tx-linux.git] / include / linux / ftrace_irq.h
1 #ifndef _LINUX_FTRACE_IRQ_H
2 #define _LINUX_FTRACE_IRQ_H
3
4
5 #ifdef CONFIG_FTRACE_NMI_ENTER
6 extern void arch_ftrace_nmi_enter(void);
7 extern void arch_ftrace_nmi_exit(void);
8 #else
9 static inline void arch_ftrace_nmi_enter(void) { }
10 static inline void arch_ftrace_nmi_exit(void) { }
11 #endif
12
13 #ifdef CONFIG_HWLAT_TRACER
14 extern bool trace_hwlat_callback_enabled;
15 extern void trace_hwlat_callback(bool enter);
16 #endif
17
18 static inline void ftrace_nmi_enter(void)
19 {
20 #ifdef CONFIG_HWLAT_TRACER
21         if (trace_hwlat_callback_enabled)
22                 trace_hwlat_callback(true);
23 #endif
24         arch_ftrace_nmi_enter();
25 }
26
27 static inline void ftrace_nmi_exit(void)
28 {
29         arch_ftrace_nmi_exit();
30 #ifdef CONFIG_HWLAT_TRACER
31         if (trace_hwlat_callback_enabled)
32                 trace_hwlat_callback(false);
33 #endif
34 }
35
36 #endif /* _LINUX_FTRACE_IRQ_H */