Loading...
1/* SPDX-License-Identifier: GPL-2.0-only */
2/******************************************************************************
3 *
4 * Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved.
5 * Copyright(c) 2016-2017 Intel Deutschland GmbH
6 *****************************************************************************/
7
8#if !defined(__IWLWIFI_DEVICE_TRACE_IO) || defined(TRACE_HEADER_MULTI_READ)
9#define __IWLWIFI_DEVICE_TRACE_IO
10
11#include <linux/tracepoint.h>
12#include <linux/pci.h>
13
14#undef TRACE_SYSTEM
15#define TRACE_SYSTEM iwlwifi_io
16
17TRACE_EVENT(iwlwifi_dev_ioread32,
18 TP_PROTO(const struct device *dev, u32 offs, u32 val),
19 TP_ARGS(dev, offs, val),
20 TP_STRUCT__entry(
21 DEV_ENTRY
22 __field(u32, offs)
23 __field(u32, val)
24 ),
25 TP_fast_assign(
26 DEV_ASSIGN;
27 __entry->offs = offs;
28 __entry->val = val;
29 ),
30 TP_printk("[%s] read io[%#x] = %#x",
31 __get_str(dev), __entry->offs, __entry->val)
32);
33
34TRACE_EVENT(iwlwifi_dev_iowrite8,
35 TP_PROTO(const struct device *dev, u32 offs, u8 val),
36 TP_ARGS(dev, offs, val),
37 TP_STRUCT__entry(
38 DEV_ENTRY
39 __field(u32, offs)
40 __field(u8, val)
41 ),
42 TP_fast_assign(
43 DEV_ASSIGN;
44 __entry->offs = offs;
45 __entry->val = val;
46 ),
47 TP_printk("[%s] write io[%#x] = %#x)",
48 __get_str(dev), __entry->offs, __entry->val)
49);
50
51TRACE_EVENT(iwlwifi_dev_iowrite32,
52 TP_PROTO(const struct device *dev, u32 offs, u32 val),
53 TP_ARGS(dev, offs, val),
54 TP_STRUCT__entry(
55 DEV_ENTRY
56 __field(u32, offs)
57 __field(u32, val)
58 ),
59 TP_fast_assign(
60 DEV_ASSIGN;
61 __entry->offs = offs;
62 __entry->val = val;
63 ),
64 TP_printk("[%s] write io[%#x] = %#x)",
65 __get_str(dev), __entry->offs, __entry->val)
66);
67
68TRACE_EVENT(iwlwifi_dev_iowrite64,
69 TP_PROTO(const struct device *dev, u64 offs, u64 val),
70 TP_ARGS(dev, offs, val),
71 TP_STRUCT__entry(
72 DEV_ENTRY
73 __field(u64, offs)
74 __field(u64, val)
75 ),
76 TP_fast_assign(
77 DEV_ASSIGN;
78 __entry->offs = offs;
79 __entry->val = val;
80 ),
81 TP_printk("[%s] write io[%llu] = %llu)",
82 __get_str(dev), __entry->offs, __entry->val)
83);
84
85TRACE_EVENT(iwlwifi_dev_iowrite_prph32,
86 TP_PROTO(const struct device *dev, u32 offs, u32 val),
87 TP_ARGS(dev, offs, val),
88 TP_STRUCT__entry(
89 DEV_ENTRY
90 __field(u32, offs)
91 __field(u32, val)
92 ),
93 TP_fast_assign(
94 DEV_ASSIGN;
95 __entry->offs = offs;
96 __entry->val = val;
97 ),
98 TP_printk("[%s] write PRPH[%#x] = %#x)",
99 __get_str(dev), __entry->offs, __entry->val)
100);
101
102TRACE_EVENT(iwlwifi_dev_iowrite_prph64,
103 TP_PROTO(const struct device *dev, u64 offs, u64 val),
104 TP_ARGS(dev, offs, val),
105 TP_STRUCT__entry(
106 DEV_ENTRY
107 __field(u64, offs)
108 __field(u64, val)
109 ),
110 TP_fast_assign(
111 DEV_ASSIGN;
112 __entry->offs = offs;
113 __entry->val = val;
114 ),
115 TP_printk("[%s] write PRPH[%llu] = %llu)",
116 __get_str(dev), __entry->offs, __entry->val)
117);
118
119TRACE_EVENT(iwlwifi_dev_ioread_prph32,
120 TP_PROTO(const struct device *dev, u32 offs, u32 val),
121 TP_ARGS(dev, offs, val),
122 TP_STRUCT__entry(
123 DEV_ENTRY
124 __field(u32, offs)
125 __field(u32, val)
126 ),
127 TP_fast_assign(
128 DEV_ASSIGN;
129 __entry->offs = offs;
130 __entry->val = val;
131 ),
132 TP_printk("[%s] read PRPH[%#x] = %#x",
133 __get_str(dev), __entry->offs, __entry->val)
134);
135
136TRACE_EVENT(iwlwifi_dev_irq,
137 TP_PROTO(const struct device *dev),
138 TP_ARGS(dev),
139 TP_STRUCT__entry(
140 DEV_ENTRY
141 ),
142 TP_fast_assign(
143 DEV_ASSIGN;
144 ),
145 /* TP_printk("") doesn't compile */
146 TP_printk("%d", 0)
147);
148
149TRACE_EVENT(iwlwifi_dev_irq_msix,
150 TP_PROTO(const struct device *dev, struct msix_entry *msix_entry,
151 bool defirq, u32 inta_fh, u32 inta_hw),
152 TP_ARGS(dev, msix_entry, defirq, inta_fh, inta_hw),
153 TP_STRUCT__entry(
154 DEV_ENTRY
155 __field(u32, entry)
156 __field(u8, defirq)
157 __field(u32, inta_fh)
158 __field(u32, inta_hw)
159 ),
160 TP_fast_assign(
161 DEV_ASSIGN;
162 __entry->entry = msix_entry->entry;
163 __entry->defirq = defirq;
164 __entry->inta_fh = inta_fh;
165 __entry->inta_hw = inta_hw;
166 ),
167 TP_printk("entry:%d defirq:%d fh:0x%x, hw:0x%x",
168 __entry->entry, __entry->defirq,
169 __entry->inta_fh, __entry->inta_hw)
170);
171
172TRACE_EVENT(iwlwifi_dev_ict_read,
173 TP_PROTO(const struct device *dev, u32 index, u32 value),
174 TP_ARGS(dev, index, value),
175 TP_STRUCT__entry(
176 DEV_ENTRY
177 __field(u32, index)
178 __field(u32, value)
179 ),
180 TP_fast_assign(
181 DEV_ASSIGN;
182 __entry->index = index;
183 __entry->value = value;
184 ),
185 TP_printk("[%s] read ict[%d] = %#.8x",
186 __get_str(dev), __entry->index, __entry->value)
187);
188#endif /* __IWLWIFI_DEVICE_TRACE_IO */
189
190#undef TRACE_INCLUDE_PATH
191#define TRACE_INCLUDE_PATH .
192#undef TRACE_INCLUDE_FILE
193#define TRACE_INCLUDE_FILE iwl-devtrace-io
194#include <trace/define_trace.h>
1/******************************************************************************
2 *
3 * Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved.
4 * Copyright(c) 2016-2017 Intel Deutschland GmbH
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of version 2 of the GNU General Public License as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
18 *
19 * The full GNU General Public License is included in this distribution in the
20 * file called LICENSE.
21 *
22 * Contact Information:
23 * Intel Linux Wireless <linuxwifi@intel.com>
24 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
25 *
26 *****************************************************************************/
27
28#if !defined(__IWLWIFI_DEVICE_TRACE_IO) || defined(TRACE_HEADER_MULTI_READ)
29#define __IWLWIFI_DEVICE_TRACE_IO
30
31#include <linux/tracepoint.h>
32#include <linux/pci.h>
33
34#undef TRACE_SYSTEM
35#define TRACE_SYSTEM iwlwifi_io
36
37TRACE_EVENT(iwlwifi_dev_ioread32,
38 TP_PROTO(const struct device *dev, u32 offs, u32 val),
39 TP_ARGS(dev, offs, val),
40 TP_STRUCT__entry(
41 DEV_ENTRY
42 __field(u32, offs)
43 __field(u32, val)
44 ),
45 TP_fast_assign(
46 DEV_ASSIGN;
47 __entry->offs = offs;
48 __entry->val = val;
49 ),
50 TP_printk("[%s] read io[%#x] = %#x",
51 __get_str(dev), __entry->offs, __entry->val)
52);
53
54TRACE_EVENT(iwlwifi_dev_iowrite8,
55 TP_PROTO(const struct device *dev, u32 offs, u8 val),
56 TP_ARGS(dev, offs, val),
57 TP_STRUCT__entry(
58 DEV_ENTRY
59 __field(u32, offs)
60 __field(u8, val)
61 ),
62 TP_fast_assign(
63 DEV_ASSIGN;
64 __entry->offs = offs;
65 __entry->val = val;
66 ),
67 TP_printk("[%s] write io[%#x] = %#x)",
68 __get_str(dev), __entry->offs, __entry->val)
69);
70
71TRACE_EVENT(iwlwifi_dev_iowrite32,
72 TP_PROTO(const struct device *dev, u32 offs, u32 val),
73 TP_ARGS(dev, offs, val),
74 TP_STRUCT__entry(
75 DEV_ENTRY
76 __field(u32, offs)
77 __field(u32, val)
78 ),
79 TP_fast_assign(
80 DEV_ASSIGN;
81 __entry->offs = offs;
82 __entry->val = val;
83 ),
84 TP_printk("[%s] write io[%#x] = %#x)",
85 __get_str(dev), __entry->offs, __entry->val)
86);
87
88TRACE_EVENT(iwlwifi_dev_iowrite64,
89 TP_PROTO(const struct device *dev, u64 offs, u64 val),
90 TP_ARGS(dev, offs, val),
91 TP_STRUCT__entry(
92 DEV_ENTRY
93 __field(u64, offs)
94 __field(u64, val)
95 ),
96 TP_fast_assign(
97 DEV_ASSIGN;
98 __entry->offs = offs;
99 __entry->val = val;
100 ),
101 TP_printk("[%s] write io[%llu] = %llu)",
102 __get_str(dev), __entry->offs, __entry->val)
103);
104
105TRACE_EVENT(iwlwifi_dev_iowrite_prph32,
106 TP_PROTO(const struct device *dev, u32 offs, u32 val),
107 TP_ARGS(dev, offs, val),
108 TP_STRUCT__entry(
109 DEV_ENTRY
110 __field(u32, offs)
111 __field(u32, val)
112 ),
113 TP_fast_assign(
114 DEV_ASSIGN;
115 __entry->offs = offs;
116 __entry->val = val;
117 ),
118 TP_printk("[%s] write PRPH[%#x] = %#x)",
119 __get_str(dev), __entry->offs, __entry->val)
120);
121
122TRACE_EVENT(iwlwifi_dev_iowrite_prph64,
123 TP_PROTO(const struct device *dev, u64 offs, u64 val),
124 TP_ARGS(dev, offs, val),
125 TP_STRUCT__entry(
126 DEV_ENTRY
127 __field(u64, offs)
128 __field(u64, val)
129 ),
130 TP_fast_assign(
131 DEV_ASSIGN;
132 __entry->offs = offs;
133 __entry->val = val;
134 ),
135 TP_printk("[%s] write PRPH[%llu] = %llu)",
136 __get_str(dev), __entry->offs, __entry->val)
137);
138
139TRACE_EVENT(iwlwifi_dev_ioread_prph32,
140 TP_PROTO(const struct device *dev, u32 offs, u32 val),
141 TP_ARGS(dev, offs, val),
142 TP_STRUCT__entry(
143 DEV_ENTRY
144 __field(u32, offs)
145 __field(u32, val)
146 ),
147 TP_fast_assign(
148 DEV_ASSIGN;
149 __entry->offs = offs;
150 __entry->val = val;
151 ),
152 TP_printk("[%s] read PRPH[%#x] = %#x",
153 __get_str(dev), __entry->offs, __entry->val)
154);
155
156TRACE_EVENT(iwlwifi_dev_irq,
157 TP_PROTO(const struct device *dev),
158 TP_ARGS(dev),
159 TP_STRUCT__entry(
160 DEV_ENTRY
161 ),
162 TP_fast_assign(
163 DEV_ASSIGN;
164 ),
165 /* TP_printk("") doesn't compile */
166 TP_printk("%d", 0)
167);
168
169TRACE_EVENT(iwlwifi_dev_irq_msix,
170 TP_PROTO(const struct device *dev, struct msix_entry *msix_entry,
171 bool defirq, u32 inta_fh, u32 inta_hw),
172 TP_ARGS(dev, msix_entry, defirq, inta_fh, inta_hw),
173 TP_STRUCT__entry(
174 DEV_ENTRY
175 __field(u32, entry)
176 __field(u8, defirq)
177 __field(u32, inta_fh)
178 __field(u32, inta_hw)
179 ),
180 TP_fast_assign(
181 DEV_ASSIGN;
182 __entry->entry = msix_entry->entry;
183 __entry->defirq = defirq;
184 __entry->inta_fh = inta_fh;
185 __entry->inta_hw = inta_hw;
186 ),
187 TP_printk("entry:%d defirq:%d fh:0x%x, hw:0x%x",
188 __entry->entry, __entry->defirq,
189 __entry->inta_fh, __entry->inta_hw)
190);
191
192TRACE_EVENT(iwlwifi_dev_ict_read,
193 TP_PROTO(const struct device *dev, u32 index, u32 value),
194 TP_ARGS(dev, index, value),
195 TP_STRUCT__entry(
196 DEV_ENTRY
197 __field(u32, index)
198 __field(u32, value)
199 ),
200 TP_fast_assign(
201 DEV_ASSIGN;
202 __entry->index = index;
203 __entry->value = value;
204 ),
205 TP_printk("[%s] read ict[%d] = %#.8x",
206 __get_str(dev), __entry->index, __entry->value)
207);
208#endif /* __IWLWIFI_DEVICE_TRACE_IO */
209
210#undef TRACE_INCLUDE_PATH
211#define TRACE_INCLUDE_PATH .
212#undef TRACE_INCLUDE_FILE
213#define TRACE_INCLUDE_FILE iwl-devtrace-io
214#include <trace/define_trace.h>