Merge branch 'akpm' (patches from Andrew)
[linux-2.6-microblaze.git] / include / linux / ftrace_irq.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_FTRACE_IRQ_H
3 #define _LINUX_FTRACE_IRQ_H
4
5 #ifdef CONFIG_HWLAT_TRACER
6 extern bool trace_hwlat_callback_enabled;
7 extern void trace_hwlat_callback(bool enter);
8 #endif
9
10 static inline void ftrace_nmi_enter(void)
11 {
12 #ifdef CONFIG_HWLAT_TRACER
13         if (trace_hwlat_callback_enabled)
14                 trace_hwlat_callback(true);
15 #endif
16 }
17
18 static inline void ftrace_nmi_exit(void)
19 {
20 #ifdef CONFIG_HWLAT_TRACER
21         if (trace_hwlat_callback_enabled)
22                 trace_hwlat_callback(false);
23 #endif
24 }
25
26 #endif /* _LINUX_FTRACE_IRQ_H */