aboutsummaryrefslogtreecommitdiff
path: root/include/linux/iommu.h
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2013-11-05 15:59:53 +0000
committerJon Medhurst <tixy@linaro.org>2015-07-17 12:21:27 +0100
commit5ddd7f3fe2a180cb0f9788778fb16a11a5957b1d (patch)
treecbeded8cb67e70336f4950ea54ca2292fe104fbc /include/linux/iommu.h
parentb7b4cbf15158a6b726e9f0684955cc651ccacd2b (diff)
iommu: add IOMMU_EXEC flag for safely allowing XN mappings
Whilst most IOMMU mappings should probably be non-executable, there may be cases (HSA?) where executable mappings are required. This patch introduces a new mapping flag, IOMMU_EXEC, to indicate that the mapping should be mapped as executable. Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked from commit ca13bb3d4e54f5c30089e55d5b8f4bb80c8f05e2) Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'include/linux/iommu.h')
-rw-r--r--include/linux/iommu.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 3aeb7305e2f5..e8688bf6c137 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -23,9 +23,10 @@
#include <linux/err.h>
#include <linux/types.h>
-#define IOMMU_READ (1)
-#define IOMMU_WRITE (2)
-#define IOMMU_CACHE (4) /* DMA cache coherency */
+#define IOMMU_READ (1 << 0)
+#define IOMMU_WRITE (1 << 1)
+#define IOMMU_CACHE (1 << 2) /* DMA cache coherency */
+#define IOMMU_EXEC (1 << 3)
struct iommu_ops;
struct iommu_group;