drivers: dma-removed: introduce no-map-fixup
For some use cases, it is not known beforehand, how much removed (carve-out) region size must be reserved. Hence the reserved region size might need to be adjusted to support varying use cases. In such cases maintaining different device tree configurations to support varying carve-out region size is difficult. Introduce an optional device tree property, to reserved-memory, "no-map-fixup" which works in tandem with "removed-dma-pool" compatibility that tries to shrink and adjust the removed area on very first successful allocation. At end of which it returns the additional (unused) pages from the region back to the system. Point to note is this that this adjustment is done on very first allocation and thereafter the region size is big enough only to support maximum of first allocation request size. This fixup is attempted only once upon first allocation and never after that. Clients can allocate and free from this region as any other dma region. As the description suggests this type of region is specific to certain special needs and is not to be used for common use cases. Change-Id: I31f49d6bd957814bc2ef3a94910425b820ccc739 Signed-off-by:Shiraz Hashim <shashim@codeaurora.org> Signed-off-by:
Patrick Daly <pdaly@codeaurora.org>
Loading
Please register or sign in to comment