Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
6a60dd12 SR |
2 | #ifndef _LINUX_FTRACE_IRQ_H |
3 | #define _LINUX_FTRACE_IRQ_H | |
4 | ||
7b2c8625 SRRH |
5 | #ifdef CONFIG_HWLAT_TRACER |
6 | extern bool trace_hwlat_callback_enabled; | |
7 | extern void trace_hwlat_callback(bool enter); | |
8 | #endif | |
9 | ||
bce29ac9 DBO |
10 | #ifdef CONFIG_OSNOISE_TRACER |
11 | extern bool trace_osnoise_callback_enabled; | |
12 | extern void trace_osnoise_callback(bool enter); | |
13 | #endif | |
14 | ||
7b2c8625 SRRH |
15 | static inline void ftrace_nmi_enter(void) |
16 | { | |
17 | #ifdef CONFIG_HWLAT_TRACER | |
18 | if (trace_hwlat_callback_enabled) | |
19 | trace_hwlat_callback(true); | |
20 | #endif | |
bce29ac9 DBO |
21 | #ifdef CONFIG_OSNOISE_TRACER |
22 | if (trace_osnoise_callback_enabled) | |
23 | trace_osnoise_callback(true); | |
24 | #endif | |
7b2c8625 SRRH |
25 | } |
26 | ||
27 | static inline void ftrace_nmi_exit(void) | |
28 | { | |
7b2c8625 SRRH |
29 | #ifdef CONFIG_HWLAT_TRACER |
30 | if (trace_hwlat_callback_enabled) | |
31 | trace_hwlat_callback(false); | |
32 | #endif | |
bce29ac9 DBO |
33 | #ifdef CONFIG_OSNOISE_TRACER |
34 | if (trace_osnoise_callback_enabled) | |
35 | trace_osnoise_callback(false); | |
36 | #endif | |
7b2c8625 SRRH |
37 | } |
38 | ||
6a60dd12 | 39 | #endif /* _LINUX_FTRACE_IRQ_H */ |