diff options
author | Mitchel Humpherys <mitchelh@codeaurora.org> | 2015-08-19 11:39:23 -0700 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:13:56 -0700 |
commit | 763858dfbc726b530b1cd5ab65e1bdf01ff6f2e6 (patch) | |
tree | 513de9fd7c1b15985304d05c381f716961abc592 /drivers/iommu/iommu-debug.c | |
parent | 7f72f4984b27344b10ef763e351988b4630e575f (diff) |
iommu/iommu-debug: Pass a flags value to iommu_trigger_fault
iommu_trigger_fault now accepts a flags argument which can be handled by
the individual IOMMU drivers. Take the value written to the debugfs
file by the user and pass it as the flags value.
Change-Id: I803e6585aea35fbb0f6e03e4279587b36a7bad92
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Diffstat (limited to 'drivers/iommu/iommu-debug.c')
-rw-r--r-- | drivers/iommu/iommu-debug.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/iommu/iommu-debug.c b/drivers/iommu/iommu-debug.c index 78c566130717..3ce9b7c39291 100644 --- a/drivers/iommu/iommu-debug.c +++ b/drivers/iommu/iommu-debug.c @@ -94,8 +94,14 @@ static ssize_t iommu_debug_attachment_trigger_fault_write( loff_t *offset) { struct iommu_debug_attachment *attach = file->private_data; + unsigned long flags; - iommu_trigger_fault(attach->domain, 0); + if (kstrtoul_from_user(ubuf, count, 0, &flags)) { + pr_err("Invalid flags format\n"); + return -EFAULT; + } + + iommu_trigger_fault(attach->domain, flags); return count; } |