/* * Allocate a writecombining region, in much the same way as * dma_alloc_coherent above. */ void * dma_alloc_writecombine(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp) { return __dma_alloc(dev, size, handle, gfp, pgprot_writecombine(pgprot_kernel), __builtin_return_address(0)); }
/* * Allocate DMA-coherent memory space and return both the kernel remapped * virtual and bus address for that space for SO write operation. */ void * dma_alloc_so_coherent(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp) { void *memory; return __dma_alloc(dev, size, handle, gfp, pgprot_so_dmacoherent(pgprot_kernel)); }
/* * Allocate DMA-coherent memory space and return both the kernel remapped * virtual and bus address for that space. */ void * dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp) { void *memory; if (dma_alloc_from_coherent(dev, size, handle, &memory)) return memory; return __dma_alloc(dev, size, handle, gfp, pgprot_dmacoherent(pgprot_kernel), __builtin_return_address(0)); }
void *dma_generic_alloc_noncoherent(struct device *dev, size_t size, dma_addr_t *dma_addr, gfp_t flag, struct dma_attrs *attrs) { return __dma_alloc(dev, size, dma_addr, flag, attrs, false); }
/* * Allocate a strongly ordered region, in much the same way as * dma_alloc_coherent above. */ void *dma_alloc_stronglyordered(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp) { return __dma_alloc(dev, size, handle, gfp, pgprot_stronglyordered(pgprot_kernel)); }