dma-mapping: Add a new dma_need_sync API
Add a new API to check if calls to dma_sync_single_for_{device,cpu} are required for a given DMA streaming mapping. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20200629130359.2690853-2-hch@lst.de
This commit is contained in:

committed by
Daniel Borkmann

부모
2bdeb3ed54
커밋
3aa9162500
@@ -204,6 +204,14 @@ Returns the maximum size of a mapping for the device. The size parameter
|
||||
of the mapping functions like dma_map_single(), dma_map_page() and
|
||||
others should not be larger than the returned value.
|
||||
|
||||
::
|
||||
|
||||
bool
|
||||
dma_need_sync(struct device *dev, dma_addr_t dma_addr);
|
||||
|
||||
Returns %true if dma_sync_single_for_{device,cpu} calls are required to
|
||||
transfer memory ownership. Returns %false if those calls can be skipped.
|
||||
|
||||
::
|
||||
|
||||
unsigned long
|
||||
|
Reference in New Issue
Block a user