aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorShuah Khan <shuah.kh@samsung.com>2013-09-24 17:21:19 -0400
committerJoerg Roedel <joro@8bytes.org>2013-09-25 05:07:04 -0400
commit04fa2f7f837601903e5fe0f93bc2af8559d8c035 (patch)
treed401bc1773dfc345242ab258294c36596c51a70a /include/trace
parent3a50639ca4684476a69314811d89622d78c09448 (diff)
iommu: Add iommu_error class event to iommu trace
iommu_error class event can be enabled to trigger when an iommu error occurs. This trace event is intended to be called to report the error information. Trace information includes driver name, device name, iova, and flags. iommu_error:io_page_fault Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Signed-off-by: Joerg Roedel <joro@8bytes.org>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/iommu.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/trace/events/iommu.h b/include/trace/events/iommu.h
index 86bcc5a9fedc..a8f5c32d174b 100644
--- a/include/trace/events/iommu.h
+++ b/include/trace/events/iommu.h
@@ -123,6 +123,39 @@ DEFINE_EVENT_PRINT(iommu_map_unmap, unmap,
123 __entry->iova, __entry->size 123 __entry->iova, __entry->size
124 ) 124 )
125); 125);
126
127DECLARE_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, dev_name(dev));
142 __assign_str(driver, dev_driver_string(dev));
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
153DEFINE_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);
126#endif /* _TRACE_IOMMU_H */ 159#endif /* _TRACE_IOMMU_H */
127 160
128/* This part must be outside protection */ 161/* This part must be outside protection */