• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
ftrace_nmi_enter(void)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 
ftrace_nmi_exit(void)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 */
27