Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e54e0ee authored by Mitchel Humpherys's avatar Mitchel Humpherys
Browse files

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: default avatarMitchel Humpherys <mitchelh@codeaurora.org>
parent 047b6973
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -93,8 +93,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;
}