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

Commit 6fec32fa authored by Will Deacon's avatar Will Deacon Committed by Mitchel Humpherys
Browse files

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.

Change-Id: Id669243403d04a032a8b6316f60993c1f9048197
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
Git-commit: ca13bb3d4e54f5c30089e55d5b8f4bb80c8f05e2
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarMitchel Humpherys <mitchelh@codeaurora.org>
parent 7dd146b7
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -25,9 +25,10 @@
#include <linux/types.h>
#include <linux/scatterlist.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)
#define IOMMU_PRIV	(16)

struct iommu_ops;