aboutsummaryrefslogtreecommitdiff
path: root/include/linux/fpga/fpga-mgr.h
diff options
context:
space:
mode:
authorVladimir Murzin <[email protected]>2017-06-26 10:18:57 +0100
committerChristoph Hellwig <[email protected]>2017-06-28 06:55:02 -0700
commitc41f9ea998f3ba61f38fa350eef28ec6caf0a07d (patch)
tree6973acbeacd3b807b1a33608ca9bc08395743b4c /include/linux/fpga/fpga-mgr.h
parent25f1e18870881f3366a5abec27b651983ce9032c (diff)
drivers: dma-coherent: Account dma_pfn_offset when used with device tree
dma_declare_coherent_memory() and friends are designed to account difference in CPU and device addresses. However, when it is used with reserved memory regions there is assumption that CPU and device have the same view on address space. This assumption gets invalid when reserved memory for coherent DMA allocations is referenced by device with non-empty "dma-range" property. Simply feeding device address as rmem->base + dev->dma_pfn_offset would not work due to reserved memory region can be shared, so this patch turns device address to be expressed with help of CPU address and device's dma_pfn_offset in case memory reservation has been done via device tree; non device tree users continue to use the old scheme. Cc: Michal Nazarewicz <[email protected]> Cc: Marek Szyprowski <[email protected]> Cc: Roger Quadros <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Tested-by: Benjamin Gaignard <[email protected]> Tested-by: Andras Szemzo <[email protected]> Tested-by: Alexandre TORGUE <[email protected]> Signed-off-by: Vladimir Murzin <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
Diffstat (limited to 'include/linux/fpga/fpga-mgr.h')
0 files changed, 0 insertions, 0 deletions