summaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorShuah Khan <shuah.kh@samsung.com>2013-09-24 23:21:19 +0200
committerJoerg Roedel <joro@8bytes.org>2013-09-25 11:07:04 +0200
commit04fa2f7f837601903e5fe0f93bc2af8559d8c035 (patch)
treed401bc1773dfc345242ab258294c36596c51a70a /include/trace
parentiommu: Change iommu driver to call unmap trace event (diff)
downloadlinux-04fa2f7f837601903e5fe0f93bc2af8559d8c035.tar.xz
linux-04fa2f7f837601903e5fe0f93bc2af8559d8c035.zip
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,
__entry->iova, __entry->size
)
);
+
+DECLARE_EVENT_CLASS(iommu_error,
+
+ TP_PROTO(struct device *dev, unsigned long iova, int flags),
+
+ TP_ARGS(dev, iova, flags),
+
+ TP_STRUCT__entry(
+ __string(device, dev_name(dev))
+ __string(driver, dev_driver_string(dev))
+ __field(u64, iova)
+ __field(int, flags)
+ ),
+
+ TP_fast_assign(
+ __assign_str(device, dev_name(dev));
+ __assign_str(driver, dev_driver_string(dev));
+ __entry->iova = iova;
+ __entry->flags = flags;
+ ),
+
+ TP_printk("IOMMU:%s %s iova=0x%016llx flags=0x%04x",
+ __get_str(driver), __get_str(device),
+ __entry->iova, __entry->flags
+ )
+);
+
+DEFINE_EVENT(iommu_error, io_page_fault,
+
+ TP_PROTO(struct device *dev, unsigned long iova, int flags),
+
+ TP_ARGS(dev, iova, flags)
+);
#endif /* _TRACE_IOMMU_H */
/* This part must be outside protection */