Home
last modified time | relevance | path

Searched refs:gfp (Results 1 – 25 of 45) sorted by relevance

12

/arch/x86/include/asm/
Ddma-mapping.h43 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/
Ddma-alloc.c24 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/
Dnlm-dma.c48 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/
Ddma.c20 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/
Ddma.c29 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/
Ddma-coherent.c41 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/
Ddma-swiotlb.c13 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/
Ddma.c14 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/
Ddma-default.c79 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/
Dpci-swiotlb.c18 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/
Ddma-mapping.c25 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/
Ddma-octeon.c160 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/
Ddma-noncoherent.c97 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/
Ddma.c76 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/
Ddma-mapping.c149 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/
Dconsistent.c36 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/
Dpci-dma.c36 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/
Dpci-dma.c132 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/
Ddma.c115 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/
Dpci-noop.c111 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/
Dpci-dma.c21 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/
Ddma-alloc.c81 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/
Ddma-mapping.h47 dma_addr_t *handle, gfp_t gfp);
59 #define __dma_alloc_coherent(dev, gfp, size, handle) NULL argument
/arch/frv/include/asm/
Dpci.h28 extern void *consistent_alloc(gfp_t gfp, size_t size, dma_addr_t *dma_handle);
/arch/microblaze/include/asm/
Ddma-mapping.h34 #define __dma_alloc_coherent(dev, gfp, size, handle) NULL argument

12