Skip to contentSkip to conversation

Tracing cleanup and add mmio tracing

PATCH Superseded Radhakrishna Sripada 3 participants 11 messages Jun 6, 2024

Subsystems (2)

v4 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v4 cover Tracing cleanup and add mmio tracing

xe_trace.h is getting bloated. Group related events to their own files. All bo, vm and vma related events have been moved to xe_trace_bo.h. GuC related trace events have been moved to xe_trace_guc.h. Patches 1 and 2 splits the trace events into seperate files.

In multi gpu environments, it is important to know the device from which the event was triggered. Print the device id information along with the trace information being printed. Patches 3, 4 and 5 make changes to print the device id's if not already captured.

Mmio reg read writes are important tracing information that needs to be captured and will be helpful in display debug. Patch 6 adds the reg read/write tracing support.

Earlier versions of patch 6 can be found here:
v1: https://patchwork.freedesktop.org/series/119312/
v2: https://patchwork.freedesktop.org/series/132626/

Radhakrishna Sripada (6):
drm/xe/trace: Extract bo, vm, vma traces drm/xe/trace: Extract guc related traces drm/xe/trace: Print device_id in xe_trace_bo events drm/xe/trace: Print device_id in xe_trace_guc events drm/xe/trace: Print device_id in xe_trace events drm/xe: Add reg read/write trace

 drivers/gpu/drm/xe/Makefile                 |   2 +
 drivers/gpu/drm/xe/xe_bo.c                  |   2 +-
 drivers/gpu/drm/xe/xe_gt_pagefault.c        |   2 +-
 drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c |  27 +-
 drivers/gpu/drm/xe/xe_guc_ct.c              |  13 +-
 drivers/gpu/drm/xe/xe_migrate.c             |   2 +-
 drivers/gpu/drm/xe/xe_mmio.c                |  24 +-
 drivers/gpu/drm/xe/xe_pt.c                  |   8 +-
 drivers/gpu/drm/xe/xe_trace.h               | 381 ++++----------------
 drivers/gpu/drm/xe/xe_trace_bo.c            |   9 +
 drivers/gpu/drm/xe/xe_trace_bo.h            | 248 +++++++++++++
 drivers/gpu/drm/xe/xe_trace_guc.c           |   9 +
 drivers/gpu/drm/xe/xe_trace_guc.h           | 111 ++++++
 drivers/gpu/drm/xe/xe_vm.c                  |   2 +-
 14 files changed, 495 insertions(+), 344 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/xe_trace_bo.c
 create mode 100644 drivers/gpu/drm/xe/xe_trace_bo.h
 create mode 100644 drivers/gpu/drm/xe/xe_trace_guc.c
 create mode 100644 drivers/gpu/drm/xe/xe_trace_guc.h
Signature · 1 line
2.34.1
#1 lore raw

PATCH v4 1/6 drm/xe/trace: Extract bo, vm, vma traces

xe_trace.h is starting to get over crowded. Move the traces related to bo, vm, vma's to its own file.

v2: Update year in License(Gustavo)

---
 drivers/gpu/drm/xe/Makefile          |   1 +
 drivers/gpu/drm/xe/xe_bo.c           |   2 +-
 drivers/gpu/drm/xe/xe_gt_pagefault.c |   2 +-
 drivers/gpu/drm/xe/xe_migrate.c      |   2 +-
 drivers/gpu/drm/xe/xe_trace.h        | 212 ------------------------
 drivers/gpu/drm/xe/xe_trace_bo.c     |   9 +
 drivers/gpu/drm/xe/xe_trace_bo.h     | 236 +++++++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_vm.c           |   2 +-
 8 files changed, 250 insertions(+), 216 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/xe_trace_bo.c
 create mode 100644 drivers/gpu/drm/xe/xe_trace_bo.h
drivers/gpu/drm/xe/Makefile +1 -0
index 0c3e3adabb27..7c5e77fbfc1e 100644
@@ -112,6 +112,7 @@ xe-y += xe_bb.o \
 	xe_tile.o \
 	xe_tile_sysfs.o \
 	xe_trace.o \
+	xe_trace_bo.o \
 	xe_ttm_sys_mgr.o \
 	xe_ttm_stolen_mgr.o \
 	xe_ttm_vram_mgr.o \
drivers/gpu/drm/xe/xe_bo.c +1 -1
index 2bae01ce4e5b..74294f1b05bc 100644
@@ -25,7 +25,7 @@
 #include "xe_pm.h"
 #include "xe_preempt_fence.h"
 #include "xe_res_cursor.h"
-#include "xe_trace.h"
+#include "xe_trace_bo.h"
 #include "xe_ttm_stolen_mgr.h"
 #include "xe_vm.h"
 
drivers/gpu/drm/xe/xe_gt_pagefault.c +1 -1
index 040dd142c49c..dead920de5f1 100644
@@ -19,7 +19,7 @@
 #include "xe_guc.h"
 #include "xe_guc_ct.h"
 #include "xe_migrate.h"
-#include "xe_trace.h"
+#include "xe_trace_bo.h"
 #include "xe_vm.h"
 
 struct pagefault {
drivers/gpu/drm/xe/xe_migrate.c +1 -1
index cccffaf3db06..da3305834448 100644
@@ -32,7 +32,7 @@
 #include "xe_res_cursor.h"
 #include "xe_sched_job.h"
 #include "xe_sync.h"
-#include "xe_trace.h"
+#include "xe_trace_bo.h"
 #include "xe_vm.h"
 
 /**
drivers/gpu/drm/xe/xe_trace.h +0 -212

230 lines not on this page · raw message

drivers/gpu/drm/xe/xe_trace_bo.c new file +9 -0
new file mode 100644
index 000000000000..6d5e66ce4c50
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright © 2024 Intel Corporation
+ */
+
+#ifndef __CHECKER__
+#define CREATE_TRACE_POINTS
+#include "xe_trace_bo.h"
+#endif
drivers/gpu/drm/xe/xe_trace_bo.h new file +236 -0

236 lines not on this page · raw message

drivers/gpu/drm/xe/xe_vm.c +1 -1
index 26b409e1b0f0..c2100d26b4e3 100644
@@ -36,7 +36,7 @@
 #include "xe_pt.h"
 #include "xe_res_cursor.h"
 #include "xe_sync.h"
-#include "xe_trace.h"
+#include "xe_trace_bo.h"
 #include "xe_wa.h"
 #include "xe_hmm.h"
 
Signature · 1 line
2.34.1
#2 lore raw

PATCH v4 2/6 drm/xe/trace: Extract guc related traces

In reply to Radhakrishna Sripada

xe_trace.h is starting to get over crowded. Move the traces related to guc to its own file.

v2: Update year in License(Gustavo)

---
 drivers/gpu/drm/xe/Makefile       |   1 +
 drivers/gpu/drm/xe/xe_guc_ct.c    |   2 +-
 drivers/gpu/drm/xe/xe_trace.h     |  80 -----------------------
 drivers/gpu/drm/xe/xe_trace_guc.c |   9 +++
 drivers/gpu/drm/xe/xe_trace_guc.h | 103 ++++++++++++++++++++++++++++++
 5 files changed, 114 insertions(+), 81 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/xe_trace_guc.c
 create mode 100644 drivers/gpu/drm/xe/xe_trace_guc.h
drivers/gpu/drm/xe/Makefile +1 -0
index 7c5e77fbfc1e..eb1943f81cf8 100644
@@ -113,6 +113,7 @@ xe-y += xe_bb.o \
 	xe_tile_sysfs.o \
 	xe_trace.o \
 	xe_trace_bo.o \
+	xe_trace_guc.o \
 	xe_ttm_sys_mgr.o \
 	xe_ttm_stolen_mgr.o \
 	xe_ttm_vram_mgr.o \
drivers/gpu/drm/xe/xe_guc_ct.c +1 -1
index c1f258348f5c..78f79df638d5 100644
@@ -29,7 +29,7 @@
 #include "xe_guc_submit.h"
 #include "xe_map.h"
 #include "xe_pm.h"
-#include "xe_trace.h"
+#include "xe_trace_guc.h"
 
 /* Used when a CT send wants to block and / or receive data */
 struct g2h_fence {
drivers/gpu/drm/xe/xe_trace.h +0 -80

86 lines not on this page · raw message

drivers/gpu/drm/xe/xe_trace_guc.c new file +9 -0
new file mode 100644
index 000000000000..fcdf6888ff2f
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright © 2024 Intel Corporation
+ */
+
+#ifndef __CHECKER__
+#define CREATE_TRACE_POINTS
+#include "xe_trace_guc.h"
+#endif
drivers/gpu/drm/xe/xe_trace_guc.h new file +103 -0

103 lines not on this page · raw message

Signature · 1 line
2.34.1
#3 lore raw

PATCH v4 3/6 drm/xe/trace: Print device_id in xe_trace_bo events

In reply to Radhakrishna Sripada

In multi-gpu environments it is important to know the device bo/vm belongs to. The tracing information includes the device_id to indicate the device the event is associated with.

v2: Use variable sized variant to display dev name(Gustavo)

---
 drivers/gpu/drm/xe/xe_trace_bo.h | 30 +++++++++++++++++++++---------
 1 file changed, 21 insertions(+), 9 deletions(-)
drivers/gpu/drm/xe/xe_trace_bo.h +21 -9
index c8bd746d9d41..b427baf2341a 100644
@@ -9,6 +9,7 @@
 #if !defined(_XE_TRACE_BO_H_) || defined(TRACE_HEADER_MULTI_READ)
 #define _XE_TRACE_BO_H_
 
+#include <linux/string_helpers.h>
 #include <linux/tracepoint.h>
 #include <linux/types.h>
 
@@ -16,24 +17,31 @@
 #include "xe_bo_types.h"
 #include "xe_vm.h"
 
+#define __dev_name_bo(bo)	dev_name(xe_bo_device((bo))->drm.dev)
+#define __dev_name_vm(vm)	dev_name((vm)->xe->drm.dev)
+#define __dev_name_vma(vma)	__dev_name_vm(xe_vma_vm(vma))
+
 DECLARE_EVENT_CLASS(xe_bo,
 		    TP_PROTO(struct xe_bo *bo),
 		    TP_ARGS(bo),
 
 		    TP_STRUCT__entry(
+			     __string(dev, __dev_name_bo(bo))
 			     __field(size_t, size)
 			     __field(u32, flags)
 			     __field(struct xe_vm *, vm)
 			     ),
 
 		    TP_fast_assign(
+			   __assign_str(dev, __dev_name_bo(bo));
 			   __entry->size = bo->size;
 			   __entry->flags = bo->flags;
 			   __entry->vm = bo->vm;
 			   ),
 
-		    TP_printk("size=%zu, flags=0x%02x, vm=%p",
-			      __entry->size, __entry->flags, __entry->vm)
+		    TP_printk("dev=%s, size=%zu, flags=0x%02x, vm=%p",
+			      __get_str(dev), __entry->size,
+			      __entry->flags, __entry->vm)
 );
 
 DEFINE_EVENT(xe_bo, xe_bo_cpu_fault,
@@ -50,7 +58,7 @@ TRACE_EVENT(xe_bo_move,
 		     __field(size_t, size)
 		     __field(u32, new_placement)
 		     __field(u32, old_placement)
-		     __array(char, device_id, 12)
+		     __string(device_id, __dev_name_bo(bo))
 		     __field(bool, move_lacks_source)
 			),
 
@@ -59,13 +67,13 @@ TRACE_EVENT(xe_bo_move,
 		   __entry->size = bo->size;
 		   __entry->new_placement = new_placement;
 		   __entry->old_placement = old_placement;
-		   strscpy(__entry->device_id, dev_name(xe_bo_device(__entry->bo)->drm.dev), 12);
+		   __assign_str(device_id, __dev_name_bo(bo));
 		   __entry->move_lacks_source = move_lacks_source;
 		   ),
 	    TP_printk("move_lacks_source:%s, migrate object %p [size %zu] from %s to %s device_id:%s",
 		      __entry->move_lacks_source ? "yes" : "no", __entry->bo, __entry->size,
 		      xe_mem_type_to_name[__entry->old_placement],
-		      xe_mem_type_to_name[__entry->new_placement], __entry->device_id)
+		      xe_mem_type_to_name[__entry->new_placement], __get_str(device_id))
 );
 
 DECLARE_EVENT_CLASS(xe_vma,
@@ -73,6 +81,7 @@ DECLARE_EVENT_CLASS(xe_vma,
 		    TP_ARGS(vma),
 
 		    TP_STRUCT__entry(
+			     __string(dev, __dev_name_vma(vma))
 			     __field(struct xe_vma *, vma)
 			     __field(u32, asid)
 			     __field(u64, start)
@@ -81,6 +90,7 @@ DECLARE_EVENT_CLASS(xe_vma,
 			     ),
 
 		    TP_fast_assign(
+			   __assign_str(dev, __dev_name_vma(vma));
 			   __entry->vma = vma;
 			   __entry->asid = xe_vma_vm(vma)->usm.asid;
 			   __entry->start = xe_vma_start(vma);
@@ -88,8 +98,8 @@ DECLARE_EVENT_CLASS(xe_vma,
 			   __entry->ptr = xe_vma_userptr(vma);
 			   ),
 
-		    TP_printk("vma=%p, asid=0x%05x, start=0x%012llx, end=0x%012llx, userptr=0x%012llx,",
-			      __entry->vma, __entry->asid, __entry->start,
+		    TP_printk("dev=%s, vma=%p, asid=0x%05x, start=0x%012llx, end=0x%012llx, userptr=0x%012llx,",
+			      __get_str(dev), __entry->vma, __entry->asid, __entry->start,
 			      __entry->end, __entry->ptr)
 )
 
@@ -173,17 +183,19 @@ DECLARE_EVENT_CLASS(xe_vm,
 		    TP_ARGS(vm),
 
 		    TP_STRUCT__entry(
+			     __string(dev, __dev_name_vm(vm))
 			     __field(struct xe_vm *, vm)
 			     __field(u32, asid)
 			     ),
 
 		    TP_fast_assign(
+			   __assign_str(dev, __dev_name_vm(vm));
 			   __entry->vm = vm;
 			   __entry->asid = vm->usm.asid;
 			   ),
 
-		    TP_printk("vm=%p, asid=0x%05x",  __entry->vm,
-			      __entry->asid)
+		    TP_printk("dev=%s, vm=%p, asid=0x%05x", __get_str(dev),
+			      __entry->vm,  __entry->asid)
 );
 
 DEFINE_EVENT(xe_vm, xe_vm_kill,
Signature · 1 line
2.34.1
#4 lore raw

PATCH v4 4/6 drm/xe/trace: Print device_id in xe_trace_guc events

In reply to Radhakrishna Sripada

In multi-gpu environments it is important to know the device guc txn belongs to. The tracing information includes the device_id to indicate the device the event is associated with.

v2: Use variable sized variant to display dev name(Gustavo)

---
 drivers/gpu/drm/xe/xe_guc_ct.c    | 11 +++----
 drivers/gpu/drm/xe/xe_trace_guc.h | 48 ++++++++++++++++++-------------
 2 files changed, 34 insertions(+), 25 deletions(-)
drivers/gpu/drm/xe/xe_guc_ct.c +6 -5
index 78f79df638d5..ff3fd10cd417 100644
@@ -528,7 +528,7 @@ static int h2g_write(struct xe_guc_ct *ct, const u32 *action, u32 len,
 	/* Update descriptor */
 	desc_write(xe, h2g, tail, h2g->info.tail);
 
-	trace_xe_guc_ctb_h2g(gt->info.id, *(action - 1), full_len,
+	trace_xe_guc_ctb_h2g(xe, gt->info.id, *(action - 1), full_len,
 			     desc_read(xe, h2g, head), h2g->info.tail);
 
 	return 0;
@@ -641,6 +641,7 @@ static int guc_ct_send_locked(struct xe_guc_ct *ct, const u32 *action, u32 len,
 			      u32 g2h_len, u32 num_g2h,
 			      struct g2h_fence *g2h_fence)
 {
+	struct xe_device *xe = ct_to_xe(ct);
 	struct xe_gt *gt = ct_to_gt(ct);
 	struct drm_printer p = xe_gt_info_printer(gt);
 	unsigned int sleep_period_ms = 1;
@@ -668,7 +669,7 @@ static int guc_ct_send_locked(struct xe_guc_ct *ct, const u32 *action, u32 len,
 		if (sleep_period_ms == 1024)
 			goto broken;
 
-		trace_xe_guc_ct_h2g_flow_control(h2g->info.head, h2g->info.tail,
+		trace_xe_guc_ct_h2g_flow_control(xe, h2g->info.head, h2g->info.tail,
 						 h2g->info.size,
 						 h2g->info.space,
 						 len + GUC_CTB_HDR_LEN);
@@ -680,7 +681,7 @@ static int guc_ct_send_locked(struct xe_guc_ct *ct, const u32 *action, u32 len,
 		struct xe_device *xe = ct_to_xe(ct);
 		struct guc_ctb *g2h = &ct->ctbs.g2h;
 
-		trace_xe_guc_ct_g2h_flow_control(g2h->info.head,
+		trace_xe_guc_ct_g2h_flow_control(xe, g2h->info.head,
 						 desc_read(xe, g2h, tail),
 						 g2h->info.size,
 						 g2h->info.space,
@@ -1170,8 +1171,8 @@ static int g2h_read(struct xe_guc_ct *ct, u32 *msg, bool fast_path)
 	g2h->info.head = (head + avail) % g2h->info.size;
 	desc_write(xe, g2h, head, g2h->info.head);
 
-	trace_xe_guc_ctb_g2h(ct_to_gt(ct)->info.id, action, len,
-			     g2h->info.head, tail);
+	trace_xe_guc_ctb_g2h(xe, ct_to_gt(ct)->info.id,
+			     action, len, g2h->info.head, tail);
 
 	return len;
 }
drivers/gpu/drm/xe/xe_trace_guc.h +28 -20

108 lines not on this page · raw message

Signature · 1 line
2.34.1
#5 lore raw

PATCH v4 5/6 drm/xe/trace: Print device_id in xe_trace events

In reply to Radhakrishna Sripada

In multi-gpu environments it is important to know the device gt events belongs to. The tracing information includes the device_id to indicate the device the event is associated with.

v2: Use variable sized variant to display dev name(Gustavo)

---
 drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c | 27 +++++----
 drivers/gpu/drm/xe/xe_pt.c                  |  8 ++-
 drivers/gpu/drm/xe/xe_trace.h               | 65 +++++++++++++--------
 3 files changed, 60 insertions(+), 40 deletions(-)
drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c +15 -12
index 105797776a6c..23d397a246a8 100644
@@ -22,6 +22,7 @@ static void xe_gt_tlb_fence_timeout(struct work_struct *work)
 {
 	struct xe_gt *gt = container_of(work, struct xe_gt,
 					tlb_invalidation.fence_tdr.work);
+	struct xe_device *xe = gt_to_xe(gt);
 	struct xe_gt_tlb_invalidation_fence *fence, *next;
 
 	spin_lock_irq(&gt->tlb_invalidation.pending_lock);
@@ -33,7 +34,7 @@ static void xe_gt_tlb_fence_timeout(struct work_struct *work)
 		if (msecs_to_jiffies(since_inval_ms) < TLB_TIMEOUT)
 			break;
 
-		trace_xe_gt_tlb_invalidation_fence_timeout(fence);
+		trace_xe_gt_tlb_invalidation_fence_timeout(xe, fence);
 		xe_gt_err(gt, "TLB invalidation fence timeout, seqno=%d recv=%d",
 			  fence->seqno, gt->tlb_invalidation.seqno_recv);
 
@@ -71,18 +72,18 @@ int xe_gt_tlb_invalidation_init(struct xe_gt *gt)
 }
 
 static void
-__invalidation_fence_signal(struct xe_gt_tlb_invalidation_fence *fence)
+__invalidation_fence_signal(struct xe_device *xe, struct xe_gt_tlb_invalidation_fence *fence)
 {
-	trace_xe_gt_tlb_invalidation_fence_signal(fence);
+	trace_xe_gt_tlb_invalidation_fence_signal(xe, fence);
 	dma_fence_signal(&fence->base);
 	dma_fence_put(&fence->base);
 }
 
 static void
-invalidation_fence_signal(struct xe_gt_tlb_invalidation_fence *fence)
+invalidation_fence_signal(struct xe_device *xe, struct xe_gt_tlb_invalidation_fence *fence)
 {
 	list_del(&fence->link);
-	__invalidation_fence_signal(fence);
+	__invalidation_fence_signal(xe, fence);
 }
 
 /**
@@ -121,7 +122,7 @@ void xe_gt_tlb_invalidation_reset(struct xe_gt *gt)
 
 	list_for_each_entry_safe(fence, next,
 				 &gt->tlb_invalidation.pending_fences, link)
-		invalidation_fence_signal(fence);
+		invalidation_fence_signal(gt_to_xe(gt), fence);
 	spin_unlock_irq(&gt->tlb_invalidation.pending_lock);
 	mutex_unlock(&gt->uc.guc.ct.lock);
 }
@@ -144,6 +145,7 @@ static int send_tlb_invalidation(struct xe_guc *guc,
 				 u32 *action, int len)
 {
 	struct xe_gt *gt = guc_to_gt(guc);
+	struct xe_device *xe = gt_to_xe(gt);
 	int seqno;
 	int ret;
 
@@ -157,7 +159,7 @@ static int send_tlb_invalidation(struct xe_guc *guc,
 	seqno = gt->tlb_invalidation.seqno;
 	if (fence) {
 		fence->seqno = seqno;
-		trace_xe_gt_tlb_invalidation_fence_send(fence);
+		trace_xe_gt_tlb_invalidation_fence_send(xe, fence);
 	}
 	action[1] = seqno;
 	ret = xe_guc_ct_send_locked(&guc->ct, action, len,
@@ -171,7 +173,7 @@ static int send_tlb_invalidation(struct xe_guc *guc,
 		 * we can just go ahead and signal the fence here.
 		 */
 		if (tlb_invalidation_seqno_past(gt, seqno)) {
-			__invalidation_fence_signal(fence);
+			__invalidation_fence_signal(xe, fence);
 		} else {
 			fence->invalidation_time = ktime_get();
 			list_add_tail(&fence->link,
@@ -184,7 +186,7 @@ static int send_tlb_invalidation(struct xe_guc *guc,
 		}
 		spin_unlock_irq(&gt->tlb_invalidation.pending_lock);
 	} else if (ret < 0 && fence) {
-		__invalidation_fence_signal(fence);
+		__invalidation_fence_signal(xe, fence);
 	}
 	if (!ret) {
 		gt->tlb_invalidation.seqno = (gt->tlb_invalidation.seqno + 1) %
@@ -294,7 +296,7 @@ int xe_gt_tlb_invalidation_range(struct xe_gt *gt,
 	/* Execlists not supported */
 	if (gt_to_xe(gt)->info.force_execlist) {
 		if (fence)
-			__invalidation_fence_signal(fence);
+			__invalidation_fence_signal(xe, fence);
 
 		return 0;
 	}
@@ -432,6 +434,7 @@ int xe_gt_tlb_invalidation_wait(struct xe_gt *gt, int seqno)
 int xe_guc_tlb_invalidation_done_handler(struct xe_guc *guc, u32 *msg, u32 len)
 {
 	struct xe_gt *gt = guc_to_gt(guc);
+	struct xe_device *xe = gt_to_xe(gt);
 	struct xe_gt_tlb_invalidation_fence *fence, *next;
 	unsigned long flags;
 
@@ -468,12 +471,12 @@ int xe_guc_tlb_invalidation_done_handler(struct xe_guc *guc, u32 *msg, u32 len)
 
 	list_for_each_entry_safe(fence, next,
 				 &gt->tlb_invalidation.pending_fences, link) {
-		trace_xe_gt_tlb_invalidation_fence_recv(fence);
+		trace_xe_gt_tlb_invalidation_fence_recv(xe, fence);
 
 		if (!tlb_invalidation_seqno_past(gt, fence->seqno))
 			break;
 
-		invalidation_fence_signal(fence);
+		invalidation_fence_signal(xe, fence);
 	}
 
 	if (!list_empty(&gt->tlb_invalidation.pending_fences))
drivers/gpu/drm/xe/xe_pt.c +5 -3
index cd60c009b679..ade9e7a3a0ad 100644
@@ -1137,8 +1137,9 @@ static void invalidation_fence_cb(struct dma_fence *fence,
 {
 	struct invalidation_fence *ifence =
 		container_of(cb, struct invalidation_fence, cb);
+	struct xe_device *xe = gt_to_xe(ifence->gt);
 
-	trace_xe_gt_tlb_invalidation_fence_cb(&ifence->base);
+	trace_xe_gt_tlb_invalidation_fence_cb(xe, &ifence->base);
 	if (!ifence->fence->error) {
 		queue_work(system_wq, &ifence->work);
 	} else {
@@ -1153,8 +1154,9 @@ static void invalidation_fence_work_func(struct work_struct *w)
 {
 	struct invalidation_fence *ifence =
 		container_of(w, struct invalidation_fence, work);
+	struct xe_device *xe = gt_to_xe(ifence->gt);
 
-	trace_xe_gt_tlb_invalidation_fence_work_func(&ifence->base);
+	trace_xe_gt_tlb_invalidation_fence_work_func(xe, &ifence->base);
 	xe_gt_tlb_invalidation_range(ifence->gt, &ifence->base, ifence->start,
 				     ifence->end, ifence->asid);
 }
@@ -1166,7 +1168,7 @@ static int invalidation_fence_init(struct xe_gt *gt,
 {
 	int ret;
 
-	trace_xe_gt_tlb_invalidation_fence_create(&ifence->base);
+	trace_xe_gt_tlb_invalidation_fence_create(gt_to_xe(gt), &ifence->base);
 
 	spin_lock_irq(&gt->tlb_invalidation.lock);
 	dma_fence_init(&ifence->base.base, &invalidation_fence_ops,
drivers/gpu/drm/xe/xe_trace.h +40 -25

180 lines not on this page · raw message

Signature · 1 line
2.34.1
#6 lore raw

PATCH v4 6/6 drm/xe: Add reg read/write trace

In reply to Radhakrishna Sripada

This will help debug register read/writes and provides a way to trace all the mmio transactions.

v2: Fix kunit error
v3: Print devid to help in multi-gpu setup
v3: rebase and use variable sized variant to display
dev name(Gustavo)

---
 drivers/gpu/drm/xe/xe_mmio.c  | 24 ++++++++++++++++++++----
 drivers/gpu/drm/xe/xe_trace.h | 28 ++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 4 deletions(-)
drivers/gpu/drm/xe/xe_mmio.c +20 -4
index 7962eeb9adb7..feba35ad6a3e 100644
@@ -21,6 +21,8 @@
 #include "xe_gt_sriov_vf.h"
 #include "xe_macros.h"
 #include "xe_sriov.h"
+#include "xe_tile.h"
+#include "xe_trace.h"
 
 static void tiles_fini(void *arg)
 {
@@ -124,16 +126,24 @@ u8 xe_mmio_read8(struct xe_gt *gt, struct xe_reg reg)
 {
 	struct xe_tile *tile = gt_to_tile(gt);
 	u32 addr = xe_mmio_adjusted_addr(gt, reg.addr);
+	u8 val;
 
-	return readb((reg.ext ? tile->mmio_ext.regs : tile->mmio.regs) + addr);
+	val = readb((reg.ext ? tile->mmio_ext.regs : tile->mmio.regs) + addr);
+	trace_xe_reg_rw(gt, false, addr, val, sizeof(val));
+
+	return val;
 }
 
 u16 xe_mmio_read16(struct xe_gt *gt, struct xe_reg reg)
 {
 	struct xe_tile *tile = gt_to_tile(gt);
 	u32 addr = xe_mmio_adjusted_addr(gt, reg.addr);
+	u16 val;
+
+	val = readw((reg.ext ? tile->mmio_ext.regs : tile->mmio.regs) + addr);
+	trace_xe_reg_rw(gt, false, addr, val, sizeof(val));
 
-	return readw((reg.ext ? tile->mmio_ext.regs : tile->mmio.regs) + addr);
+	return val;
 }
 
 void xe_mmio_write32(struct xe_gt *gt, struct xe_reg reg, u32 val)
@@ -141,6 +151,7 @@ void xe_mmio_write32(struct xe_gt *gt, struct xe_reg reg, u32 val)
 	struct xe_tile *tile = gt_to_tile(gt);
 	u32 addr = xe_mmio_adjusted_addr(gt, reg.addr);
 
+	trace_xe_reg_rw(gt, true, addr, val, sizeof(val));
 	writel(val, (reg.ext ? tile->mmio_ext.regs : tile->mmio.regs) + addr);
 }
 
@@ -148,11 +159,16 @@ u32 xe_mmio_read32(struct xe_gt *gt, struct xe_reg reg)
 {
 	struct xe_tile *tile = gt_to_tile(gt);
 	u32 addr = xe_mmio_adjusted_addr(gt, reg.addr);
+	u32 val;
 
 	if (!reg.vf && IS_SRIOV_VF(gt_to_xe(gt)))
-		return xe_gt_sriov_vf_read32(gt, reg);
+		val = xe_gt_sriov_vf_read32(gt, reg);
+	else
+		val = readl((reg.ext ? tile->mmio_ext.regs : tile->mmio.regs) + addr);
+
+	trace_xe_reg_rw(gt, false, addr, val, sizeof(val));
 
-	return readl((reg.ext ? tile->mmio_ext.regs : tile->mmio.regs) + addr);
+	return val;
 }
 
 u32 xe_mmio_rmw32(struct xe_gt *gt, struct xe_reg reg, u32 clr, u32 set)
drivers/gpu/drm/xe/xe_trace.h +28 -0
index a22db52e88e3..be0ba5104e58 100644
@@ -347,6 +347,34 @@ DEFINE_EVENT(xe_hw_fence, xe_hw_fence_free,
 	     TP_ARGS(fence)
 );
 
+TRACE_EVENT(xe_reg_rw,
+	TP_PROTO(struct xe_gt *gt, bool write, u32 reg, u64 val, int len),
+
+	TP_ARGS(gt, write, reg, val, len),
+
+	TP_STRUCT__entry(
+		__string(dev, __dev_name_gt(gt))
+		__field(u64, val)
+		__field(u32, reg)
+		__field(u16, write)
+		__field(u16, len)
+		),
+
+	TP_fast_assign(
+		__assign_str(dev, __dev_name_gt(gt));
+		__entry->val = (u64)val;
+		__entry->reg = reg;
+		__entry->write = write;
+		__entry->len = len;
+		),
+
+	TP_printk("dev=%s, %s reg=0x%x, len=%d, val=(0x%x, 0x%x)",
+		  __get_str(dev), __entry->write ? "write" : "read",
+		  __entry->reg, __entry->len,
+		  (u32)(__entry->val & 0xffffffff),
+		  (u32)(__entry->val >> 32))
+);
+
 #endif
 
 /* This part must be outside protection */
Signature · 1 line
2.34.1
#7 lore raw

Re: [PATCH v4 6/6] drm/xe: Add reg read/write trace

Quoted 95 lines · Radhakrishna Sripada

This will help debug register read/writes and provides a way to trace all the mmio transactions.

v2: Fix kunit error
v3: Print devid to help in multi-gpu setup
v3: rebase and use variable sized variant to display
dev name(Gustavo)

---
drivers/gpu/drm/xe/xe_mmio.c | 24 ++++++++++++++++++++---- drivers/gpu/drm/xe/xe_trace.h | 28 ++++++++++++++++++++++++++++

2 files changed, 48 insertions(+), 4 deletions(-)
drivers/gpu/drm/xe/xe_mmio.c +20 -4
index 7962eeb9adb7..feba35ad6a3e 100644
@@ -21,6 +21,8 @@
 #include "xe_gt_sriov_vf.h"
 #include "xe_macros.h"
 #include "xe_sriov.h"
+#include "xe_tile.h"
+#include "xe_trace.h"
 
 static void tiles_fini(void *arg)
 {
@@ -124,16 +126,24 @@ u8 xe_mmio_read8(struct xe_gt *gt, struct xe_reg reg)
 {
 	struct xe_tile *tile = gt_to_tile(gt);
 	u32 addr = xe_mmio_adjusted_addr(gt, reg.addr);
+	u8 val;
 
-	return readb((reg.ext ? tile->mmio_ext.regs : tile->mmio.regs) + addr);
+	val = readb((reg.ext ? tile->mmio_ext.regs : tile->mmio.regs) + addr);
+	trace_xe_reg_rw(gt, false, addr, val, sizeof(val));
+
+	return val;
 }
 
 u16 xe_mmio_read16(struct xe_gt *gt, struct xe_reg reg)
 {
 	struct xe_tile *tile = gt_to_tile(gt);
 	u32 addr = xe_mmio_adjusted_addr(gt, reg.addr);
+	u16 val;
+
+	val = readw((reg.ext ? tile->mmio_ext.regs : tile->mmio.regs) + addr);
+	trace_xe_reg_rw(gt, false, addr, val, sizeof(val));
 
-	return readw((reg.ext ? tile->mmio_ext.regs : tile->mmio.regs) + addr);
+	return val;
 }
 
 void xe_mmio_write32(struct xe_gt *gt, struct xe_reg reg, u32 val)
@@ -141,6 +151,7 @@ void xe_mmio_write32(struct xe_gt *gt, struct xe_reg reg, u32 val)
 	struct xe_tile *tile = gt_to_tile(gt);
 	u32 addr = xe_mmio_adjusted_addr(gt, reg.addr);
 
+	trace_xe_reg_rw(gt, true, addr, val, sizeof(val));
 	writel(val, (reg.ext ? tile->mmio_ext.regs : tile->mmio.regs) + addr);
 }
 
@@ -148,11 +159,16 @@ u32 xe_mmio_read32(struct xe_gt *gt, struct xe_reg reg)
 {
 	struct xe_tile *tile = gt_to_tile(gt);
 	u32 addr = xe_mmio_adjusted_addr(gt, reg.addr);
+	u32 val;
 
 	if (!reg.vf && IS_SRIOV_VF(gt_to_xe(gt)))
-		return xe_gt_sriov_vf_read32(gt, reg);
+		val = xe_gt_sriov_vf_read32(gt, reg);
+	else
+		val = readl((reg.ext ? tile->mmio_ext.regs : tile->mmio.regs) + addr);
+
+	trace_xe_reg_rw(gt, false, addr, val, sizeof(val));
 
-	return readl((reg.ext ? tile->mmio_ext.regs : tile->mmio.regs) + addr);
+	return val;
 }
 
 u32 xe_mmio_rmw32(struct xe_gt *gt, struct xe_reg reg, u32 clr, u32 set)
drivers/gpu/drm/xe/xe_trace.h +5 -0
index a22db52e88e3..be0ba5104e58 100644
@@ -347,6 +347,34 @@ DEFINE_EVENT(xe_hw_fence, xe_hw_fence_free,
 	     TP_ARGS(fence)
 );
 
+TRACE_EVENT(xe_reg_rw,
+	TP_PROTO(struct xe_gt *gt, bool write, u32 reg, u64 val, int len),
+
+	TP_ARGS(gt, write, reg, val, len),
+

drivers/gpu/drm/xe/xe_trace.h DEFINE_EVENT(xe_hw_fence, xe_hw_fence_free, · line 364

Quoted 10 lines
drivers/gpu/drm/xe/xe_trace.h +10 -0
+	TP_STRUCT__entry(
+		__string(dev, __dev_name_gt(gt))
+		__field(u64, val)
+		__field(u32, reg)
+		__field(u16, write)
+		__field(u16, len)
+		),
+
+	TP_fast_assign(
+		__assign_str(dev, __dev_name_gt(gt));

after commit 2c92ca849fcc6ee7d0c358e9959abc9f58661aea, __assign_str() has only 1 param.

Lucas De Marchi

#8 lore raw

✓ CI.Patch_applied: success for Tracing cleanup and add mmio tracing (rev2)

In reply to Radhakrishna Sripada
== Series Details ==

== Series Details ==

Series: Tracing cleanup and add mmio tracing (rev2)
URL : https://patchwork.freedesktop.org/series/134258/
State : success

== Summary ==

=== Applying kernel patches on branch 'drm-tip' with base: ===
Base commit: a49454548363 drm-tip: 2024y-06m-05d-12h-34m-40s UTC integration manifest === git am output follows ===
Applying: drm/xe/trace: Extract bo, vm, vma traces
Applying: drm/xe/trace: Extract guc related traces
Applying: drm/xe/trace: Print device_id in xe_trace_bo events
Applying: drm/xe/trace: Print device_id in xe_trace_guc events
Applying: drm/xe/trace: Print device_id in xe_trace events
Applying: drm/xe: Add reg read/write trace

#9 lore raw

✗ CI.checkpatch: warning for Tracing cleanup and add mmio tracing (rev2)

In reply to Radhakrishna Sripada
== Series Details ==

== Series Details ==

Series: Tracing cleanup and add mmio tracing (rev2)
URL : https://patchwork.freedesktop.org/series/134258/
State : warning

== Summary ==

+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master 51ce9f6cd981d42d7467409d7dbc559a450abc1e
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 3cff5385b720d876cec8cf9919abff28396842be

Author: Radhakrishna Sripada <[email protected]>
Date:   Wed Jun 5 17:18:14 2024 -0700

drm/xe: Add reg read/write trace

This will help debug register read/writes and provides a way to trace all the mmio transactions.

v2: Fix kunit error
v3: Print devid to help in multi-gpu setup
v3: rebase and use variable sized variant to display
dev name(Gustavo)

+ /mt/dim checkpatch a494545483635d3d93d19e8f483f61e7d4198383 drm-intel 32ce818ed2c3 drm/xe/trace: Extract bo, vm, vma traces
Traceback (most recent call last):
File "scripts/spdxcheck.py", line 6, in <module>
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
Traceback (most recent call last):
File "scripts/spdxcheck.py", line 6, in <module>
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
-:305: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #305:
new file mode 100644

-:347: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #347: FILE: drivers/gpu/drm/xe/xe_trace_bo.h:23:
+ TP_STRUCT__entry(

-:353: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #353: FILE: drivers/gpu/drm/xe/xe_trace_bo.h:29:
+ TP_fast_assign(

-:372: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #372: FILE: drivers/gpu/drm/xe/xe_trace_bo.h:48:
+ TP_STRUCT__entry(

-:381: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #381: FILE: drivers/gpu/drm/xe/xe_trace_bo.h:57:
+ TP_fast_assign(

-:399: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #399: FILE: drivers/gpu/drm/xe/xe_trace_bo.h:75:
+ TP_STRUCT__entry(

-:407: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #407: FILE: drivers/gpu/drm/xe/xe_trace_bo.h:83:
+ TP_fast_assign(

-:499: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #499: FILE: drivers/gpu/drm/xe/xe_trace_bo.h:175:
+ TP_STRUCT__entry(

-:504: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #504: FILE: drivers/gpu/drm/xe/xe_trace_bo.h:180:
+ TP_fast_assign(

-:558: CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) #558: FILE: drivers/gpu/drm/xe/xe_trace_bo.h:234:
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/xe

                              ^

-:558: CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) #558: FILE: drivers/gpu/drm/xe/xe_trace_bo.h:234:
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/xe

                                 ^

-:558: CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) #558: FILE: drivers/gpu/drm/xe/xe_trace_bo.h:234:
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/xe

                                         ^

-:558: CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) #558: FILE: drivers/gpu/drm/xe/xe_trace_bo.h:234:
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/xe

                                             ^

-:558: CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) #558: FILE: drivers/gpu/drm/xe/xe_trace_bo.h:234:
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/xe

                                                 ^

total: 0 errors, 1 warnings, 13 checks, 514 lines checked
9263ef6c559c drm/xe/trace: Extract guc related traces
Traceback (most recent call last):
File "scripts/spdxcheck.py", line 6, in <module>
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
Traceback (most recent call last):
File "scripts/spdxcheck.py", line 6, in <module>
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
-:133: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #133:
new file mode 100644

-:173: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #173: FILE: drivers/gpu/drm/xe/xe_trace_guc.h:21:
+ TP_STRUCT__entry(

-:181: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #181: FILE: drivers/gpu/drm/xe/xe_trace_guc.h:29:
+ TP_fast_assign(

-:212: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #212: FILE: drivers/gpu/drm/xe/xe_trace_guc.h:60:
+ TP_STRUCT__entry(

-:220: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #220: FILE: drivers/gpu/drm/xe/xe_trace_guc.h:68:
+ TP_fast_assign(

-:253: CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) #253: FILE: drivers/gpu/drm/xe/xe_trace_guc.h:101:
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/xe

                              ^

-:253: CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) #253: FILE: drivers/gpu/drm/xe/xe_trace_guc.h:101:
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/xe

                                 ^

-:253: CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) #253: FILE: drivers/gpu/drm/xe/xe_trace_guc.h:101:
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/xe

                                         ^

-:253: CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) #253: FILE: drivers/gpu/drm/xe/xe_trace_guc.h:101:
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/xe

                                             ^

-:253: CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) #253: FILE: drivers/gpu/drm/xe/xe_trace_guc.h:101:
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/xe

                                                 ^

total: 0 errors, 1 warnings, 9 checks, 213 lines checked 10e06e0bd34f drm/xe/trace: Print device_id in xe_trace_bo events d47381bed5f9 drm/xe/trace: Print device_id in xe_trace_guc events -:90: WARNING:LONG_LINE: line length of 103 exceeds 100 columns #90: FILE: drivers/gpu/drm/xe/xe_trace_guc.h:22:
+ TP_PROTO(struct xe_device *xe, u32 _head, u32 _tail, u32 size, u32 space, u32 len),

-:127: WARNING:LONG_LINE: line length of 102 exceeds 100 columns #127: FILE: drivers/gpu/drm/xe/xe_trace_guc.h:54:
+ TP_PROTO(struct xe_device *xe, u32 _head, u32 _tail, u32 size, u32 space, u32 len),

-:140: WARNING:LONG_LINE: line length of 103 exceeds 100 columns #140: FILE: drivers/gpu/drm/xe/xe_trace_guc.h:63:
+ TP_PROTO(struct xe_device *xe, u8 gt_id, u32 action, u32 len, u32 _head, u32 tail),

-:177: WARNING:LONG_LINE: line length of 102 exceeds 100 columns #177: FILE: drivers/gpu/drm/xe/xe_trace_guc.h:95:
+ TP_PROTO(struct xe_device *xe, u8 gt_id, u32 action, u32 len, u32 _head, u32 tail),

total: 0 errors, 4 warnings, 0 checks, 149 lines checked 599c07ecda36 drm/xe/trace: Print device_id in xe_trace events -:328: WARNING:LONG_LINE: line length of 102 exceeds 100 columns #328: FILE: drivers/gpu/drm/xe/xe_trace.h:282:
+ __string(dev, __dev_name_eq(((struct xe_exec_queue *)msg->private_data)))

-:334: WARNING:LONG_LINE: line length of 106 exceeds 100 columns #334: FILE: drivers/gpu/drm/xe/xe_trace.h:288:
+ __assign_str(dev, __dev_name_eq(((struct xe_exec_queue *)msg->private_data)));

total: 0 errors, 2 warnings, 0 checks, 313 lines checked 3cff5385b720 drm/xe: Add reg read/write trace
-:93: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #93: FILE: drivers/gpu/drm/xe/xe_trace.h:351:
+TRACE_EVENT(xe_reg_rw,
+ TP_PROTO(struct xe_gt *gt, bool write, u32 reg, u64 val, int len),

-:97: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #97: FILE: drivers/gpu/drm/xe/xe_trace.h:355:
+ TP_STRUCT__entry(

-:105: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #105: FILE: drivers/gpu/drm/xe/xe_trace.h:363:
+ TP_fast_assign(

total: 0 errors, 0 warnings, 3 checks, 93 lines checked

#10 lore raw

✗ CI.KUnit: failure for Tracing cleanup and add mmio tracing (rev2)

In reply to Radhakrishna Sripada
== Series Details ==

== Series Details ==

Series: Tracing cleanup and add mmio tracing (rev2)
URL : https://patchwork.freedesktop.org/series/134258/
State : failure

== Summary ==

+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig ERROR:root:../lib/iomap.c:156:5: warning: no previous prototype for ‘ioread64_lo_hi’ [-Wmissing-prototypes] 156 | u64 ioread64_lo_hi(const void __iomem *addr)

      |     ^~~~~~~~~~~~~~
../lib/iomap.c:163:5: warning: no previous prototype for ‘ioread64_hi_lo’ [-Wmissing-prototypes]
  163 | u64 ioread64_hi_lo(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~
../lib/iomap.c:170:5: warning: no previous prototype for ‘ioread64be_lo_hi’ [-Wmissing-prototypes]
  170 | u64 ioread64be_lo_hi(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~~~
../lib/iomap.c:178:5: warning: no previous prototype for ‘ioread64be_hi_lo’ [-Wmissing-prototypes]
  178 | u64 ioread64be_hi_lo(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~~~
../lib/iomap.c:264:6: warning: no previous prototype for ‘iowrite64_lo_hi’ [-Wmissing-prototypes]
  264 | void iowrite64_lo_hi(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~
../lib/iomap.c:272:6: warning: no previous prototype for ‘iowrite64_hi_lo’ [-Wmissing-prototypes]
  272 | void iowrite64_hi_lo(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~
../lib/iomap.c:280:6: warning: no previous prototype for ‘iowrite64be_lo_hi’ [-Wmissing-prototypes]
  280 | void iowrite64be_lo_hi(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~~~
../lib/iomap.c:288:6: warning: no previous prototype for ‘iowrite64be_hi_lo’ [-Wmissing-prototypes]
  288 | void iowrite64be_hi_lo(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~~~
In file included from ../include/trace/trace_events.h:419,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace_guc.h:111,
                 from ../drivers/gpu/drm/xe/xe_trace_guc.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace_guc.h:46:1: error: macro "__assign_str" passed 2 arguments, but takes just 1
   46 | );
      | ^~            
In file included from ../include/trace/trace_events.h:375,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace_guc.h:111,
                 from ../drivers/gpu/drm/xe/xe_trace_guc.c:8:
../include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here
   34 | #define __assign_str(dst)      \
      | 
In file included from ../include/trace/trace_events.h:419,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace.h:385,
                 from ../drivers/gpu/drm/xe/xe_trace.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h:46:1: error: macro "__assign_str" passed 2 arguments, but takes just 1
   46 | );
      | ^~            
In file included from ../include/trace/trace_events.h:375,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace.h:385,
                 from ../drivers/gpu/drm/xe/xe_trace.c:8:
../include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here
   34 | #define __assign_str(dst)      \
      | 
In file included from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace_guc.h:111,
                 from ../drivers/gpu/drm/xe/xe_trace_guc.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace_guc.h: In function ‘trace_event_raw_event_xe_guc_ct_flow_control’:
../include/trace/../../drivers/gpu/drm/xe/xe_trace_guc.h:35:7: error: ‘__assign_str’ undeclared (first use in this function)
   35 |       __assign_str(dev, __dev_name_xe(xe));
      |       ^~~~~~~~~~~~
../include/trace/trace_events.h:402:4: note: in definition of macro ‘DECLARE_EVENT_CLASS’
  402 |  { assign; }       \
      |    ^~~~~~
../include/trace/../../drivers/gpu/drm/xe/xe_trace_guc.h:34:7: note: in expansion of macro ‘TP_fast_assign’
   34 |       TP_fast_assign(
      |       ^~~~~~~~~~~~~~
../include/trace/../../drivers/gpu/drm/xe/xe_trace_guc.h:35:7: note: each undeclared identifier is reported only once for each function it appears in
   35 |       __assign_str(dev, __dev_name_xe(xe));
      |       ^~~~~~~~~~~~
../include/trace/trace_events.h:402:4: note: in definition of macro ‘DECLARE_EVENT_CLASS’
  402 |  { assign; }       \
      |    ^~~~~~
../include/trace/../../drivers/gpu/drm/xe/xe_trace_guc.h:34:7: note: in expansion of macro ‘TP_fast_assign’
   34 |       TP_fast_assign(
      |       ^~~~~~~~~~~~~~
In file included from ../include/trace/trace_events.h:419,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace_guc.h:111,
                 from ../drivers/gpu/drm/xe/xe_trace_guc.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace_guc.h: At top level:
../include/trace/../../drivers/gpu/drm/xe/xe_trace_guc.h:87:1: error: macro "__assign_str" passed 2 arguments, but takes just 1
   87 | );
      | ^~            
In file included from ../include/trace/trace_events.h:375,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace_guc.h:111,
                 from ../drivers/gpu/drm/xe/xe_trace_guc.c:8:
../include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here
   34 | #define __assign_str(dst)      \
      | 
In file included from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace.h:385,
                 from ../drivers/gpu/drm/xe/xe_trace.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h: In function ‘trace_event_raw_event_xe_gt_tlb_invalidation_fence’:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h:39:7: error: ‘__assign_str’ undeclared (first use in this function)
   39 |       __assign_str(dev, __dev_name_xe(xe));
      |       ^~~~~~~~~~~~
../include/trace/trace_events.h:402:4: note: in definition of macro ‘DECLARE_EVENT_CLASS’
  402 |  { assign; }       \
      |    ^~~~~~
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h:38:7: note: in expansion of macro ‘TP_fast_assign’
   38 |       TP_fast_assign(
      |       ^~~~~~~~~~~~~~
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h:39:7: note: each undeclared identifier is reported only once for each function it appears in
   39 |       __assign_str(dev, __dev_name_xe(xe));
      |       ^~~~~~~~~~~~
../include/trace/trace_events.h:402:4: note: in definition of macro ‘DECLARE_EVENT_CLASS’
  402 |  { assign; }       \
      |    ^~~~~~
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h:38:7: note: in expansion of macro ‘TP_fast_assign’
   38 |       TP_fast_assign(
      |       ^~~~~~~~~~~~~~
In file included from ../include/trace/trace_events.h:419,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace.h:385,
                 from ../drivers/gpu/drm/xe/xe_trace.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h: At top level:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h:114:1: error: macro "__assign_str" passed 2 arguments, but takes just 1
  114 | );
      | ^~            
In file included from ../include/trace/trace_events.h:375,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace.h:385,
                 from ../drivers/gpu/drm/xe/xe_trace.c:8:
../include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here
   34 | #define __assign_str(dst)      \
      | 
In file included from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace_guc.h:111,
                 from ../drivers/gpu/drm/xe/xe_trace_guc.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace_guc.h: In function ‘trace_event_raw_event_xe_guc_ctb’:
../include/trace/../../drivers/gpu/drm/xe/xe_trace_guc.h:76:8: error: ‘__assign_str’ undeclared (first use in this function)
   76 |        __assign_str(dev, __dev_name_xe(xe));
      |        ^~~~~~~~~~~~
../include/trace/trace_events.h:402:4: note: in definition of macro ‘DECLARE_EVENT_CLASS’
  402 |  { assign; }       \
      |    ^~~~~~
../include/trace/../../drivers/gpu/drm/xe/xe_trace_guc.h:75:7: note: in expansion of macro ‘TP_fast_assign’
   75 |       TP_fast_assign(
      |       ^~~~~~~~~~~~~~
In file included from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace.h:385,
                 from ../drivers/gpu/drm/xe/xe_trace.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h: In function ‘trace_event_raw_event_xe_exec_queue’:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h:100:7: error: ‘__assign_str’ undeclared (first use in this function)
  100 |       __assign_str(dev, __dev_name_eq(q));
      |       ^~~~~~~~~~~~
../include/trace/trace_events.h:402:4: note: in definition of macro ‘DECLARE_EVENT_CLASS’
  402 |  { assign; }       \
      |    ^~~~~~
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h:99:7: note: in expansion of macro ‘TP_fast_assign’
   99 |       TP_fast_assign(
      |       ^~~~~~~~~~~~~~
In file included from ../include/trace/trace_events.h:419,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace.h:385,
                 from ../drivers/gpu/drm/xe/xe_trace.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h: At top level:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h:240:1: error: macro "__assign_str" passed 2 arguments, but takes just 1
  240 | );
      | ^~            
In file included from ../include/trace/trace_events.h:375,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace.h:385,
                 from ../drivers/gpu/drm/xe/xe_trace.c:8:
../include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here
   34 | #define __assign_str(dst)      \
      | 
make[7]: *** [../scripts/Makefile.build:244: drivers/gpu/drm/xe/xe_trace_guc.o] Error 1
make[7]: *** Waiting for unfinished jobs....
In file included from ../include/trace/trace_events.h:419,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.h:248,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace_bo.h:45:1: error: macro "__assign_str" passed 2 arguments, but takes just 1
   45 | );
      | ^~            
In file included from ../include/trace/trace_events.h:375,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.h:248,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.c:8:
../include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here
   34 | #define __assign_str(dst)      \
      | 
In file included from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace.h:385,
                 from ../drivers/gpu/drm/xe/xe_trace.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h: In function ‘trace_event_raw_event_xe_sched_job’:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h:223:7: error: ‘__assign_str’ undeclared (first use in this function)
  223 |       __assign_str(dev, __dev_name_eq(job->q));
      |       ^~~~~~~~~~~~
../include/trace/trace_events.h:402:4: note: in definition of macro ‘DECLARE_EVENT_CLASS’
  402 |  { assign; }       \
      |    ^~~~~~
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h:222:7: note: in expansion of macro ‘TP_fast_assign’
  222 |       TP_fast_assign(
      |       ^~~~~~~~~~~~~~
In file included from ../include/trace/trace_events.h:419,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace.h:385,
                 from ../drivers/gpu/drm/xe/xe_trace.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h: At top level:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h:296:1: error: macro "__assign_str" passed 2 arguments, but takes just 1
  296 | );
      | ^~            
In file included from ../include/trace/trace_events.h:375,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace.h:385,
                 from ../drivers/gpu/drm/xe/xe_trace.c:8:
../include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here
   34 | #define __assign_str(dst)      \
      | 
In file included from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.h:248,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace_bo.h: In function ‘trace_event_raw_event_xe_bo’:
../include/trace/../../drivers/gpu/drm/xe/xe_trace_bo.h:36:7: error: ‘__assign_str’ undeclared (first use in this function)
   36 |       __assign_str(dev, __dev_name_bo(bo));
      |       ^~~~~~~~~~~~
../include/trace/trace_events.h:402:4: note: in definition of macro ‘DECLARE_EVENT_CLASS’
  402 |  { assign; }       \
      |    ^~~~~~
../include/trace/../../drivers/gpu/drm/xe/xe_trace_bo.h:35:7: note: in expansion of macro ‘TP_fast_assign’
   35 |       TP_fast_assign(
      |       ^~~~~~~~~~~~~~
../include/trace/../../drivers/gpu/drm/xe/xe_trace_bo.h:36:7: note: each undeclared identifier is reported only once for each function it appears in
   36 |       __assign_str(dev, __dev_name_bo(bo));
      |       ^~~~~~~~~~~~
../include/trace/trace_events.h:402:4: note: in definition of macro ‘DECLARE_EVENT_CLASS’
  402 |  { assign; }       \
      |    ^~~~~~
../include/trace/../../drivers/gpu/drm/xe/xe_trace_bo.h:35:7: note: in expansion of macro ‘TP_fast_assign’
   35 |       TP_fast_assign(
      |       ^~~~~~~~~~~~~~
In file included from ../include/trace/trace_events.h:419,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.h:248,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace_bo.h: At top level:
../include/trace/../../drivers/gpu/drm/xe/xe_trace_bo.h:77:1: error: macro "__assign_str" passed 2 arguments, but takes just 1
   77 | );
      | ^~                  
In file included from ../include/trace/trace_events.h:375,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.h:248,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.c:8:
../include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here
   34 | #define __assign_str(dst)      \
      | 
In file included from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace.h:385,
                 from ../drivers/gpu/drm/xe/xe_trace.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h: In function ‘trace_event_raw_event_xe_sched_msg’:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h:288:8: error: ‘__assign_str’ undeclared (first use in this function)
  288 |        __assign_str(dev, __dev_name_eq(((struct xe_exec_queue *)msg->private_data)));
      |        ^~~~~~~~~~~~
../include/trace/trace_events.h:402:4: note: in definition of macro ‘DECLARE_EVENT_CLASS’
  402 |  { assign; }       \
      |    ^~~~~~
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h:287:7: note: in expansion of macro ‘TP_fast_assign’
  287 |       TP_fast_assign(
      |       ^~~~~~~~~~~~~~
In file included from ../include/trace/trace_events.h:419,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace.h:385,
                 from ../drivers/gpu/drm/xe/xe_trace.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h: At top level:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h:328:1: error: macro "__assign_str" passed 2 arguments, but takes just 1
  328 | );
      | ^~            
In file included from ../include/trace/trace_events.h:375,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace.h:385,
                 from ../drivers/gpu/drm/xe/xe_trace.c:8:
../include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here
   34 | #define __assign_str(dst)      \
      | 
In file included from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.h:248,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace_bo.h: In function ‘trace_event_raw_event_xe_bo_move’:
../include/trace/../../drivers/gpu/drm/xe/xe_trace_bo.h:70:6: error: ‘__assign_str’ undeclared (first use in this function)
   70 |      __assign_str(device_id, __dev_name_bo(bo));
      |      ^~~~~~~~~~~~
../include/trace/trace_events.h:402:4: note: in definition of macro ‘DECLARE_EVENT_CLASS’
  402 |  { assign; }       \
      |    ^~~~~~
../include/trace/trace_events.h:44:9: note: in expansion of macro ‘PARAMS’
   44 |         PARAMS(assign),         \
      |         ^~~~~~
../include/trace/../../drivers/gpu/drm/xe/xe_trace_bo.h:52:1: note: in expansion of macro ‘TRACE_EVENT’
   52 | TRACE_EVENT(xe_bo_move,
      | ^~~~~~~~~~~
../include/trace/../../drivers/gpu/drm/xe/xe_trace_bo.h:65:6: note: in expansion of macro ‘TP_fast_assign’
   65 |      TP_fast_assign(
      |      ^~~~~~~~~~~~~~
In file included from ../include/trace/trace_events.h:419,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.h:248,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace_bo.h: At top level:
../include/trace/../../drivers/gpu/drm/xe/xe_trace_bo.h:104:1: error: macro "__assign_str" passed 2 arguments, but takes just 1
  104 | )
      | ^             
In file included from ../include/trace/trace_events.h:375,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.h:248,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.c:8:
../include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here
   34 | #define __assign_str(dst)      \
      | 
In file included from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace.h:385,
                 from ../drivers/gpu/drm/xe/xe_trace.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h: In function ‘trace_event_raw_event_xe_hw_fence’:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h:320:7: error: ‘__assign_str’ undeclared (first use in this function)
  320 |       __assign_str(dev, __dev_name_gt(fence->ctx->gt));
      |       ^~~~~~~~~~~~
../include/trace/trace_events.h:402:4: note: in definition of macro ‘DECLARE_EVENT_CLASS’
  402 |  { assign; }       \
      |    ^~~~~~
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h:319:7: note: in expansion of macro ‘TP_fast_assign’
  319 |       TP_fast_assign(
      |       ^~~~~~~~~~~~~~
In file included from ../include/trace/trace_events.h:419,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace.h:385,
                 from ../drivers/gpu/drm/xe/xe_trace.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h: At top level:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h:376:1: error: macro "__assign_str" passed 2 arguments, but takes just 1
  376 | );
      | ^~            
In file included from ../include/trace/trace_events.h:375,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace.h:385,
                 from ../drivers/gpu/drm/xe/xe_trace.c:8:
../include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here
   34 | #define __assign_str(dst)      \
      | 
In file included from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.h:248,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace_bo.h: In function ‘trace_event_raw_event_xe_vma’:
../include/trace/../../drivers/gpu/drm/xe/xe_trace_bo.h:93:7: error: ‘__assign_str’ undeclared (first use in this function)
   93 |       __assign_str(dev, __dev_name_vma(vma));
      |       ^~~~~~~~~~~~
../include/trace/trace_events.h:402:4: note: in definition of macro ‘DECLARE_EVENT_CLASS’
  402 |  { assign; }       \
      |    ^~~~~~
../include/trace/../../drivers/gpu/drm/xe/xe_trace_bo.h:92:7: note: in expansion of macro ‘TP_fast_assign’
   92 |       TP_fast_assign(
      |       ^~~~~~~~~~~~~~
In file included from ../include/trace/trace_events.h:419,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.h:248,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace_bo.h: At top level:
../include/trace/../../drivers/gpu/drm/xe/xe_trace_bo.h:199:1: error: macro "__assign_str" passed 2 arguments, but takes just 1
  199 | );
      | ^~            
In file included from ../include/trace/trace_events.h:375,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.h:248,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.c:8:
../include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here
   34 | #define __assign_str(dst)      \
      | 
In file included from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace.h:385,
                 from ../drivers/gpu/drm/xe/xe_trace.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h: In function ‘trace_event_raw_event_xe_reg_rw’:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h:364:3: error: ‘__assign_str’ undeclared (first use in this function)
  364 |   __assign_str(dev, __dev_name_gt(gt));
      |   ^~~~~~~~~~~~
../include/trace/trace_events.h:402:4: note: in definition of macro ‘DECLARE_EVENT_CLASS’
  402 |  { assign; }       \
      |    ^~~~~~
../include/trace/trace_events.h:44:9: note: in expansion of macro ‘PARAMS’
   44 |         PARAMS(assign),         \
      |         ^~~~~~
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h:350:1: note: in expansion of macro ‘TRACE_EVENT’
  350 | TRACE_EVENT(xe_reg_rw,
      | ^~~~~~~~~~~
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h:363:2: note: in expansion of macro ‘TP_fast_assign’
  363 |  TP_fast_assign(
      |  ^~~~~~~~~~~~~~
In file included from ../include/trace/trace_events.h:469,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace.h:385,
                 from ../drivers/gpu/drm/xe/xe_trace.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h: At top level:
../include/trace/../../drivers/gpu/drm/xe/xe_trace.h:376:1: error: macro "__assign_str" passed 2 arguments, but takes just 1
  376 | );
      | ^~            
In file included from ../include/trace/trace_events.h:375,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace.h:385,
                 from ../drivers/gpu/drm/xe/xe_trace.c:8:
../include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here
   34 | #define __assign_str(dst)      \
      | 
In file included from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.h:248,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace_bo.h: In function ‘trace_event_raw_event_xe_vm’:
../include/trace/../../drivers/gpu/drm/xe/xe_trace_bo.h:192:7: error: ‘__assign_str’ undeclared (first use in this function)
  192 |       __assign_str(dev, __dev_name_vm(vm));
      |       ^~~~~~~~~~~~
../include/trace/trace_events.h:402:4: note: in definition of macro ‘DECLARE_EVENT_CLASS’
  402 |  { assign; }       \
      |    ^~~~~~
../include/trace/../../drivers/gpu/drm/xe/xe_trace_bo.h:191:7: note: in expansion of macro ‘TP_fast_assign’
  191 |       TP_fast_assign(
      |       ^~~~~~~~~~~~~~
In file included from ../include/trace/trace_events.h:469,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.h:248,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.c:8:
../include/trace/../../drivers/gpu/drm/xe/xe_trace_bo.h: At top level:
../include/trace/../../drivers/gpu/drm/xe/xe_trace_bo.h:77:1: error: macro "__assign_str" passed 2 arguments, but takes just 1
   77 | );
      | ^~                  
In file included from ../include/trace/trace_events.h:375,
                 from ../include/trace/define_trace.h:102,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.h:248,
                 from ../drivers/gpu/drm/xe/xe_trace_bo.c:8:
../include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here
   34 | #define __assign_str(dst)      \
      | 

make[7]: *** [../scripts/Makefile.build:244: drivers/gpu/drm/xe/xe_trace.o] Error 1 make[7]: *** [../scripts/Makefile.build:244: drivers/gpu/drm/xe/xe_trace_bo.o] Error 1 make[6]: *** [../scripts/Makefile.build:485: drivers/gpu/drm/xe] Error 2 make[5]: *** [../scripts/Makefile.build:485: drivers/gpu/drm] Error 2 make[4]: *** [../scripts/Makefile.build:485: drivers/gpu] Error 2 make[3]: *** [../scripts/Makefile.build:485: drivers] Error 2
make[2]: *** [/kernel/Makefile:1934: .] Error 2
make[1]: *** [/kernel/Makefile:240: __sub-make] Error 2
make: *** [Makefile:240: __sub-make] Error 2

[00:24:39] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[00:24:44] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make ARCH=um O=.kunit --jobs=48
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel