i2c: mxs: use MXS_DMA_CTRL_WAIT4END instead of DMA_CTRL_ACK
[linux/fpc-iii.git] / include / trace / events / random.h
blob32c10a515e2d5438e8d620a0c2313aab5f849b2b
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM random
5 #if !defined(_TRACE_RANDOM_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_RANDOM_H
8 #include <linux/writeback.h>
9 #include <linux/tracepoint.h>
11 TRACE_EVENT(add_device_randomness,
12 TP_PROTO(int bytes, unsigned long IP),
14 TP_ARGS(bytes, IP),
16 TP_STRUCT__entry(
17 __field( int, bytes )
18 __field(unsigned long, IP )
21 TP_fast_assign(
22 __entry->bytes = bytes;
23 __entry->IP = IP;
26 TP_printk("bytes %d caller %pS",
27 __entry->bytes, (void *)__entry->IP)
30 DECLARE_EVENT_CLASS(random__mix_pool_bytes,
31 TP_PROTO(const char *pool_name, int bytes, unsigned long IP),
33 TP_ARGS(pool_name, bytes, IP),
35 TP_STRUCT__entry(
36 __field( const char *, pool_name )
37 __field( int, bytes )
38 __field(unsigned long, IP )
41 TP_fast_assign(
42 __entry->pool_name = pool_name;
43 __entry->bytes = bytes;
44 __entry->IP = IP;
47 TP_printk("%s pool: bytes %d caller %pS",
48 __entry->pool_name, __entry->bytes, (void *)__entry->IP)
51 DEFINE_EVENT(random__mix_pool_bytes, mix_pool_bytes,
52 TP_PROTO(const char *pool_name, int bytes, unsigned long IP),
54 TP_ARGS(pool_name, bytes, IP)
57 DEFINE_EVENT(random__mix_pool_bytes, mix_pool_bytes_nolock,
58 TP_PROTO(const char *pool_name, int bytes, unsigned long IP),
60 TP_ARGS(pool_name, bytes, IP)
63 TRACE_EVENT(credit_entropy_bits,
64 TP_PROTO(const char *pool_name, int bits, int entropy_count,
65 unsigned long IP),
67 TP_ARGS(pool_name, bits, entropy_count, IP),
69 TP_STRUCT__entry(
70 __field( const char *, pool_name )
71 __field( int, bits )
72 __field( int, entropy_count )
73 __field(unsigned long, IP )
76 TP_fast_assign(
77 __entry->pool_name = pool_name;
78 __entry->bits = bits;
79 __entry->entropy_count = entropy_count;
80 __entry->IP = IP;
83 TP_printk("%s pool: bits %d entropy_count %d caller %pS",
84 __entry->pool_name, __entry->bits,
85 __entry->entropy_count, (void *)__entry->IP)
88 TRACE_EVENT(push_to_pool,
89 TP_PROTO(const char *pool_name, int pool_bits, int input_bits),
91 TP_ARGS(pool_name, pool_bits, input_bits),
93 TP_STRUCT__entry(
94 __field( const char *, pool_name )
95 __field( int, pool_bits )
96 __field( int, input_bits )
99 TP_fast_assign(
100 __entry->pool_name = pool_name;
101 __entry->pool_bits = pool_bits;
102 __entry->input_bits = input_bits;
105 TP_printk("%s: pool_bits %d input_pool_bits %d",
106 __entry->pool_name, __entry->pool_bits,
107 __entry->input_bits)
110 TRACE_EVENT(debit_entropy,
111 TP_PROTO(const char *pool_name, int debit_bits),
113 TP_ARGS(pool_name, debit_bits),
115 TP_STRUCT__entry(
116 __field( const char *, pool_name )
117 __field( int, debit_bits )
120 TP_fast_assign(
121 __entry->pool_name = pool_name;
122 __entry->debit_bits = debit_bits;
125 TP_printk("%s: debit_bits %d", __entry->pool_name,
126 __entry->debit_bits)
129 TRACE_EVENT(add_input_randomness,
130 TP_PROTO(int input_bits),
132 TP_ARGS(input_bits),
134 TP_STRUCT__entry(
135 __field( int, input_bits )
138 TP_fast_assign(
139 __entry->input_bits = input_bits;
142 TP_printk("input_pool_bits %d", __entry->input_bits)
145 TRACE_EVENT(add_disk_randomness,
146 TP_PROTO(dev_t dev, int input_bits),
148 TP_ARGS(dev, input_bits),
150 TP_STRUCT__entry(
151 __field( dev_t, dev )
152 __field( int, input_bits )
155 TP_fast_assign(
156 __entry->dev = dev;
157 __entry->input_bits = input_bits;
160 TP_printk("dev %d,%d input_pool_bits %d", MAJOR(__entry->dev),
161 MINOR(__entry->dev), __entry->input_bits)
164 TRACE_EVENT(xfer_secondary_pool,
165 TP_PROTO(const char *pool_name, int xfer_bits, int request_bits,
166 int pool_entropy, int input_entropy),
168 TP_ARGS(pool_name, xfer_bits, request_bits, pool_entropy,
169 input_entropy),
171 TP_STRUCT__entry(
172 __field( const char *, pool_name )
173 __field( int, xfer_bits )
174 __field( int, request_bits )
175 __field( int, pool_entropy )
176 __field( int, input_entropy )
179 TP_fast_assign(
180 __entry->pool_name = pool_name;
181 __entry->xfer_bits = xfer_bits;
182 __entry->request_bits = request_bits;
183 __entry->pool_entropy = pool_entropy;
184 __entry->input_entropy = input_entropy;
187 TP_printk("pool %s xfer_bits %d request_bits %d pool_entropy %d "
188 "input_entropy %d", __entry->pool_name, __entry->xfer_bits,
189 __entry->request_bits, __entry->pool_entropy,
190 __entry->input_entropy)
193 DECLARE_EVENT_CLASS(random__get_random_bytes,
194 TP_PROTO(int nbytes, unsigned long IP),
196 TP_ARGS(nbytes, IP),
198 TP_STRUCT__entry(
199 __field( int, nbytes )
200 __field(unsigned long, IP )
203 TP_fast_assign(
204 __entry->nbytes = nbytes;
205 __entry->IP = IP;
208 TP_printk("nbytes %d caller %pS", __entry->nbytes, (void *)__entry->IP)
211 DEFINE_EVENT(random__get_random_bytes, get_random_bytes,
212 TP_PROTO(int nbytes, unsigned long IP),
214 TP_ARGS(nbytes, IP)
217 DEFINE_EVENT(random__get_random_bytes, get_random_bytes_arch,
218 TP_PROTO(int nbytes, unsigned long IP),
220 TP_ARGS(nbytes, IP)
223 DECLARE_EVENT_CLASS(random__extract_entropy,
224 TP_PROTO(const char *pool_name, int nbytes, int entropy_count,
225 unsigned long IP),
227 TP_ARGS(pool_name, nbytes, entropy_count, IP),
229 TP_STRUCT__entry(
230 __field( const char *, pool_name )
231 __field( int, nbytes )
232 __field( int, entropy_count )
233 __field(unsigned long, IP )
236 TP_fast_assign(
237 __entry->pool_name = pool_name;
238 __entry->nbytes = nbytes;
239 __entry->entropy_count = entropy_count;
240 __entry->IP = IP;
243 TP_printk("%s pool: nbytes %d entropy_count %d caller %pS",
244 __entry->pool_name, __entry->nbytes, __entry->entropy_count,
245 (void *)__entry->IP)
249 DEFINE_EVENT(random__extract_entropy, extract_entropy,
250 TP_PROTO(const char *pool_name, int nbytes, int entropy_count,
251 unsigned long IP),
253 TP_ARGS(pool_name, nbytes, entropy_count, IP)
256 DEFINE_EVENT(random__extract_entropy, extract_entropy_user,
257 TP_PROTO(const char *pool_name, int nbytes, int entropy_count,
258 unsigned long IP),
260 TP_ARGS(pool_name, nbytes, entropy_count, IP)
263 TRACE_EVENT(random_read,
264 TP_PROTO(int got_bits, int need_bits, int pool_left, int input_left),
266 TP_ARGS(got_bits, need_bits, pool_left, input_left),
268 TP_STRUCT__entry(
269 __field( int, got_bits )
270 __field( int, need_bits )
271 __field( int, pool_left )
272 __field( int, input_left )
275 TP_fast_assign(
276 __entry->got_bits = got_bits;
277 __entry->need_bits = need_bits;
278 __entry->pool_left = pool_left;
279 __entry->input_left = input_left;
282 TP_printk("got_bits %d still_needed_bits %d "
283 "blocking_pool_entropy_left %d input_entropy_left %d",
284 __entry->got_bits, __entry->got_bits, __entry->pool_left,
285 __entry->input_left)
288 TRACE_EVENT(urandom_read,
289 TP_PROTO(int got_bits, int pool_left, int input_left),
291 TP_ARGS(got_bits, pool_left, input_left),
293 TP_STRUCT__entry(
294 __field( int, got_bits )
295 __field( int, pool_left )
296 __field( int, input_left )
299 TP_fast_assign(
300 __entry->got_bits = got_bits;
301 __entry->pool_left = pool_left;
302 __entry->input_left = input_left;
305 TP_printk("got_bits %d nonblocking_pool_entropy_left %d "
306 "input_entropy_left %d", __entry->got_bits,
307 __entry->pool_left, __entry->input_left)
310 #endif /* _TRACE_RANDOM_H */
312 /* This part must be outside protection */
313 #include <trace/define_trace.h>