• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
4  */
5 #undef TRACE_SYSTEM
6 #define TRACE_SYSTEM rwmmio
7 
8 #if !defined(_TRACE_RWMMIO_H) || defined(TRACE_HEADER_MULTI_READ)
9 #define _TRACE_RWMMIO_H
10 
11 #include <linux/tracepoint.h>
12 
13 TRACE_EVENT(rwmmio_write,
14 
15 	TP_PROTO(unsigned long caller, u64 val, u8 width, volatile void __iomem *addr),
16 
17 	TP_ARGS(caller, val, width, addr),
18 
19 	TP_STRUCT__entry(
20 		__field(u64, caller)
21 		__field(u64, val)
22 		__field(u64, addr)
23 		__field(u8, width)
24 	),
25 
26 	TP_fast_assign(
27 		__entry->caller = caller;
28 		__entry->val = val;
29 		__entry->addr = (unsigned long)(void *)addr;
30 		__entry->width = width;
31 	),
32 
33 	TP_printk("%pS width=%d val=%#llx addr=%#llx",
34 		(void *)(unsigned long)__entry->caller, __entry->width,
35 		__entry->val, __entry->addr)
36 );
37 
38 TRACE_EVENT(rwmmio_post_write,
39 
40 	TP_PROTO(unsigned long caller, u64 val, u8 width, volatile void __iomem *addr),
41 
42 	TP_ARGS(caller, val, width, addr),
43 
44 	TP_STRUCT__entry(
45 		__field(u64, caller)
46 		__field(u64, val)
47 		__field(u64, addr)
48 		__field(u8, width)
49 	),
50 
51 	TP_fast_assign(
52 		__entry->caller = caller;
53 		__entry->val = val;
54 		__entry->addr = (unsigned long)(void *)addr;
55 		__entry->width = width;
56 	),
57 
58 	TP_printk("%pS width=%d val=%#llx addr=%#llx",
59 		(void *)(unsigned long)__entry->caller, __entry->width,
60 		__entry->val, __entry->addr)
61 );
62 
63 TRACE_EVENT(rwmmio_read,
64 
65 	TP_PROTO(unsigned long caller, u8 width, const volatile void __iomem *addr),
66 
67 	TP_ARGS(caller, width, addr),
68 
69 	TP_STRUCT__entry(
70 		__field(u64, caller)
71 		__field(u64, addr)
72 		__field(u8, width)
73 	),
74 
75 	TP_fast_assign(
76 		__entry->caller = caller;
77 		__entry->addr = (unsigned long)(void *)addr;
78 		__entry->width = width;
79 	),
80 
81 	TP_printk("%pS width=%d addr=%#llx",
82 		 (void *)(unsigned long)__entry->caller, __entry->width, __entry->addr)
83 );
84 
85 TRACE_EVENT(rwmmio_post_read,
86 
87 	TP_PROTO(unsigned long caller, u64 val, u8 width, const volatile void __iomem *addr),
88 
89 	TP_ARGS(caller, val, width, addr),
90 
91 	TP_STRUCT__entry(
92 		__field(u64, caller)
93 		__field(u64, val)
94 		__field(u64, addr)
95 		__field(u8, width)
96 	),
97 
98 	TP_fast_assign(
99 		__entry->caller = caller;
100 		__entry->val = val;
101 		__entry->addr = (unsigned long)(void *)addr;
102 		__entry->width = width;
103 	),
104 
105 	TP_printk("%pS width=%d val=%#llx addr=%#llx",
106 		 (void *)(unsigned long)__entry->caller, __entry->width,
107 		 __entry->val, __entry->addr)
108 );
109 
110 #endif /* _TRACE_RWMMIO_H */
111 
112 #include <trace/define_trace.h>
113