1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM swiotlb
5 #if !defined(_TRACE_SWIOTLB_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_SWIOTLB_H
8 #include <linux/tracepoint.h>
10 TRACE_EVENT(swiotlb_bounced
,
12 TP_PROTO(struct device
*dev
,
15 enum swiotlb_force swiotlb_force
),
17 TP_ARGS(dev
, dev_addr
, size
, swiotlb_force
),
20 __string( dev_name
, dev_name(dev
) )
21 __field( u64
, dma_mask
)
22 __field( dma_addr_t
, dev_addr
)
23 __field( size_t, size
)
24 __field( enum swiotlb_force
, swiotlb_force
)
28 __assign_str(dev_name
, dev_name(dev
));
29 __entry
->dma_mask
= (dev
->dma_mask
? *dev
->dma_mask
: 0);
30 __entry
->dev_addr
= dev_addr
;
32 __entry
->swiotlb_force
= swiotlb_force
;
35 TP_printk("dev_name: %s dma_mask=%llx dev_addr=%llx "
39 (unsigned long long)__entry
->dev_addr
,
41 __print_symbolic(__entry
->swiotlb_force
,
42 { SWIOTLB_NORMAL
, "NORMAL" },
43 { SWIOTLB_FORCE
, "FORCE" },
44 { SWIOTLB_NO_FORCE
, "NO_FORCE" }))
47 #endif /* _TRACE_SWIOTLB_H */
49 /* This part must be outside protection */
50 #include <trace/define_trace.h>