hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/kernel/trace/trace_mmiotrace.c
....@@ -300,11 +300,10 @@
300300 struct trace_buffer *buffer = tr->array_buffer.buffer;
301301 struct ring_buffer_event *event;
302302 struct trace_mmiotrace_rw *entry;
303
- unsigned int trace_ctx;
303
+ int pc = preempt_count();
304304
305
- trace_ctx = tracing_gen_ctx_flags(0);
306305 event = trace_buffer_lock_reserve(buffer, TRACE_MMIO_RW,
307
- sizeof(*entry), trace_ctx);
306
+ sizeof(*entry), 0, pc);
308307 if (!event) {
309308 atomic_inc(&dropped_count);
310309 return;
....@@ -313,7 +312,7 @@
313312 entry->rw = *rw;
314313
315314 if (!call_filter_check_discard(call, entry, buffer, event))
316
- trace_buffer_unlock_commit(tr, buffer, event, trace_ctx);
315
+ trace_buffer_unlock_commit(tr, buffer, event, 0, pc);
317316 }
318317
319318 void mmio_trace_rw(struct mmiotrace_rw *rw)
....@@ -331,11 +330,10 @@
331330 struct trace_buffer *buffer = tr->array_buffer.buffer;
332331 struct ring_buffer_event *event;
333332 struct trace_mmiotrace_map *entry;
334
- unsigned int trace_ctx;
333
+ int pc = preempt_count();
335334
336
- trace_ctx = tracing_gen_ctx_flags(0);
337335 event = trace_buffer_lock_reserve(buffer, TRACE_MMIO_MAP,
338
- sizeof(*entry), trace_ctx);
336
+ sizeof(*entry), 0, pc);
339337 if (!event) {
340338 atomic_inc(&dropped_count);
341339 return;
....@@ -344,7 +342,7 @@
344342 entry->map = *map;
345343
346344 if (!call_filter_check_discard(call, entry, buffer, event))
347
- trace_buffer_unlock_commit(tr, buffer, event, trace_ctx);
345
+ trace_buffer_unlock_commit(tr, buffer, event, 0, pc);
348346 }
349347
350348 void mmio_trace_mapping(struct mmiotrace_map *map)