···515515::516516517517 void *518518- dma_alloc_noncoherent(struct device *dev, size_t size,519519- dma_addr_t *dma_handle, gfp_t flag)518518+ dma_alloc_attrs(struct device *dev, size_t size, dma_addr_t *dma_handle,519519+ gfp_t flag, unsigned long attrs)520520521521-Identical to dma_alloc_coherent() except that the platform will522522-choose to return either consistent or non-consistent memory as it sees523523-fit. By using this API, you are guaranteeing to the platform that you524524-have all the correct and necessary sync points for this memory in the525525-driver should it choose to return non-consistent memory.521521+Identical to dma_alloc_coherent() except that when the522522+DMA_ATTR_NON_CONSISTENT flags is passed in the attrs argument, the523523+platform will choose to return either consistent or non-consistent memory524524+as it sees fit. By using this API, you are guaranteeing to the platform525525+that you have all the correct and necessary sync points for this memory526526+in the driver should it choose to return non-consistent memory.526527527528Note: where the platform can return consistent memory, it will528529guarantee that the sync points become nops.···536535::537536538537 void539539- dma_free_noncoherent(struct device *dev, size_t size, void *cpu_addr,540540- dma_addr_t dma_handle)538538+ dma_free_attrs(struct device *dev, size_t size, void *cpu_addr,539539+ dma_addr_t dma_handle, unsigned long attrs)541540542542-Free memory allocated by the nonconsistent API. All parameters must543543-be identical to those passed in (and returned by544544-dma_alloc_noncoherent()).541541+Free memory allocated by the dma_alloc_attrs(). All parameters common542542+parameters must identical to those otherwise passed to dma_fre_coherent,543543+and the attrs argument must be identical to the attrs passed to544544+dma_alloc_attrs().545545546546::547547···566564 dma_cache_sync(struct device *dev, void *vaddr, size_t size,567565 enum dma_data_direction direction)568566569569-Do a partial sync of memory that was allocated by570570-dma_alloc_noncoherent(), starting at virtual address vaddr and567567+Do a partial sync of memory that was allocated by dma_alloc_attrs() with568568+the DMA_ATTR_NON_CONSISTENT flag starting at virtual address vaddr and571569continuing on for size. Again, you *must* observe the cache line572570boundaries when doing this.573571
+1-1
arch/metag/include/asm/dma-mapping.h
···99}10101111/*1212- * dma_alloc_noncoherent() returns non-cacheable memory, so there's no need to1212+ * dma_alloc_attrs() always returns non-cacheable memory, so there's no need to1313 * do any flushing here.1414 */1515static inline void
+1-1
arch/nios2/include/asm/dma-mapping.h
···1818}19192020/*2121- * dma_alloc_noncoherent() returns non-cacheable memory, so there's no need to2121+ * dma_alloc_attrs() always returns non-cacheable memory, so there's no need to2222 * do any flushing here.2323 */2424static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
+2-2
arch/tile/include/asm/dma-mapping.h
···6868int dma_set_mask(struct device *dev, u64 mask);69697070/*7171- * dma_alloc_noncoherent() is #defined to return coherent memory,7272- * so there's no need to do any flushing here.7171+ * dma_alloc_attrs() always returns non-cacheable memory, so there's no need to7272+ * do any flushing here.7373 */7474static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size,7575 enum dma_data_direction direction)