printf: Remove unused 'bprintf'
[drm/drm-misc.git] / include / linux / ftrace_irq.h
blobf6faa31289ba61003667fd93507dbaadfff12b79
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_FTRACE_IRQ_H
3 #define _LINUX_FTRACE_IRQ_H
5 #ifdef CONFIG_HWLAT_TRACER
6 extern bool trace_hwlat_callback_enabled;
7 extern void trace_hwlat_callback(bool enter);
8 #endif
10 #ifdef CONFIG_OSNOISE_TRACER
11 extern bool trace_osnoise_callback_enabled;
12 extern void trace_osnoise_callback(bool enter);
13 #endif
15 static inline void ftrace_nmi_enter(void)
17 #ifdef CONFIG_HWLAT_TRACER
18 if (trace_hwlat_callback_enabled)
19 trace_hwlat_callback(true);
20 #endif
21 #ifdef CONFIG_OSNOISE_TRACER
22 if (trace_osnoise_callback_enabled)
23 trace_osnoise_callback(true);
24 #endif
27 static inline void ftrace_nmi_exit(void)
29 #ifdef CONFIG_HWLAT_TRACER
30 if (trace_hwlat_callback_enabled)
31 trace_hwlat_callback(false);
32 #endif
33 #ifdef CONFIG_OSNOISE_TRACER
34 if (trace_osnoise_callback_enabled)
35 trace_osnoise_callback(false);
36 #endif
39 #endif /* _LINUX_FTRACE_IRQ_H */