Home
last modified time | relevance | path

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

12

/arch/x86/include/asm/
Ddma-mapping.h34 bool arch_dma_alloc_attrs(struct device **dev, gfp_t *gfp);
78 gfp_t gfp) in dma_alloc_coherent_mask() argument
84 dma_mask = (gfp & GFP_DMA) ? DMA_BIT_MASK(24) : DMA_BIT_MASK(32); in dma_alloc_coherent_mask()
89 static inline gfp_t dma_alloc_coherent_gfp_flags(struct device *dev, gfp_t gfp) in dma_alloc_coherent_gfp_flags() argument
91 unsigned long dma_mask = dma_alloc_coherent_mask(dev, gfp); in dma_alloc_coherent_gfp_flags()
94 gfp |= GFP_DMA; in dma_alloc_coherent_gfp_flags()
96 if (dma_mask <= DMA_BIT_MASK(32) && !(gfp & GFP_DMA)) in dma_alloc_coherent_gfp_flags()
97 gfp |= GFP_DMA32; in dma_alloc_coherent_gfp_flags()
99 return gfp; in dma_alloc_coherent_gfp_flags()
Dpgalloc.h98 gfp_t gfp = GFP_KERNEL_ACCOUNT | __GFP_ZERO; in pmd_alloc_one() local
101 gfp &= ~__GFP_ACCOUNT; in pmd_alloc_one()
102 page = alloc_pages(gfp, 0); in pmd_alloc_one()
146 gfp_t gfp = GFP_KERNEL_ACCOUNT; in pud_alloc_one() local
149 gfp &= ~__GFP_ACCOUNT; in pud_alloc_one()
150 return (pud_t *)get_zeroed_page(gfp); in pud_alloc_one()
176 gfp_t gfp = GFP_KERNEL_ACCOUNT; in p4d_alloc_one() local
179 gfp &= ~__GFP_ACCOUNT; in p4d_alloc_one()
180 return (p4d_t *)get_zeroed_page(gfp); in p4d_alloc_one()
/arch/powerpc/include/asm/
Dpgalloc.h8 static inline gfp_t pgtable_gfp_flags(struct mm_struct *mm, gfp_t gfp) in pgtable_gfp_flags() argument
11 return gfp; in pgtable_gfp_flags()
12 return gfp | __GFP_ACCOUNT; in pgtable_gfp_flags()
15 static inline gfp_t pgtable_gfp_flags(struct mm_struct *mm, gfp_t gfp) in pgtable_gfp_flags() argument
17 return gfp | __GFP_ACCOUNT; in pgtable_gfp_flags()
/arch/mips/netlogic/common/
Dnlm-dma.c48 dma_addr_t *dma_handle, gfp_t gfp, unsigned long 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.c21 dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs) in v32_dma_alloc() argument
26 gfp &= ~(__GFP_DMA | __GFP_HIGHMEM); in v32_dma_alloc()
29 gfp |= GFP_DMA; in v32_dma_alloc()
31 ret = (void *)__get_free_pages(gfp, get_order(size)); in v32_dma_alloc()
/arch/mips/loongson64/common/
Ddma-swiotlb.c14 dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs) in loongson_dma_alloc_coherent() argument
19 gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM); in loongson_dma_alloc_coherent()
24 gfp |= __GFP_DMA; in loongson_dma_alloc_coherent()
27 gfp |= __GFP_DMA32; in loongson_dma_alloc_coherent()
29 gfp |= __GFP_NORETRY; in loongson_dma_alloc_coherent()
31 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/mn10300/mm/
Ddma-alloc.c24 dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs) in mn10300_dma_alloc() argument
30 dev ? dev_name(dev) : "?", size, gfp); in mn10300_dma_alloc()
41 gfp &= ~(__GFP_DMA | __GFP_HIGHMEM); in mn10300_dma_alloc()
44 gfp |= GFP_DMA; in mn10300_dma_alloc()
46 addr = __get_free_pages(gfp, get_order(size)); in mn10300_dma_alloc()
/arch/ia64/kernel/
Dpci-swiotlb.c19 dma_addr_t *dma_handle, gfp_t gfp, in ia64_swiotlb_alloc_coherent() argument
23 gfp |= GFP_DMA; in ia64_swiotlb_alloc_coherent()
24 return swiotlb_alloc_coherent(dev, size, dma_handle, gfp); in ia64_swiotlb_alloc_coherent()
/arch/x86/mm/
Dpti.c158 gfp_t gfp = (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO); in pti_user_pagetable_walk_p4d() local
166 unsigned long new_p4d_page = __get_free_page(gfp); in pti_user_pagetable_walk_p4d()
185 gfp_t gfp = (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO); in pti_user_pagetable_walk_pmd() local
195 unsigned long new_pud_page = __get_free_page(gfp); in pti_user_pagetable_walk_pmd()
209 unsigned long new_pmd_page = __get_free_page(gfp); in pti_user_pagetable_walk_pmd()
231 gfp_t gfp = (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO); in pti_user_pagetable_walk_pte() local
246 unsigned long new_pte_page = __get_free_page(gfp); in pti_user_pagetable_walk_pte()
/arch/mips/mm/
Ddma-default.c92 static gfp_t massage_gfp_flags(const struct device *dev, gfp_t gfp) in massage_gfp_flags() argument
97 gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM); in massage_gfp_flags()
125 gfp |= __GFP_NORETRY; in massage_gfp_flags()
127 return gfp | dma_flag; in massage_gfp_flags()
131 dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs) in mips_dma_alloc_coherent() argument
137 gfp = massage_gfp_flags(dev, gfp); in mips_dma_alloc_coherent()
139 if (IS_ENABLED(CONFIG_DMA_CMA) && gfpflags_allow_blocking(gfp)) in mips_dma_alloc_coherent()
141 gfp); in mips_dma_alloc_coherent()
143 page = alloc_pages(gfp, get_order(size)); in mips_dma_alloc_coherent()
/arch/arm/mm/
Ddma-mapping.c48 gfp_t gfp; member
207 dma_addr_t *handle, gfp_t gfp, unsigned long attrs);
322 gfp_t gfp, int coherent_flag) in __dma_alloc_buffer() argument
327 page = alloc_pages(gfp, order); in __dma_alloc_buffer()
359 int coherent_flag, gfp_t gfp);
361 static void *__alloc_remap_buffer(struct device *dev, size_t size, gfp_t gfp,
366 __dma_alloc_remap(struct page *page, size_t size, gfp_t gfp, pgprot_t prot, in __dma_alloc_remap() argument
417 gfp_t gfp = GFP_KERNEL | GFP_DMA; in atomic_pool_init() local
433 ptr = __alloc_remap_buffer(NULL, atomic_pool_size, gfp, prot, in atomic_pool_init()
539 static void *__alloc_remap_buffer(struct device *dev, size_t size, gfp_t gfp, in __alloc_remap_buffer() argument
[all …]
/arch/nios2/mm/
Ddma-mapping.c62 dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs) in nios2_dma_alloc() argument
67 gfp &= ~(__GFP_DMA | __GFP_HIGHMEM); in nios2_dma_alloc()
70 gfp |= __GFP_ZERO; in nios2_dma_alloc()
73 gfp |= GFP_DMA; in nios2_dma_alloc()
75 ret = (void *) __get_free_pages(gfp, get_order(size)); in nios2_dma_alloc()
/arch/mips/cavium-octeon/
Ddma-octeon.c160 dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs) in octeon_dma_alloc_coherent() argument
165 gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM); in octeon_dma_alloc_coherent()
168 gfp |= __GFP_DMA; in octeon_dma_alloc_coherent()
171 gfp |= __GFP_DMA; in octeon_dma_alloc_coherent()
174 gfp |= __GFP_DMA32; in octeon_dma_alloc_coherent()
177 gfp |= __GFP_NORETRY; in octeon_dma_alloc_coherent()
179 ret = swiotlb_alloc_coherent(dev, size, dma_handle, gfp); in octeon_dma_alloc_coherent()
/arch/alpha/kernel/
Dpci-noop.c108 dma_addr_t *dma_handle, gfp_t gfp, in alpha_noop_alloc_coherent() argument
114 gfp &= ~GFP_DMA; in alpha_noop_alloc_coherent()
115 ret = (void *)__get_free_pages(gfp, get_order(size)); in alpha_noop_alloc_coherent()
/arch/m68k/kernel/
Ddma.c76 dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs) in m68k_dma_alloc() argument
80 gfp &= ~(__GFP_DMA | __GFP_HIGHMEM); in m68k_dma_alloc()
83 gfp |= GFP_DMA; in m68k_dma_alloc()
84 ret = (void *)__get_free_pages(gfp, get_order(size)); in m68k_dma_alloc()
/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/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()
339 dma_addr_t *dma_handle, gfp_t gfp, in tile_pci_dma_alloc_coherent() argument
347 gfp |= __GFP_ZERO; in tile_pci_dma_alloc_coherent()
349 pg = homecache_alloc_pages_node(node, gfp, order, PAGE_HOME_DMA); in tile_pci_dma_alloc_coherent()
513 dma_addr_t *dma_handle, gfp_t gfp, in tile_swiotlb_alloc_coherent() argument
516 gfp |= GFP_DMA; in tile_swiotlb_alloc_coherent()
517 return swiotlb_alloc_coherent(dev, size, dma_handle, gfp); in tile_swiotlb_alloc_coherent()
/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/x86/kernel/
Dpci-dma.c137 bool arch_dma_alloc_attrs(struct device **dev, gfp_t *gfp) in arch_dma_alloc_attrs() argument
142 *gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32); in arch_dma_alloc_attrs()
143 *gfp = dma_alloc_coherent_gfp_flags(*dev, *gfp); in arch_dma_alloc_attrs()
/arch/frv/mb93090-mb00/
Dpci-dma.c22 dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs) in frv_dma_alloc() argument
26 ret = consistent_alloc(gfp, size, dma_handle); in frv_dma_alloc()
/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/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, unsigned long attrs) in metag_dma_alloc() argument
203 gfp |= GFP_DMA; in metag_dma_alloc()
205 page = alloc_pages(gfp, order); in metag_dma_alloc()
223 gfp & ~(__GFP_DMA | __GFP_HIGHMEM)); in metag_dma_alloc()
/arch/frv/include/asm/
Dpci.h27 extern void *consistent_alloc(gfp_t gfp, size_t size, dma_addr_t *dma_handle);
/arch/c6x/include/asm/
Ddma-mapping.h24 gfp_t gfp, unsigned long attrs);

12