Messages in this thread Patch in this message | | | From | Shuah Khan <> | Subject | [PATCH 2/2] iommu: Change iommu driver to call report_fault trace event | Date | Fri, 16 Aug 2013 11:20:17 -0600 |
| |
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
| |