Skip to content

Commit 51af802

Browse files
aegljwrdegoede
authored andcommitted
trace: platform/x86/intel/ifs: Add trace point to track Intel IFS operations
Add tracing support which may be useful for debugging systems that fail to complete In Field Scan tests. Acked-by: Steven Rostedt (Google) <[email protected]> Reviewed-by: Dan Williams <[email protected]> Signed-off-by: Tony Luck <[email protected]> Acked-by: Hans de Goede <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]>
1 parent 6f33a92 commit 51af802

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9865,6 +9865,7 @@ R: Ashok Raj <[email protected]>
98659865
R: Tony Luck <[email protected]>
98669866
S: Maintained
98679867
F: drivers/platform/x86/intel/ifs
9868+
F: include/trace/events/intel_ifs.h
98689869

98699870
INTEL INTEGRATED SENSOR HUB DRIVER
98709871
M: Srinivas Pandruvada <[email protected]>

drivers/platform/x86/intel/ifs/runtest.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
* core will update results of the test.
1818
*/
1919

20+
#define CREATE_TRACE_POINTS
21+
#include <trace/events/intel_ifs.h>
22+
2023
/* Max retries on the same chunk */
2124
#define MAX_IFS_RETRIES 5
2225

@@ -191,6 +194,8 @@ static void ifs_test_core(int cpu, struct device *dev)
191194

192195
status.data = msrvals[1];
193196

197+
trace_ifs_status(cpu, activate, status);
198+
194199
/* Some cases can be retried, give up for others */
195200
if (!can_restart(status))
196201
break;

include/trace/events/intel_ifs.h

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
#undef TRACE_SYSTEM
3+
#define TRACE_SYSTEM intel_ifs
4+
5+
#if !defined(_TRACE_IFS_H) || defined(TRACE_HEADER_MULTI_READ)
6+
#define _TRACE_IFS_H
7+
8+
#include <linux/ktime.h>
9+
#include <linux/tracepoint.h>
10+
11+
TRACE_EVENT(ifs_status,
12+
13+
TP_PROTO(int cpu, union ifs_scan activate, union ifs_status status),
14+
15+
TP_ARGS(cpu, activate, status),
16+
17+
TP_STRUCT__entry(
18+
__field( u64, status )
19+
__field( int, cpu )
20+
__field( u8, start )
21+
__field( u8, stop )
22+
),
23+
24+
TP_fast_assign(
25+
__entry->cpu = cpu;
26+
__entry->start = activate.start;
27+
__entry->stop = activate.stop;
28+
__entry->status = status.data;
29+
),
30+
31+
TP_printk("cpu: %d, start: %.2x, stop: %.2x, status: %llx",
32+
__entry->cpu,
33+
__entry->start,
34+
__entry->stop,
35+
__entry->status)
36+
);
37+
38+
#endif /* _TRACE_IFS_H */
39+
40+
/* This part must be outside protection */
41+
#include <trace/define_trace.h>

0 commit comments

Comments
 (0)