Home
last modified time | relevance | path

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

/lib/
Dkasprintf.c15 char *kvasprintf(gfp_t gfp, const char *fmt, va_list ap) in kvasprintf() argument
25 p = kmalloc_track_caller(first+1, gfp); in kvasprintf()
43 const char *kvasprintf_const(gfp_t gfp, const char *fmt, va_list ap) in kvasprintf_const() argument
46 return kstrdup_const(fmt, gfp); in kvasprintf_const()
48 return kstrdup_const(va_arg(ap, const char*), gfp); in kvasprintf_const()
49 return kvasprintf(gfp, fmt, ap); in kvasprintf_const()
53 char *kasprintf(gfp_t gfp, const char *fmt, ...) in kasprintf() argument
59 p = kvasprintf(gfp, fmt, ap); in kasprintf()
Dtest_printf.c551 gfp_t gfp; in flags() local
570 gfp = GFP_TRANSHUGE; in flags()
571 test("GFP_TRANSHUGE", "%pGg", &gfp); in flags()
573 gfp = GFP_ATOMIC|__GFP_DMA; in flags()
574 test("GFP_ATOMIC|GFP_DMA", "%pGg", &gfp); in flags()
576 gfp = __GFP_ATOMIC; in flags()
577 test("__GFP_ATOMIC", "%pGg", &gfp); in flags()
584 gfp = ~__GFP_BITS_MASK; in flags()
585 snprintf(cmp_buffer, BUF_SIZE, "%#lx", (unsigned long) gfp); in flags()
586 test(cmp_buffer, "%pGg", &gfp); in flags()
[all …]
Dstring_helpers.c569 char *kstrdup_quotable(const char *src, gfp_t gfp) in kstrdup_quotable() argument
581 dst = kmalloc(dlen + 1, gfp); in kstrdup_quotable()
597 char *kstrdup_quotable_cmdline(struct task_struct *task, gfp_t gfp) in kstrdup_quotable_cmdline() argument
619 quoted = kstrdup_quotable(buffer, gfp); in kstrdup_quotable_cmdline()
630 char *kstrdup_quotable_file(struct file *file, gfp_t gfp) in kstrdup_quotable_file() argument
635 return kstrdup("<unknown>", gfp); in kstrdup_quotable_file()
640 return kstrdup("<no_memory>", gfp); in kstrdup_quotable_file()
644 pathname = kstrdup("<too_long>", gfp); in kstrdup_quotable_file()
646 pathname = kstrdup_quotable(pathname, gfp); in kstrdup_quotable_file()
Dargv_split.c60 char **argv_split(gfp_t gfp, const char *str, int *argcp) in argv_split() argument
67 argv_str = kstrndup(str, KMALLOC_MAX_SIZE - 1, gfp); in argv_split()
72 argv = kmalloc_array(argc + 2, sizeof(*argv), gfp); in argv_split()
Didr.c34 unsigned long max, gfp_t gfp) in idr_alloc_u32() argument
46 slot = idr_get_free(&idr->idr_rt, &iter, gfp, max - base); in idr_alloc_u32()
79 int idr_alloc(struct idr *idr, void *ptr, int start, int end, gfp_t gfp) in idr_alloc() argument
87 ret = idr_alloc_u32(idr, ptr, &id, end > 0 ? end - 1 : INT_MAX, gfp); in idr_alloc()
117 int idr_alloc_cyclic(struct idr *idr, void *ptr, int start, int end, gfp_t gfp) in idr_alloc_cyclic() argument
125 err = idr_alloc_u32(idr, ptr, &id, max, gfp); in idr_alloc_cyclic()
128 err = idr_alloc_u32(idr, ptr, &id, max, gfp); in idr_alloc_cyclic()
380 gfp_t gfp) in ida_alloc_range() argument
453 if (xas_nomem(&xas, gfp)) { in ida_alloc_range()
465 alloc = kzalloc(sizeof(*bitmap), gfp); in ida_alloc_range()
Dxarray.c296 bool xas_nomem(struct xa_state *xas, gfp_t gfp) in xas_nomem() argument
303 gfp |= __GFP_ACCOUNT; in xas_nomem()
304 xas->xa_alloc = kmem_cache_alloc(radix_tree_node_cachep, gfp); in xas_nomem()
322 static bool __xas_nomem(struct xa_state *xas, gfp_t gfp) in __xas_nomem() argument
332 gfp |= __GFP_ACCOUNT; in __xas_nomem()
333 if (gfpflags_allow_blocking(gfp)) { in __xas_nomem()
335 xas->xa_alloc = kmem_cache_alloc(radix_tree_node_cachep, gfp); in __xas_nomem()
338 xas->xa_alloc = kmem_cache_alloc(radix_tree_node_cachep, gfp); in __xas_nomem()
366 gfp_t gfp = GFP_NOWAIT | __GFP_NOWARN; in xas_alloc() local
369 gfp |= __GFP_ACCOUNT; in xas_alloc()
[all …]
Dbucket_locks.c15 size_t max_size, unsigned int cpu_mult, gfp_t gfp, in __alloc_bucket_spinlocks() argument
34 tlocks = kvmalloc_array(size, sizeof(spinlock_t), gfp); in __alloc_bucket_spinlocks()
Dflex_proportions.c38 int fprop_global_init(struct fprop_global *p, gfp_t gfp) in fprop_global_init() argument
44 err = percpu_counter_init(&p->events, 1, gfp); in fprop_global_init()
172 int fprop_local_init_percpu(struct fprop_local_percpu *pl, gfp_t gfp) in fprop_local_init_percpu() argument
176 err = percpu_counter_init(&pl->events, 0, gfp); in fprop_local_init_percpu()
Dbtree.c93 static unsigned long *btree_node_alloc(struct btree_head *head, gfp_t gfp) in btree_node_alloc() argument
97 node = mempool_alloc(head->mempool, gfp); in btree_node_alloc()
414 gfp_t gfp) in btree_grow() argument
419 node = btree_node_alloc(head, gfp); in btree_grow()
450 gfp_t gfp) in btree_insert_level() argument
457 err = btree_grow(head, geo, gfp); in btree_insert_level()
473 new = btree_node_alloc(head, gfp); in btree_insert_level()
478 new, level + 1, gfp); in btree_insert_level()
511 unsigned long *key, void *val, gfp_t gfp) in btree_insert() argument
514 return btree_insert_level(head, geo, key, val, 1, gfp); in btree_insert()
[all …]
Dscatterlist.c488 gfp_t gfp, unsigned int *nent_p) in sgl_alloc_order() argument
507 (gfp & ~GFP_DMA) | __GFP_ZERO); in sgl_alloc_order()
515 page = alloc_pages(gfp, order); in sgl_alloc_order()
540 struct scatterlist *sgl_alloc(unsigned long long length, gfp_t gfp, in sgl_alloc() argument
543 return sgl_alloc_order(length, 0, false, gfp, nent_p); in sgl_alloc()
Dpercpu_counter.c122 int __percpu_counter_init(struct percpu_counter *fbc, s64 amount, gfp_t gfp, in __percpu_counter_init() argument
130 fbc->counters = alloc_percpu_gfp(s32, gfp); in __percpu_counter_init()
Dradix-tree.c417 static int radix_tree_extend(struct radix_tree_root *root, gfp_t gfp, in radix_tree_extend() argument
434 struct radix_tree_node *node = radix_tree_node_alloc(gfp, NULL, in radix_tree_extend()
616 gfp_t gfp = root_gfp_mask(root); in __radix_tree_create() local
622 int error = radix_tree_extend(root, gfp, max, shift); in __radix_tree_create()
633 child = radix_tree_node_alloc(gfp, node, root, shift, in __radix_tree_create()
1486 struct radix_tree_iter *iter, gfp_t gfp, in idr_get_free() argument
1502 int error = radix_tree_extend(root, gfp, start, shift); in idr_get_free()
1515 child = radix_tree_node_alloc(gfp, node, root, shift, in idr_get_free()
Dpercpu-refcount.c61 unsigned int flags, gfp_t gfp) in percpu_ref_init() argument
68 __alloc_percpu_gfp(sizeof(unsigned long), align, gfp); in percpu_ref_init()
Drhashtable.c140 gfp_t gfp) in nested_bucket_table_alloc() argument
151 tbl = kzalloc(size, gfp); in nested_bucket_table_alloc()
168 gfp_t gfp) in bucket_table_alloc() argument
175 tbl = kvzalloc(struct_size(tbl, buckets, nbuckets), gfp); in bucket_table_alloc()
179 if (tbl == NULL && (gfp & ~__GFP_NOFAIL) != GFP_KERNEL) { in bucket_table_alloc()
180 tbl = nested_bucket_table_alloc(ht, nbuckets, gfp); in bucket_table_alloc()
Dtest_xarray.c37 static void *xa_store_index(struct xarray *xa, unsigned long index, gfp_t gfp) in xa_store_index() argument
39 return xa_store(xa, index, xa_mk_index(index), gfp); in xa_store_index()
48 static void xa_alloc_index(struct xarray *xa, unsigned long index, gfp_t gfp) in xa_alloc_index() argument
53 gfp) != 0); in xa_alloc_index()
69 unsigned order, void *entry, gfp_t gfp) in xa_store_order() argument
78 } while (xas_nomem(&xas, gfp)); in xa_store_order()
Dtest_firmware.c165 static int __kstrncpy(char **dst, const char *name, size_t count, gfp_t gfp) in __kstrncpy() argument
167 *dst = kstrndup(name, count, gfp); in __kstrncpy()
Dtest_kmod.c604 static int __kstrncpy(char **dst, const char *name, size_t count, gfp_t gfp) in __kstrncpy() argument
606 *dst = kstrndup(name, count, gfp); in __kstrncpy()
Ddebugobjects.c131 gfp_t gfp = GFP_ATOMIC | __GFP_NORETRY | __GFP_NOWARN; in fill_pool() local
166 new[cnt] = kmem_cache_zalloc(obj_cache, gfp); in fill_pool()
/lib/reed_solomon/
Dreed_solomon.c71 int fcr, int prim, int nroots, gfp_t gfp) in codec_init() argument
76 rs = kzalloc(sizeof(*rs), gfp); in codec_init()
91 rs->alpha_to = kmalloc_array(rs->nn + 1, sizeof(uint16_t), gfp); in codec_init()
95 rs->index_of = kmalloc_array(rs->nn + 1, sizeof(uint16_t), gfp); in codec_init()
99 rs->genpoly = kmalloc_array(rs->nroots + 1, sizeof(uint16_t), gfp); in codec_init()
215 int prim, int nroots, gfp_t gfp) in init_rs_internal() argument
237 rs = kzalloc(sizeof(*rs) + bsize, gfp); in init_rs_internal()
266 rs->codec = codec_init(symsize, gfpoly, gffunc, fcr, prim, nroots, gfp); in init_rs_internal()
289 int nroots, gfp_t gfp) in init_rs_gfp() argument
291 return init_rs_internal(symsize, gfpoly, NULL, fcr, prim, nroots, gfp); in init_rs_gfp()