Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / include / linux / ftrace_irq.h
blobccda97dc7f8b916fb62942057d3316e9abaa2b0b
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_FTRACE_IRQ_H
3 #define _LINUX_FTRACE_IRQ_H
6 #ifdef CONFIG_FTRACE_NMI_ENTER
7 extern void arch_ftrace_nmi_enter(void);
8 extern void arch_ftrace_nmi_exit(void);
9 #else
10 static inline void arch_ftrace_nmi_enter(void) { }
11 static inline void arch_ftrace_nmi_exit(void) { }
12 #endif
14 #ifdef CONFIG_HWLAT_TRACER
15 extern bool trace_hwlat_callback_enabled;
16 extern void trace_hwlat_callback(bool enter);
17 #endif
19 static inline void ftrace_nmi_enter(void)
21 #ifdef CONFIG_HWLAT_TRACER
22 if (trace_hwlat_callback_enabled)
23 trace_hwlat_callback(true);
24 #endif
25 arch_ftrace_nmi_enter();
28 static inline void ftrace_nmi_exit(void)
30 arch_ftrace_nmi_exit();
31 #ifdef CONFIG_HWLAT_TRACER
32 if (trace_hwlat_callback_enabled)
33 trace_hwlat_callback(false);
34 #endif
37 #endif /* _LINUX_FTRACE_IRQ_H */