lkml.org 
[lkml]   [2013]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] iommu: Change iommu driver to call report_fault trace event
Date
Change iommu driver report_iommu_fault() to call report_fault trace event.
This iommu_fault class event can be enabled to trigger when an iommu fault
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] .... 1.926331: report_fault: IOMMU:pci 0000:00:1d.0 iova=0x00000000cadc6000 flags=0x0001

Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
---
include/linux/iommu.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 3aeb730..9d1c051 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -22,6 +22,7 @@
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/types.h>
+#include <trace/events/iommu.h>

#define IOMMU_READ (1)
#define IOMMU_WRITE (2)
@@ -211,6 +212,7 @@ static inline int report_iommu_fault(struct iommu_domain *domain,
ret = domain->handler(domain, dev, iova, flags,
domain->handler_token);

+ trace_report_fault(dev, iova, flags);
return ret;
}

--
1.7.10.4


\
 
 \ /
  Last update: 2013-08-16 19:41    [W:0.063 / U:0.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site