swiotlb.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #undef TRACE_SYSTEM
  2. #define TRACE_SYSTEM swiotlb
  3. #if !defined(_TRACE_SWIOTLB_H) || defined(TRACE_HEADER_MULTI_READ)
  4. #define _TRACE_SWIOTLB_H
  5. #include <linux/tracepoint.h>
  6. TRACE_EVENT(swiotlb_bounced,
  7. TP_PROTO(struct device *dev,
  8. dma_addr_t dev_addr,
  9. size_t size,
  10. int swiotlb_force),
  11. TP_ARGS(dev, dev_addr, size, swiotlb_force),
  12. TP_STRUCT__entry(
  13. __string( dev_name, dev_name(dev) )
  14. __field( u64, dma_mask )
  15. __field( dma_addr_t, dev_addr )
  16. __field( size_t, size )
  17. __field( int, swiotlb_force )
  18. ),
  19. TP_fast_assign(
  20. __assign_str(dev_name, dev_name(dev));
  21. __entry->dma_mask = (dev->dma_mask ? *dev->dma_mask : 0);
  22. __entry->dev_addr = dev_addr;
  23. __entry->size = size;
  24. __entry->swiotlb_force = swiotlb_force;
  25. ),
  26. TP_printk("dev_name: %s dma_mask=%llx dev_addr=%llx "
  27. "size=%zu %s",
  28. __get_str(dev_name),
  29. __entry->dma_mask,
  30. (unsigned long long)__entry->dev_addr,
  31. __entry->size,
  32. __entry->swiotlb_force ? "swiotlb_force" : "" )
  33. );
  34. #endif /* _TRACE_SWIOTLB_H */
  35. /* This part must be outside protection */
  36. #include <trace/define_trace.h>