~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/trace/events/iommu.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*
  3  * iommu trace points
  4  *
  5  * Copyright (C) 2013 Shuah Khan <shuah.kh@samsung.com>
  6  *
  7  */
  8 #undef TRACE_SYSTEM
  9 #define TRACE_SYSTEM iommu
 10 
 11 #if !defined(_TRACE_IOMMU_H) || defined(TRACE_HEADER_MULTI_READ)
 12 #define _TRACE_IOMMU_H
 13 
 14 #include <linux/tracepoint.h>
 15 
 16 struct device;
 17 
 18 DECLARE_EVENT_CLASS(iommu_group_event,
 19 
 20         TP_PROTO(int group_id, struct device *dev),
 21 
 22         TP_ARGS(group_id, dev),
 23 
 24         TP_STRUCT__entry(
 25                 __field(int, gid)
 26                 __string(device, dev_name(dev))
 27         ),
 28 
 29         TP_fast_assign(
 30                 __entry->gid = group_id;
 31                 __assign_str(device);
 32         ),
 33 
 34         TP_printk("IOMMU: groupID=%d device=%s",
 35                         __entry->gid, __get_str(device)
 36         )
 37 );
 38 
 39 DEFINE_EVENT(iommu_group_event, add_device_to_group,
 40 
 41         TP_PROTO(int group_id, struct device *dev),
 42 
 43         TP_ARGS(group_id, dev)
 44 
 45 );
 46 
 47 DEFINE_EVENT(iommu_group_event, remove_device_from_group,
 48 
 49         TP_PROTO(int group_id, struct device *dev),
 50 
 51         TP_ARGS(group_id, dev)
 52 );
 53 
 54 DECLARE_EVENT_CLASS(iommu_device_event,
 55 
 56         TP_PROTO(struct device *dev),
 57 
 58         TP_ARGS(dev),
 59 
 60         TP_STRUCT__entry(
 61                 __string(device, dev_name(dev))
 62         ),
 63 
 64         TP_fast_assign(
 65                 __assign_str(device);
 66         ),
 67 
 68         TP_printk("IOMMU: device=%s", __get_str(device)
 69         )
 70 );
 71 
 72 DEFINE_EVENT(iommu_device_event, attach_device_to_domain,
 73 
 74         TP_PROTO(struct device *dev),
 75 
 76         TP_ARGS(dev)
 77 );
 78 
 79 TRACE_EVENT(map,
 80 
 81         TP_PROTO(unsigned long iova, phys_addr_t paddr, size_t size),
 82 
 83         TP_ARGS(iova, paddr, size),
 84 
 85         TP_STRUCT__entry(
 86                 __field(u64, iova)
 87                 __field(u64, paddr)
 88                 __field(size_t, size)
 89         ),
 90 
 91         TP_fast_assign(
 92                 __entry->iova = iova;
 93                 __entry->paddr = paddr;
 94                 __entry->size = size;
 95         ),
 96 
 97         TP_printk("IOMMU: iova=0x%016llx - 0x%016llx paddr=0x%016llx size=%zu",
 98                   __entry->iova, __entry->iova + __entry->size, __entry->paddr,
 99                   __entry->size
100         )
101 );
102 
103 TRACE_EVENT(unmap,
104 
105         TP_PROTO(unsigned long iova, size_t size, size_t unmapped_size),
106 
107         TP_ARGS(iova, size, unmapped_size),
108 
109         TP_STRUCT__entry(
110                 __field(u64, iova)
111                 __field(size_t, size)
112                 __field(size_t, unmapped_size)
113         ),
114 
115         TP_fast_assign(
116                 __entry->iova = iova;
117                 __entry->size = size;
118                 __entry->unmapped_size = unmapped_size;
119         ),
120 
121         TP_printk("IOMMU: iova=0x%016llx - 0x%016llx size=%zu unmapped_size=%zu",
122                   __entry->iova, __entry->iova + __entry->size,
123                   __entry->size, __entry->unmapped_size
124         )
125 );
126 
127 DECLARE_EVENT_CLASS(iommu_error,
128 
129         TP_PROTO(struct device *dev, unsigned long iova, int flags),
130 
131         TP_ARGS(dev, iova, flags),
132 
133         TP_STRUCT__entry(
134                 __string(device, dev_name(dev))
135                 __string(driver, dev_driver_string(dev))
136                 __field(u64, iova)
137                 __field(int, flags)
138         ),
139 
140         TP_fast_assign(
141                 __assign_str(device);
142                 __assign_str(driver);
143                 __entry->iova = iova;
144                 __entry->flags = flags;
145         ),
146 
147         TP_printk("IOMMU:%s %s iova=0x%016llx flags=0x%04x",
148                         __get_str(driver), __get_str(device),
149                         __entry->iova, __entry->flags
150         )
151 );
152 
153 DEFINE_EVENT(iommu_error, io_page_fault,
154 
155         TP_PROTO(struct device *dev, unsigned long iova, int flags),
156 
157         TP_ARGS(dev, iova, flags)
158 );
159 #endif /* _TRACE_IOMMU_H */
160 
161 /* This part must be outside protection */
162 #include <trace/define_trace.h>
163 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php