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

Commit cc3ff310 authored by Rohit Vaswani's avatar Rohit Vaswani Committed by Patrick Daly
Browse files

common: DMA-mapping: Add EXEC_MAPPING attribute



DMA_ATTR_EXEC_MAPPING specifies that an executable mapping
should be created for the requested buffer. By default, the
DMA mappings are non-executable.

Change-Id: I135077e14996e92fa9d199bdee043c443db48924
Signed-off-by: default avatarRohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
parent 679ede30
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -145,3 +145,10 @@ reference so that when the buffer is freed, the mapping is not destroyed
and can be re-used. By specifying this attribute, an additional reference
will NOT be held by the lazy mapping code and it will be released as soon
as the buffer is freed.

DMA_ATTR_EXEC_MAPPING
---------------------

By default, the DMA mappings are non-executable. Some use cases might require
an executable mapping. This attribute can be used to indicate to the DMA
subsystem to create an executable mappings for the buffer.
+4 −0
Original line number Diff line number Diff line
@@ -72,6 +72,10 @@
 * is freed.
 */
#define DMA_ATTR_NO_DELAYED_UNMAP	(1UL << 10)
/*
 * DMA_ATTR_EXEC_MAPPING: The mapping has executable permissions.
 */
#define DMA_ATTR_EXEC_MAPPING		(1UL << 11)

/*
 * A dma_addr_t can hold any valid DMA or bus address for the platform.