mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
common: DMA-mapping: add DMA_ATTR_PRIVILEGED attribute
This patch adds the DMA_ATTR_PRIVILEGED attribute to the DMA-mapping subsystem. Some advanced peripherals such as remote processors and GPUs perform accesses to DMA buffers in both privileged "supervisor" and unprivileged "user" modes. This attribute is used to indicate to the DMA-mapping subsystem that the buffer is fully accessible at the elevated privilege level (and ideally inaccessible or at least read-only at the lesser-privileged levels). Cc: linux-doc@vger.kernel.org Reviewed-by: Robin Murphy <robin.murphy@arm.com> Tested-by: Robin Murphy <robin.murphy@arm.com> Acked-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
This commit is contained in:
parent
5baf1e9d0b
commit
b2fb366425
2 changed files with 17 additions and 0 deletions
|
@ -62,6 +62,13 @@
|
|||
*/
|
||||
#define DMA_ATTR_NO_WARN (1UL << 8)
|
||||
|
||||
/*
|
||||
* DMA_ATTR_PRIVILEGED: used to indicate that the buffer is fully
|
||||
* accessible at an elevated privilege level (and ideally inaccessible or
|
||||
* at least read-only at lesser-privileged levels).
|
||||
*/
|
||||
#define DMA_ATTR_PRIVILEGED (1UL << 9)
|
||||
|
||||
/*
|
||||
* A dma_addr_t can hold any valid DMA or bus address for the platform.
|
||||
* It can be given to a device to use as a DMA source or target. A CPU cannot
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue