diff options
| author | Shuah Khan <shuah.kh@samsung.com> | 2013-09-24 17:21:20 -0400 |
|---|---|---|
| committer | Joerg Roedel <joro@8bytes.org> | 2013-09-25 05:07:04 -0400 |
| commit | 56fa484969c367e3ae43a012a7b99f75bb4f3bdb (patch) | |
| tree | c34c0fd586c5a43cc575ee61c0ee67b7e2b1e010 | |
| parent | 04fa2f7f837601903e5fe0f93bc2af8559d8c035 (diff) | |
iommu: Change iommu driver to call io_page_fault trace event
Change iommu driver call io_page_fault trace event. This iommu_error class
event can be enabled to trigger when an iommu error occurs. Trace information
includes driver name, device name, iova, and flags.
Testing:
Added trace calls to iommu_prepare_identity_map() for testing some of the
conditions that are hard to trigger. Here is the trace from the testing:
swapper/0-1 [003] .... 2.003774: io_page_fault: IOMMU:pci 0000:00:02.0 iova=0x00000000cb800000 flags=0x0002
swapper/0-1 [003] .... 2.004098: io_page_fault: IOMMU:pci 0000:00:1d.0 iova=0x00000000cadc6000 flags=0x0002
swapper/0-1 [003] .... 2.004115: io_page_fault: IOMMU:pci 0000:00:1a.0 iova=0x00000000cadc6000 flags=0x0002
swapper/0-1 [003] .... 2.004129: io_page_fault: IOMMU:pci 0000:00:1f.0 iova=0x0000000000000000 flags=0x0002
Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
| -rw-r--r-- | include/linux/iommu.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 7ea319e95b47..a444c790fa72 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
| 23 | #include <linux/err.h> | 23 | #include <linux/err.h> |
| 24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
| 25 | #include <trace/events/iommu.h> | ||
| 25 | 26 | ||
| 26 | #define IOMMU_READ (1) | 27 | #define IOMMU_READ (1) |
| 27 | #define IOMMU_WRITE (2) | 28 | #define IOMMU_WRITE (2) |
| @@ -227,6 +228,7 @@ static inline int report_iommu_fault(struct iommu_domain *domain, | |||
| 227 | ret = domain->handler(domain, dev, iova, flags, | 228 | ret = domain->handler(domain, dev, iova, flags, |
| 228 | domain->handler_token); | 229 | domain->handler_token); |
| 229 | 230 | ||
| 231 | trace_io_page_fault(dev, iova, flags); | ||
| 230 | return ret; | 232 | return ret; |
| 231 | } | 233 | } |
| 232 | 234 | ||
