Skip to content

Commit

Permalink
common: DMA-mapping: add DMA_ATTR_FORCE_CONTIGUOUS attribute
Browse files Browse the repository at this point in the history
This patch adds DMA_ATTR_FORCE_CONTIGUOUS attribute to the DMA-mapping
subsystem.

By default DMA-mapping subsystem is allowed to assemble the buffer
allocated by dma_alloc_attrs() function from individual pages if it can
be mapped as contiguous chunk into device dma address space. By
specifing this attribute the allocated buffer is forced to be contiguous
also in physical memory.

Signed-off-by: Marek Szyprowski <[email protected]>
  • Loading branch information
mszyprow authored and daeinki committed Nov 29, 2012
1 parent e7783ba commit 4b9347d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Documentation/DMA-attributes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,12 @@ transferred to 'device' domain. This attribute can be also used for
dma_unmap_{single,page,sg} functions family to force buffer to stay in
device domain after releasing a mapping for it. Use this attribute with
care!

DMA_ATTR_FORCE_CONTIGUOUS
-------------------------

By default DMA-mapping subsystem is allowed to assemble the buffer
allocated by dma_alloc_attrs() function from individual pages if it can
be mapped as contiguous chunk into device dma address space. By
specifing this attribute the allocated buffer is forced to be contiguous
also in physical memory.
1 change: 1 addition & 0 deletions include/linux/dma-attrs.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ enum dma_attr {
DMA_ATTR_NON_CONSISTENT,
DMA_ATTR_NO_KERNEL_MAPPING,
DMA_ATTR_SKIP_CPU_SYNC,
DMA_ATTR_FORCE_CONTIGUOUS,
DMA_ATTR_MAX,
};

Expand Down

0 comments on commit 4b9347d

Please sign in to comment.