mirror of
https://github.com/torvalds/linux.git
synced 2026-12-04 04:14:24 +00:00
Each driver is responsible for syncing buffers written by HW for CPU before accessing them. Almost each PP-enabled driver uses the same pattern, which could be shorthanded into a static inline to make driver code a little bit more compact. Introduce a simple helper which performs DMA synchronization for the size passed from the driver. It can be used even when the pool doesn't manage DMA-syncs-for-device, just make sure the page has a correct DMA address set via page_pool_set_dma_addr(). Signed-off-by: Alexander Lobakin <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>