1 /* SPDX-License-Identifier: GPL-2.0+ */
2 // Copyright 2017 IBM Corp.
4 #define TRACE_SYSTEM ocxl
6 #if !defined(_TRACE_OCXL_H) || defined(TRACE_HEADER_MULTI_READ)
9 #include <linux/tracepoint.h>
12 TRACE_EVENT(ocxl_mmu_notifier_range
,
13 TP_PROTO(unsigned long start
, unsigned long end
, unsigned long pidr
),
14 TP_ARGS(start
, end
, pidr
),
17 __field(unsigned long, start
)
18 __field(unsigned long, end
)
19 __field(unsigned long, pidr
)
23 __entry
->start
= start
;
28 TP_printk("start=0x%lx end=0x%lx pidr=0x%lx",
35 TRACE_EVENT(ocxl_init_mmu_notifier
,
36 TP_PROTO(int pasid
, unsigned long pidr
),
41 __field(unsigned long, pidr
)
45 __entry
->pasid
= pasid
;
49 TP_printk("pasid=%d, pidr=0x%lx",
55 TRACE_EVENT(ocxl_release_mmu_notifier
,
56 TP_PROTO(int pasid
, unsigned long pidr
),
61 __field(unsigned long, pidr
)
65 __entry
->pasid
= pasid
;
69 TP_printk("pasid=%d, pidr=0x%lx",
75 DECLARE_EVENT_CLASS(ocxl_context
,
76 TP_PROTO(pid_t pid
, void *spa
, int pasid
, u32 pidr
, u32 tidr
),
77 TP_ARGS(pid
, spa
, pasid
, pidr
, tidr
),
90 __entry
->pasid
= pasid
;
95 TP_printk("linux pid=%d spa=0x%p pasid=0x%x pidr=0x%x tidr=0x%x",
104 DEFINE_EVENT(ocxl_context
, ocxl_context_add
,
105 TP_PROTO(pid_t pid
, void *spa
, int pasid
, u32 pidr
, u32 tidr
),
106 TP_ARGS(pid
, spa
, pasid
, pidr
, tidr
)
109 DEFINE_EVENT(ocxl_context
, ocxl_context_remove
,
110 TP_PROTO(pid_t pid
, void *spa
, int pasid
, u32 pidr
, u32 tidr
),
111 TP_ARGS(pid
, spa
, pasid
, pidr
, tidr
)
114 TRACE_EVENT(ocxl_terminate_pasid
,
115 TP_PROTO(int pasid
, int rc
),
124 __entry
->pasid
= pasid
;
128 TP_printk("pasid=0x%x rc=%d",
134 DECLARE_EVENT_CLASS(ocxl_fault_handler
,
135 TP_PROTO(void *spa
, u64 pe
, u64 dsisr
, u64 dar
, u64 tfc
),
136 TP_ARGS(spa
, pe
, dsisr
, dar
, tfc
),
149 __entry
->dsisr
= dsisr
;
154 TP_printk("spa=%p pe=0x%llx dsisr=0x%llx dar=0x%llx tfc=0x%llx",
163 DEFINE_EVENT(ocxl_fault_handler
, ocxl_fault
,
164 TP_PROTO(void *spa
, u64 pe
, u64 dsisr
, u64 dar
, u64 tfc
),
165 TP_ARGS(spa
, pe
, dsisr
, dar
, tfc
)
168 DEFINE_EVENT(ocxl_fault_handler
, ocxl_fault_ack
,
169 TP_PROTO(void *spa
, u64 pe
, u64 dsisr
, u64 dar
, u64 tfc
),
170 TP_ARGS(spa
, pe
, dsisr
, dar
, tfc
)
173 TRACE_EVENT(ocxl_afu_irq_alloc
,
174 TP_PROTO(int pasid
, int irq_id
, unsigned int virq
, int hw_irq
),
175 TP_ARGS(pasid
, irq_id
, virq
, hw_irq
),
180 __field(unsigned int, virq
)
185 __entry
->pasid
= pasid
;
186 __entry
->irq_id
= irq_id
;
187 __entry
->virq
= virq
;
188 __entry
->hw_irq
= hw_irq
;
191 TP_printk("pasid=0x%x irq_id=%d virq=%u hw_irq=%d",
199 TRACE_EVENT(ocxl_afu_irq_free
,
200 TP_PROTO(int pasid
, int irq_id
),
201 TP_ARGS(pasid
, irq_id
),
209 __entry
->pasid
= pasid
;
210 __entry
->irq_id
= irq_id
;
213 TP_printk("pasid=0x%x irq_id=%d",
219 TRACE_EVENT(ocxl_afu_irq_receive
,
228 __entry
->virq
= virq
;
236 #endif /* _TRACE_OCXL_H */
238 /* This part must be outside protection */
239 #undef TRACE_INCLUDE_PATH
240 #define TRACE_INCLUDE_PATH .
241 #define TRACE_INCLUDE_FILE trace
242 #include <trace/define_trace.h>