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
,
11 TP_PROTO(struct device
*dev
, dma_addr_t dev_addr
, size_t size
),
12 TP_ARGS(dev
, dev_addr
, size
),
15 __string(dev_name
, dev_name(dev
))
16 __field(u64
, dma_mask
)
17 __field(dma_addr_t
, dev_addr
)
23 __assign_str(dev_name
);
24 __entry
->dma_mask
= (dev
->dma_mask
? *dev
->dma_mask
: 0);
25 __entry
->dev_addr
= dev_addr
;
27 __entry
->force
= is_swiotlb_force_bounce(dev
);
30 TP_printk("dev_name: %s dma_mask=%llx dev_addr=%llx size=%zu %s",
33 (unsigned long long)__entry
->dev_addr
,
35 __entry
->force
? "FORCE" : "NORMAL")
38 #endif /* _TRACE_SWIOTLB_H */
40 /* This part must be outside protection */
41 #include <trace/define_trace.h>