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>
11 DECLARE_EVENT_CLASS(ocxl_context
,
12 TP_PROTO(pid_t pid
, void *spa
, int pasid
, u32 pidr
, u32 tidr
),
13 TP_ARGS(pid
, spa
, pasid
, pidr
, tidr
),
26 __entry
->pasid
= pasid
;
31 TP_printk("linux pid=%d spa=0x%p pasid=0x%x pidr=0x%x tidr=0x%x",
40 DEFINE_EVENT(ocxl_context
, ocxl_context_add
,
41 TP_PROTO(pid_t pid
, void *spa
, int pasid
, u32 pidr
, u32 tidr
),
42 TP_ARGS(pid
, spa
, pasid
, pidr
, tidr
)
45 DEFINE_EVENT(ocxl_context
, ocxl_context_remove
,
46 TP_PROTO(pid_t pid
, void *spa
, int pasid
, u32 pidr
, u32 tidr
),
47 TP_ARGS(pid
, spa
, pasid
, pidr
, tidr
)
50 TRACE_EVENT(ocxl_terminate_pasid
,
51 TP_PROTO(int pasid
, int rc
),
60 __entry
->pasid
= pasid
;
64 TP_printk("pasid=0x%x rc=%d",
70 DECLARE_EVENT_CLASS(ocxl_fault_handler
,
71 TP_PROTO(void *spa
, u64 pe
, u64 dsisr
, u64 dar
, u64 tfc
),
72 TP_ARGS(spa
, pe
, dsisr
, dar
, tfc
),
85 __entry
->dsisr
= dsisr
;
90 TP_printk("spa=%p pe=0x%llx dsisr=0x%llx dar=0x%llx tfc=0x%llx",
99 DEFINE_EVENT(ocxl_fault_handler
, ocxl_fault
,
100 TP_PROTO(void *spa
, u64 pe
, u64 dsisr
, u64 dar
, u64 tfc
),
101 TP_ARGS(spa
, pe
, dsisr
, dar
, tfc
)
104 DEFINE_EVENT(ocxl_fault_handler
, ocxl_fault_ack
,
105 TP_PROTO(void *spa
, u64 pe
, u64 dsisr
, u64 dar
, u64 tfc
),
106 TP_ARGS(spa
, pe
, dsisr
, dar
, tfc
)
109 TRACE_EVENT(ocxl_afu_irq_alloc
,
110 TP_PROTO(int pasid
, int irq_id
, unsigned int virq
, int hw_irq
,
112 TP_ARGS(pasid
, irq_id
, virq
, hw_irq
, irq_offset
),
117 __field(unsigned int, virq
)
119 __field(u64
, irq_offset
)
123 __entry
->pasid
= pasid
;
124 __entry
->irq_id
= irq_id
;
125 __entry
->virq
= virq
;
126 __entry
->hw_irq
= hw_irq
;
127 __entry
->irq_offset
= irq_offset
;
130 TP_printk("pasid=0x%x irq_id=%d virq=%u hw_irq=%d irq_offset=0x%llx",
139 TRACE_EVENT(ocxl_afu_irq_free
,
140 TP_PROTO(int pasid
, int irq_id
),
141 TP_ARGS(pasid
, irq_id
),
149 __entry
->pasid
= pasid
;
150 __entry
->irq_id
= irq_id
;
153 TP_printk("pasid=0x%x irq_id=%d",
159 TRACE_EVENT(ocxl_afu_irq_receive
,
168 __entry
->virq
= virq
;
176 #endif /* _TRACE_OCXL_H */
178 /* This part must be outside protection */
179 #undef TRACE_INCLUDE_PATH
180 #define TRACE_INCLUDE_PATH .
181 #define TRACE_INCLUDE_FILE trace
182 #include <trace/define_trace.h>