/arch/x86/include/asm/ |
D | dma-mapping.h | 43 bool arch_dma_alloc_attrs(struct device **dev, gfp_t *gfp); 92 gfp_t gfp) in dma_alloc_coherent_mask() argument 98 dma_mask = (gfp & GFP_DMA) ? DMA_BIT_MASK(24) : DMA_BIT_MASK(32); in dma_alloc_coherent_mask() 103 static inline gfp_t dma_alloc_coherent_gfp_flags(struct device *dev, gfp_t gfp) in dma_alloc_coherent_gfp_flags() argument 105 unsigned long dma_mask = dma_alloc_coherent_mask(dev, gfp); in dma_alloc_coherent_gfp_flags() 108 gfp |= GFP_DMA; in dma_alloc_coherent_gfp_flags() 110 if (dma_mask <= DMA_BIT_MASK(32) && !(gfp & GFP_DMA)) in dma_alloc_coherent_gfp_flags() 111 gfp |= GFP_DMA32; in dma_alloc_coherent_gfp_flags() 113 return gfp; in dma_alloc_coherent_gfp_flags()
|
/arch/mn10300/mm/ |
D | dma-alloc.c | 24 dma_addr_t *dma_handle, int gfp) in dma_alloc_coherent() argument 30 dev ? dev_name(dev) : "?", size, gfp); in dma_alloc_coherent() 41 gfp &= ~(__GFP_DMA | __GFP_HIGHMEM); in dma_alloc_coherent() 44 gfp |= GFP_DMA; in dma_alloc_coherent() 46 addr = __get_free_pages(gfp, get_order(size)); in dma_alloc_coherent()
|
/arch/mips/netlogic/common/ |
D | nlm-dma.c | 48 dma_addr_t *dma_handle, gfp_t gfp, struct dma_attrs *attrs) in nlm_dma_alloc_coherent() argument 51 gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM); in nlm_dma_alloc_coherent() 55 gfp |= __GFP_DMA32; in nlm_dma_alloc_coherent() 59 gfp |= __GFP_NORETRY; in nlm_dma_alloc_coherent() 61 return swiotlb_alloc_coherent(dev, size, dma_handle, gfp); in nlm_dma_alloc_coherent()
|
/arch/cris/arch-v32/drivers/pci/ |
D | dma.c | 20 dma_addr_t *dma_handle, gfp_t gfp) in dma_alloc_coherent() argument 25 gfp &= ~(__GFP_DMA | __GFP_HIGHMEM); in dma_alloc_coherent() 31 gfp |= GFP_DMA; in dma_alloc_coherent() 33 ret = (void *)__get_free_pages(gfp, order); in dma_alloc_coherent()
|
/arch/arc/mm/ |
D | dma.c | 29 dma_addr_t *dma_handle, gfp_t gfp) in dma_alloc_noncoherent() argument 34 paddr = alloc_pages_exact(size, gfp); in dma_alloc_noncoherent() 53 dma_addr_t *dma_handle, gfp_t gfp) in dma_alloc_coherent() argument 69 return dma_alloc_noncoherent(dev, size, dma_handle, gfp); in dma_alloc_coherent() 72 paddr = alloc_pages_exact(size, gfp); in dma_alloc_coherent()
|
/arch/avr32/mm/ |
D | dma-coherent.c | 41 dma_addr_t *handle, gfp_t gfp) in __dma_alloc() argument 51 gfp &= ~(__GFP_COMP); in __dma_alloc() 56 page = alloc_pages(gfp, order); in __dma_alloc() 97 dma_addr_t *handle, gfp_t gfp) in dma_alloc_coherent() argument 102 page = __dma_alloc(dev, size, handle, gfp); in dma_alloc_coherent() 125 dma_addr_t *handle, gfp_t gfp) in dma_alloc_writecombine() argument 130 page = __dma_alloc(dev, size, handle, gfp); in dma_alloc_writecombine()
|
/arch/mips/loongson64/common/ |
D | dma-swiotlb.c | 13 dma_addr_t *dma_handle, gfp_t gfp, struct dma_attrs *attrs) in loongson_dma_alloc_coherent() argument 18 gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM); in loongson_dma_alloc_coherent() 22 gfp |= __GFP_DMA; in loongson_dma_alloc_coherent() 27 gfp |= __GFP_DMA; in loongson_dma_alloc_coherent() 32 gfp |= __GFP_DMA32; in loongson_dma_alloc_coherent() 36 gfp |= __GFP_NORETRY; in loongson_dma_alloc_coherent() 38 ret = swiotlb_alloc_coherent(dev, size, dma_handle, gfp); in loongson_dma_alloc_coherent()
|
/arch/h8300/kernel/ |
D | dma.c | 14 dma_addr_t *dma_handle, gfp_t gfp, in dma_alloc() argument 20 gfp &= ~(__GFP_DMA | __GFP_HIGHMEM); in dma_alloc() 23 gfp |= GFP_DMA; in dma_alloc() 24 ret = (void *)__get_free_pages(gfp, get_order(size)); in dma_alloc()
|
/arch/mips/mm/ |
D | dma-default.c | 79 static gfp_t massage_gfp_flags(const struct device *dev, gfp_t gfp) in massage_gfp_flags() argument 84 gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM); in massage_gfp_flags() 111 gfp |= __GFP_NORETRY; in massage_gfp_flags() 113 return gfp | dma_flag; in massage_gfp_flags() 117 dma_addr_t * dma_handle, gfp_t gfp) in mips_dma_alloc_noncoherent() argument 121 gfp = massage_gfp_flags(dev, gfp); in mips_dma_alloc_noncoherent() 123 ret = (void *) __get_free_pages(gfp, get_order(size)); in mips_dma_alloc_noncoherent() 134 dma_addr_t * dma_handle, gfp_t gfp, struct dma_attrs *attrs) in mips_dma_alloc_coherent() argument 145 return mips_dma_alloc_noncoherent(dev, size, dma_handle, gfp); in mips_dma_alloc_coherent() 147 gfp = massage_gfp_flags(dev, gfp); in mips_dma_alloc_coherent() [all …]
|
/arch/ia64/kernel/ |
D | pci-swiotlb.c | 18 dma_addr_t *dma_handle, gfp_t gfp, in ia64_swiotlb_alloc_coherent() argument 22 gfp |= GFP_DMA; in ia64_swiotlb_alloc_coherent() 23 return swiotlb_alloc_coherent(dev, size, dma_handle, gfp); in ia64_swiotlb_alloc_coherent()
|
/arch/nios2/mm/ |
D | dma-mapping.c | 25 dma_addr_t *dma_handle, gfp_t gfp) in dma_alloc_coherent() argument 30 gfp &= ~(__GFP_DMA | __GFP_HIGHMEM); in dma_alloc_coherent() 33 gfp |= __GFP_ZERO; in dma_alloc_coherent() 36 gfp |= GFP_DMA; in dma_alloc_coherent() 38 ret = (void *) __get_free_pages(gfp, get_order(size)); in dma_alloc_coherent()
|
/arch/mips/cavium-octeon/ |
D | dma-octeon.c | 160 dma_addr_t *dma_handle, gfp_t gfp, struct dma_attrs *attrs) in octeon_dma_alloc_coherent() argument 165 gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM); in octeon_dma_alloc_coherent() 169 gfp |= __GFP_DMA; in octeon_dma_alloc_coherent() 171 gfp |= __GFP_DMA; in octeon_dma_alloc_coherent() 176 gfp |= __GFP_DMA32; in octeon_dma_alloc_coherent() 182 gfp |= __GFP_NORETRY; in octeon_dma_alloc_coherent() 184 ret = swiotlb_alloc_coherent(dev, size, dma_handle, gfp); in octeon_dma_alloc_coherent()
|
/arch/powerpc/mm/ |
D | dma-noncoherent.c | 97 ppc_vm_region_alloc(struct ppc_vm_region *head, size_t size, gfp_t gfp) in ppc_vm_region_alloc() argument 103 new = kmalloc(sizeof(struct ppc_vm_region), gfp); in ppc_vm_region_alloc() 155 __dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp) in __dma_alloc_coherent() argument 196 gfp |= GFP_DMA; in __dma_alloc_coherent() 198 page = alloc_pages(gfp, order); in __dma_alloc_coherent() 216 gfp & ~(__GFP_DMA | __GFP_HIGHMEM)); in __dma_alloc_coherent()
|
/arch/m68k/kernel/ |
D | dma.c | 76 dma_addr_t *dma_handle, gfp_t gfp) in dma_alloc_coherent() argument 80 gfp &= ~(__GFP_DMA | __GFP_HIGHMEM); in dma_alloc_coherent() 83 gfp |= GFP_DMA; in dma_alloc_coherent() 84 ret = (void *)__get_free_pages(gfp, get_order(size)); in dma_alloc_coherent()
|
/arch/arm/mm/ |
D | dma-mapping.c | 149 dma_addr_t *handle, gfp_t gfp, struct dma_attrs *attrs); 258 static struct page *__dma_alloc_buffer(struct device *dev, size_t size, gfp_t gfp) in __dma_alloc_buffer() argument 263 page = alloc_pages(gfp, order); in __dma_alloc_buffer() 298 static void *__alloc_remap_buffer(struct device *dev, size_t size, gfp_t gfp, 303 __dma_alloc_remap(struct page *page, size_t size, gfp_t gfp, pgprot_t prot, in __dma_alloc_remap() argument 354 gfp_t gfp = GFP_KERNEL | GFP_DMA; in atomic_pool_init() local 366 ptr = __alloc_remap_buffer(NULL, atomic_pool_size, gfp, prot, in atomic_pool_init() 472 static void *__alloc_remap_buffer(struct device *dev, size_t size, gfp_t gfp, in __alloc_remap_buffer() argument 478 page = __dma_alloc_buffer(dev, size, gfp); in __alloc_remap_buffer() 484 ptr = __dma_alloc_remap(page, size, gfp, prot, caller); in __alloc_remap_buffer() [all …]
|
/arch/sh/mm/ |
D | consistent.c | 36 dma_addr_t *dma_handle, gfp_t gfp, in dma_generic_alloc_coherent() argument 42 gfp |= __GFP_ZERO; in dma_generic_alloc_coherent() 44 ret = (void *)__get_free_pages(gfp, order); in dma_generic_alloc_coherent()
|
/arch/tile/kernel/ |
D | pci-dma.c | 36 dma_addr_t *dma_handle, gfp_t gfp, in tile_dma_alloc_coherent() argument 46 gfp |= __GFP_ZERO; in tile_dma_alloc_coherent() 57 gfp |= GFP_DMA; in tile_dma_alloc_coherent() 61 pg = homecache_alloc_pages_node(node, gfp, order, PAGE_HOME_DMA); in tile_dma_alloc_coherent() 345 dma_addr_t *dma_handle, gfp_t gfp, in tile_pci_dma_alloc_coherent() argument 353 gfp |= __GFP_ZERO; in tile_pci_dma_alloc_coherent() 355 pg = homecache_alloc_pages_node(node, gfp, order, PAGE_HOME_DMA); in tile_pci_dma_alloc_coherent() 533 dma_addr_t *dma_handle, gfp_t gfp, in tile_swiotlb_alloc_coherent() argument 536 gfp |= GFP_DMA; in tile_swiotlb_alloc_coherent() 537 return swiotlb_alloc_coherent(dev, size, dma_handle, gfp); in tile_swiotlb_alloc_coherent()
|
/arch/x86/kernel/ |
D | pci-dma.c | 132 bool arch_dma_alloc_attrs(struct device **dev, gfp_t *gfp) in arch_dma_alloc_attrs() argument 137 *gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32); in arch_dma_alloc_attrs() 138 *gfp = dma_alloc_coherent_gfp_flags(*dev, *gfp); in arch_dma_alloc_attrs()
|
/arch/metag/kernel/ |
D | dma.c | 115 gfp_t gfp) in metag_vm_region_alloc() argument 121 new = kmalloc(sizeof(struct metag_vm_region), gfp); in metag_vm_region_alloc() 175 dma_addr_t *handle, gfp_t gfp) in dma_alloc_coherent() argument 203 gfp |= GFP_DMA; in dma_alloc_coherent() 205 page = alloc_pages(gfp, order); in dma_alloc_coherent() 223 gfp & ~(__GFP_DMA | __GFP_HIGHMEM)); in dma_alloc_coherent()
|
/arch/alpha/kernel/ |
D | pci-noop.c | 111 dma_addr_t *dma_handle, gfp_t gfp, in alpha_noop_alloc_coherent() argument 117 gfp &= ~GFP_DMA; in alpha_noop_alloc_coherent() 118 ret = (void *)__get_free_pages(gfp, get_order(size)); in alpha_noop_alloc_coherent()
|
/arch/frv/mb93090-mb00/ |
D | pci-dma.c | 21 void *dma_alloc_coherent(struct device *hwdev, size_t size, dma_addr_t *dma_handle, gfp_t gfp) in dma_alloc_coherent() argument 25 ret = consistent_alloc(gfp, size, dma_handle); in dma_alloc_coherent()
|
/arch/frv/mm/ |
D | dma-alloc.c | 81 void *consistent_alloc(gfp_t gfp, size_t size, dma_addr_t *dma_handle) in consistent_alloc() argument 95 page = __get_free_pages(gfp, order); in consistent_alloc()
|
/arch/powerpc/include/asm/ |
D | dma-mapping.h | 47 dma_addr_t *handle, gfp_t gfp); 59 #define __dma_alloc_coherent(dev, gfp, size, handle) NULL argument
|
/arch/frv/include/asm/ |
D | pci.h | 28 extern void *consistent_alloc(gfp_t gfp, size_t size, dma_addr_t *dma_handle);
|
/arch/microblaze/include/asm/ |
D | dma-mapping.h | 34 #define __dma_alloc_coherent(dev, gfp, size, handle) NULL argument
|