.. | .. |
---|
49 | 49 | process of being returned to user */ |
---|
50 | 50 | #define KBASE_TIMELINE_ATOMS_IN_FLIGHT(kctx, count) \ |
---|
51 | 51 | do { \ |
---|
52 | | - struct timespec ts; \ |
---|
53 | | - getrawmonotonic(&ts); \ |
---|
| 52 | + struct timespec64 ts; \ |
---|
| 53 | + ktime_get_raw_ts64(&ts); \ |
---|
54 | 54 | trace_mali_timeline_atoms_in_flight(ts.tv_sec, ts.tv_nsec, \ |
---|
55 | 55 | (int)kctx->timeline.owner_tgid, \ |
---|
56 | 56 | count); \ |
---|
.. | .. |
---|
59 | 59 | /* Trace atom_id being Ready to Run */ |
---|
60 | 60 | #define KBASE_TIMELINE_ATOM_READY(kctx, atom_id) \ |
---|
61 | 61 | do { \ |
---|
62 | | - struct timespec ts; \ |
---|
63 | | - getrawmonotonic(&ts); \ |
---|
| 62 | + struct timespec64 ts; \ |
---|
| 63 | + ktime_get_raw_ts64(&ts); \ |
---|
64 | 64 | trace_mali_timeline_atom(ts.tv_sec, ts.tv_nsec, \ |
---|
65 | 65 | CTX_FLOW_ATOM_READY, \ |
---|
66 | 66 | (int)kctx->timeline.owner_tgid, \ |
---|
.. | .. |
---|
76 | 76 | * utilization easily and accurately */ |
---|
77 | 77 | #define KBASE_TIMELINE_ATOMS_SUBMITTED(kctx, js, count) \ |
---|
78 | 78 | do { \ |
---|
79 | | - struct timespec ts; \ |
---|
80 | | - getrawmonotonic(&ts); \ |
---|
| 79 | + struct timespec64 ts; \ |
---|
| 80 | + ktime_get_raw_ts64(&ts); \ |
---|
81 | 81 | trace_mali_timeline_gpu_slot_active(ts.tv_sec, ts.tv_nsec, \ |
---|
82 | 82 | SW_SET_GPU_SLOT_ACTIVE, \ |
---|
83 | 83 | (int)kctx->timeline.owner_tgid, \ |
---|
.. | .. |
---|
88 | 88 | /* Trace atoms present in JS_NEXT */ |
---|
89 | 89 | #define KBASE_TIMELINE_JOB_START_NEXT(kctx, js, count) \ |
---|
90 | 90 | do { \ |
---|
91 | | - struct timespec ts; \ |
---|
92 | | - getrawmonotonic(&ts); \ |
---|
| 91 | + struct timespec64 ts; \ |
---|
| 92 | + ktime_get_raw_ts64(&ts); \ |
---|
93 | 93 | trace_mali_timeline_gpu_slot_action(ts.tv_sec, ts.tv_nsec, \ |
---|
94 | 94 | SW_SET_GPU_SLOT_NEXT, \ |
---|
95 | 95 | (int)kctx->timeline.owner_tgid, \ |
---|
.. | .. |
---|
99 | 99 | /* Trace atoms present in JS_HEAD */ |
---|
100 | 100 | #define KBASE_TIMELINE_JOB_START_HEAD(kctx, js, count) \ |
---|
101 | 101 | do { \ |
---|
102 | | - struct timespec ts; \ |
---|
103 | | - getrawmonotonic(&ts); \ |
---|
| 102 | + struct timespec64 ts; \ |
---|
| 103 | + ktime_get_raw_ts64(&ts); \ |
---|
104 | 104 | trace_mali_timeline_gpu_slot_action(ts.tv_sec, ts.tv_nsec, \ |
---|
105 | 105 | SW_SET_GPU_SLOT_HEAD, \ |
---|
106 | 106 | (int)kctx->timeline.owner_tgid, \ |
---|
.. | .. |
---|
110 | 110 | /* Trace that a soft stop/evict from next is being attempted on a slot */ |
---|
111 | 111 | #define KBASE_TIMELINE_TRY_SOFT_STOP(kctx, js, count) \ |
---|
112 | 112 | do { \ |
---|
113 | | - struct timespec ts; \ |
---|
114 | | - getrawmonotonic(&ts); \ |
---|
| 113 | + struct timespec64 ts; \ |
---|
| 114 | + ktime_get_raw_ts64(&ts); \ |
---|
115 | 115 | trace_mali_timeline_gpu_slot_action(ts.tv_sec, ts.tv_nsec, \ |
---|
116 | 116 | SW_SET_GPU_SLOT_STOPPING, \ |
---|
117 | 117 | (kctx) ? (int)kctx->timeline.owner_tgid : 0, \ |
---|
.. | .. |
---|
123 | 123 | /* Trace state of overall GPU power */ |
---|
124 | 124 | #define KBASE_TIMELINE_GPU_POWER(kbdev, active) \ |
---|
125 | 125 | do { \ |
---|
126 | | - struct timespec ts; \ |
---|
127 | | - getrawmonotonic(&ts); \ |
---|
| 126 | + struct timespec64 ts; \ |
---|
| 127 | + ktime_get_raw_ts64(&ts); \ |
---|
128 | 128 | trace_mali_timeline_gpu_power_active(ts.tv_sec, ts.tv_nsec, \ |
---|
129 | 129 | SW_SET_GPU_POWER_ACTIVE, active); \ |
---|
130 | 130 | } while (0) |
---|
.. | .. |
---|
132 | 132 | /* Trace state of tiler power */ |
---|
133 | 133 | #define KBASE_TIMELINE_POWER_TILER(kbdev, bitmap) \ |
---|
134 | 134 | do { \ |
---|
135 | | - struct timespec ts; \ |
---|
136 | | - getrawmonotonic(&ts); \ |
---|
| 135 | + struct timespec64 ts; \ |
---|
| 136 | + ktime_get_raw_ts64(&ts); \ |
---|
137 | 137 | trace_mali_timeline_gpu_power_active(ts.tv_sec, ts.tv_nsec, \ |
---|
138 | 138 | SW_SET_GPU_POWER_TILER_ACTIVE, \ |
---|
139 | 139 | hweight64(bitmap)); \ |
---|
.. | .. |
---|
142 | 142 | /* Trace number of shaders currently powered */ |
---|
143 | 143 | #define KBASE_TIMELINE_POWER_SHADER(kbdev, bitmap) \ |
---|
144 | 144 | do { \ |
---|
145 | | - struct timespec ts; \ |
---|
146 | | - getrawmonotonic(&ts); \ |
---|
| 145 | + struct timespec64 ts; \ |
---|
| 146 | + ktime_get_raw_ts64(&ts); \ |
---|
147 | 147 | trace_mali_timeline_gpu_power_active(ts.tv_sec, ts.tv_nsec, \ |
---|
148 | 148 | SW_SET_GPU_POWER_SHADER_ACTIVE, \ |
---|
149 | 149 | hweight64(bitmap)); \ |
---|
.. | .. |
---|
152 | 152 | /* Trace state of L2 power */ |
---|
153 | 153 | #define KBASE_TIMELINE_POWER_L2(kbdev, bitmap) \ |
---|
154 | 154 | do { \ |
---|
155 | | - struct timespec ts; \ |
---|
156 | | - getrawmonotonic(&ts); \ |
---|
| 155 | + struct timespec64 ts; \ |
---|
| 156 | + ktime_get_raw_ts64(&ts); \ |
---|
157 | 157 | trace_mali_timeline_gpu_power_active(ts.tv_sec, ts.tv_nsec, \ |
---|
158 | 158 | SW_SET_GPU_POWER_L2_ACTIVE, \ |
---|
159 | 159 | hweight64(bitmap)); \ |
---|
.. | .. |
---|
162 | 162 | /* Trace state of L2 cache*/ |
---|
163 | 163 | #define KBASE_TIMELINE_POWERING_L2(kbdev) \ |
---|
164 | 164 | do { \ |
---|
165 | | - struct timespec ts; \ |
---|
166 | | - getrawmonotonic(&ts); \ |
---|
| 165 | + struct timespec64 ts; \ |
---|
| 166 | + ktime_get_raw_ts64(&ts); \ |
---|
167 | 167 | trace_mali_timeline_l2_power_active(ts.tv_sec, ts.tv_nsec, \ |
---|
168 | 168 | SW_FLOW_GPU_POWER_L2_POWERING, \ |
---|
169 | 169 | 1); \ |
---|
.. | .. |
---|
171 | 171 | |
---|
172 | 172 | #define KBASE_TIMELINE_POWERED_L2(kbdev) \ |
---|
173 | 173 | do { \ |
---|
174 | | - struct timespec ts; \ |
---|
175 | | - getrawmonotonic(&ts); \ |
---|
| 174 | + struct timespec64 ts; \ |
---|
| 175 | + ktime_get_raw_ts64(&ts); \ |
---|
176 | 176 | trace_mali_timeline_l2_power_active(ts.tv_sec, ts.tv_nsec, \ |
---|
177 | 177 | SW_FLOW_GPU_POWER_L2_ACTIVE, \ |
---|
178 | 178 | 1); \ |
---|
.. | .. |
---|
181 | 181 | /* Trace kbase_pm_send_event message send */ |
---|
182 | 182 | #define KBASE_TIMELINE_PM_SEND_EVENT(kbdev, event_type, pm_event_id) \ |
---|
183 | 183 | do { \ |
---|
184 | | - struct timespec ts; \ |
---|
185 | | - getrawmonotonic(&ts); \ |
---|
| 184 | + struct timespec64 ts; \ |
---|
| 185 | + ktime_get_raw_ts64(&ts); \ |
---|
186 | 186 | trace_mali_timeline_pm_event(ts.tv_sec, ts.tv_nsec, \ |
---|
187 | 187 | SW_FLOW_PM_SEND_EVENT, \ |
---|
188 | 188 | event_type, pm_event_id); \ |
---|
.. | .. |
---|
191 | 191 | /* Trace kbase_pm_worker message receive */ |
---|
192 | 192 | #define KBASE_TIMELINE_PM_HANDLE_EVENT(kbdev, event_type, pm_event_id) \ |
---|
193 | 193 | do { \ |
---|
194 | | - struct timespec ts; \ |
---|
195 | | - getrawmonotonic(&ts); \ |
---|
| 194 | + struct timespec64 ts; \ |
---|
| 195 | + ktime_get_raw_ts64(&ts); \ |
---|
196 | 196 | trace_mali_timeline_pm_event(ts.tv_sec, ts.tv_nsec, \ |
---|
197 | 197 | SW_FLOW_PM_HANDLE_EVENT, \ |
---|
198 | 198 | event_type, pm_event_id); \ |
---|
.. | .. |
---|
202 | 202 | /* Trace atom_id starting in JS_HEAD */ |
---|
203 | 203 | #define KBASE_TIMELINE_JOB_START(kctx, js, _consumerof_atom_number) \ |
---|
204 | 204 | do { \ |
---|
205 | | - struct timespec ts; \ |
---|
206 | | - getrawmonotonic(&ts); \ |
---|
| 205 | + struct timespec64 ts; \ |
---|
| 206 | + ktime_get_raw_ts64(&ts); \ |
---|
207 | 207 | trace_mali_timeline_slot_atom(ts.tv_sec, ts.tv_nsec, \ |
---|
208 | 208 | HW_START_GPU_JOB_CHAIN_SW_APPROX, \ |
---|
209 | 209 | (int)kctx->timeline.owner_tgid, \ |
---|
.. | .. |
---|
213 | 213 | /* Trace atom_id stopping on JS_HEAD */ |
---|
214 | 214 | #define KBASE_TIMELINE_JOB_STOP(kctx, js, _producerof_atom_number_completed) \ |
---|
215 | 215 | do { \ |
---|
216 | | - struct timespec ts; \ |
---|
217 | | - getrawmonotonic(&ts); \ |
---|
| 216 | + struct timespec64 ts; \ |
---|
| 217 | + ktime_get_raw_ts64(&ts); \ |
---|
218 | 218 | trace_mali_timeline_slot_atom(ts.tv_sec, ts.tv_nsec, \ |
---|
219 | 219 | HW_STOP_GPU_JOB_CHAIN_SW_APPROX, \ |
---|
220 | 220 | (int)kctx->timeline.owner_tgid, \ |
---|
.. | .. |
---|
225 | 225 | * certin caller */ |
---|
226 | 226 | #define KBASE_TIMELINE_PM_CHECKTRANS(kbdev, trace_code) \ |
---|
227 | 227 | do { \ |
---|
228 | | - struct timespec ts; \ |
---|
229 | | - getrawmonotonic(&ts); \ |
---|
| 228 | + struct timespec64 ts; \ |
---|
| 229 | + ktime_get_raw_ts64(&ts); \ |
---|
230 | 230 | trace_mali_timeline_pm_checktrans(ts.tv_sec, ts.tv_nsec, \ |
---|
231 | 231 | trace_code, 1); \ |
---|
232 | 232 | } while (0) |
---|
.. | .. |
---|
234 | 234 | /* Trace number of contexts active */ |
---|
235 | 235 | #define KBASE_TIMELINE_CONTEXT_ACTIVE(kbdev, count) \ |
---|
236 | 236 | do { \ |
---|
237 | | - struct timespec ts; \ |
---|
238 | | - getrawmonotonic(&ts); \ |
---|
| 237 | + struct timespec64 ts; \ |
---|
| 238 | + ktime_get_raw_ts64(&ts); \ |
---|
239 | 239 | trace_mali_timeline_context_active(ts.tv_sec, ts.tv_nsec, \ |
---|
240 | 240 | count); \ |
---|
241 | 241 | } while (0) |
---|