Merge tag 'hyperv-fixes-signed-20231009' of git://git.kernel.org/pub/scm/linux/kernel...
[platform/kernel/linux-rpi.git] / drivers / misc / mei / mei-trace.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Copyright (c) 2015-2016, Intel Corporation. All rights reserved.
4  * Intel Management Engine Interface (Intel MEI) Linux driver
5  */
6
7 #if !defined(_MEI_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ)
8 #define _MEI_TRACE_H_
9
10 #include <linux/stringify.h>
11 #include <linux/types.h>
12 #include <linux/tracepoint.h>
13
14 #include <linux/device.h>
15
16 #undef TRACE_SYSTEM
17 #define TRACE_SYSTEM mei
18
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),
22         TP_STRUCT__entry(
23                 __string(dev, dev_name(dev))
24                 __field(const char *, reg)
25                 __field(u32, offs)
26                 __field(u32, val)
27         ),
28         TP_fast_assign(
29                 __assign_str(dev, dev_name(dev));
30                 __entry->reg  = reg;
31                 __entry->offs = offs;
32                 __entry->val = val;
33         ),
34         TP_printk("[%s] read %s:[%#x] = %#x",
35                   __get_str(dev), __entry->reg, __entry->offs, __entry->val)
36 );
37
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),
41         TP_STRUCT__entry(
42                 __string(dev, dev_name(dev))
43                 __field(const char *, reg)
44                 __field(u32, offs)
45                 __field(u32, val)
46         ),
47         TP_fast_assign(
48                 __assign_str(dev, dev_name(dev));
49                 __entry->reg = reg;
50                 __entry->offs = offs;
51                 __entry->val = val;
52         ),
53         TP_printk("[%s] write %s[%#x] = %#x",
54                   __get_str(dev), __entry->reg,  __entry->offs, __entry->val)
55 );
56
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),
60         TP_STRUCT__entry(
61                 __string(dev, dev_name(dev))
62                 __field(const char *, reg)
63                 __field(u32, offs)
64                 __field(u32, val)
65         ),
66         TP_fast_assign(
67                 __assign_str(dev, dev_name(dev));
68                 __entry->reg  = reg;
69                 __entry->offs = offs;
70                 __entry->val = val;
71         ),
72         TP_printk("[%s] pci cfg read %s:[%#x] = %#x",
73                   __get_str(dev), __entry->reg, __entry->offs, __entry->val)
74 );
75
76 #endif /* _MEI_TRACE_H_ */
77
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>