1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (c) 2015-2016, Intel Corporation. All rights reserved.
4 * Intel Management Engine Interface (Intel MEI) Linux driver
7 #if !defined(_MEI_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ)
10 #include <linux/stringify.h>
11 #include <linux/types.h>
12 #include <linux/tracepoint.h>
14 #include <linux/device.h>
17 #define TRACE_SYSTEM mei
19 TRACE_EVENT(mei_reg_read,
20 TP_PROTO(const struct device *dev, const char *reg, u32 offs, u32 val),
21 TP_ARGS(dev, reg, offs, val),
23 __string(dev, dev_name(dev))
24 __field(const char *, reg)
29 __assign_str(dev, dev_name(dev));
34 TP_printk("[%s] read %s:[%#x] = %#x",
35 __get_str(dev), __entry->reg, __entry->offs, __entry->val)
38 TRACE_EVENT(mei_reg_write,
39 TP_PROTO(const struct device *dev, const char *reg, u32 offs, u32 val),
40 TP_ARGS(dev, reg, offs, val),
42 __string(dev, dev_name(dev))
43 __field(const char *, reg)
48 __assign_str(dev, dev_name(dev));
53 TP_printk("[%s] write %s[%#x] = %#x",
54 __get_str(dev), __entry->reg, __entry->offs, __entry->val)
57 TRACE_EVENT(mei_pci_cfg_read,
58 TP_PROTO(const struct device *dev, const char *reg, u32 offs, u32 val),
59 TP_ARGS(dev, reg, offs, val),
61 __string(dev, dev_name(dev))
62 __field(const char *, reg)
67 __assign_str(dev, dev_name(dev));
72 TP_printk("[%s] pci cfg read %s:[%#x] = %#x",
73 __get_str(dev), __entry->reg, __entry->offs, __entry->val)
76 #endif /* _MEI_TRACE_H_ */
78 /* This part must be outside protection */
79 #undef TRACE_INCLUDE_PATH
80 #undef TRACE_INCLUDE_FILE
81 #define TRACE_INCLUDE_PATH .
82 #define TRACE_INCLUDE_FILE mei-trace
83 #include <trace/define_trace.h>