Home
last modified time | relevance | path

Searched refs:max_order (Results 1 – 16 of 16) sorted by relevance

/drivers/net/ethernet/mellanox/mlx5/core/steering/
Ddr_buddy.c11 unsigned int max_order) in mlx5dr_buddy_init() argument
15 buddy->max_order = max_order; in mlx5dr_buddy_init()
21 buddy->bitmap = kcalloc(buddy->max_order + 1, in mlx5dr_buddy_init()
24 buddy->num_free = kcalloc(buddy->max_order + 1, in mlx5dr_buddy_init()
33 for (i = 0; i <= buddy->max_order; ++i) { in mlx5dr_buddy_init()
34 unsigned int size = 1 << (buddy->max_order - i); in mlx5dr_buddy_init()
45 bitmap_set(buddy->bitmap[buddy->max_order], 0, 1); in mlx5dr_buddy_init()
47 buddy->num_free[buddy->max_order] = 1; in mlx5dr_buddy_init()
52 for (i = 0; i <= buddy->max_order; ++i) in mlx5dr_buddy_init()
67 for (i = 0; i <= buddy->max_order; ++i) in mlx5dr_buddy_cleanup()
[all …]
Dmlx5dr.h150 u32 max_order; member
172 unsigned int max_order);
/drivers/gpu/drm/i915/selftests/
Di915_buddy.c219 if (order != mm->max_order) { in igt_check_mm()
318 order = i915_random_order(mm.max_order + 1, &prng); in igt_buddy_alloc_smoke()
322 for (i = 0; i <= mm.max_order; ++i) { in igt_buddy_alloc_smoke()
324 int max_order = order[i]; in igt_buddy_alloc_smoke() local
336 pr_info("filling from max_order=%u\n", max_order); in igt_buddy_alloc_smoke()
338 order = max_order; in igt_buddy_alloc_smoke()
407 const unsigned int max_order = 16; in igt_buddy_alloc_pessimistic() local
420 err = i915_buddy_init(&mm, PAGE_SIZE << max_order, PAGE_SIZE); in igt_buddy_alloc_pessimistic()
425 GEM_BUG_ON(mm.max_order != max_order); in igt_buddy_alloc_pessimistic()
427 for (order = 0; order < max_order; order++) { in igt_buddy_alloc_pessimistic()
[all …]
Dscatterlist.c277 const unsigned long max_order = 20; /* approximating a 4GiB object */ in igt_sg_alloc() local
282 for_each_prime_number(prime, max_order) { in igt_sg_alloc()
Dintel_memory_region.c405 if (mm->max_order != expected_order) { in igt_mock_splintered_region()
407 __func__, mm->max_order, expected_order); in igt_mock_splintered_region()
/drivers/gpu/drm/i915/gem/
Di915_gem_internal.c40 int max_order; in i915_gem_object_get_pages_internal() local
43 max_order = MAX_ORDER; in i915_gem_object_get_pages_internal()
52 max_order = min(max_order, ilog2(max_segment)); in i915_gem_object_get_pages_internal()
80 int order = min(fls(npages) - 1, max_order); in i915_gem_object_get_pages_internal()
92 max_order = order; in i915_gem_object_get_pages_internal()
112 max_order = 0; in i915_gem_object_get_pages_internal()
/drivers/infiniband/hw/mthca/
Dmthca_mr.c92 for (o = order; o <= buddy->max_order; ++o) in mthca_buddy_alloc()
94 m = 1 << (buddy->max_order - o); in mthca_buddy_alloc()
140 static int mthca_buddy_init(struct mthca_buddy *buddy, int max_order) in mthca_buddy_init() argument
144 buddy->max_order = max_order; in mthca_buddy_init()
147 buddy->bits = kcalloc(buddy->max_order + 1, sizeof(long *), in mthca_buddy_init()
149 buddy->num_free = kcalloc((buddy->max_order + 1), sizeof *buddy->num_free, in mthca_buddy_init()
154 for (i = 0; i <= buddy->max_order; ++i) { in mthca_buddy_init()
155 s = BITS_TO_LONGS(1 << (buddy->max_order - i)); in mthca_buddy_init()
160 1 << (buddy->max_order - i)); in mthca_buddy_init()
163 set_bit(0, buddy->bits[buddy->max_order]); in mthca_buddy_init()
[all …]
Dmthca_dev.h206 int max_order; member
/drivers/net/ethernet/mellanox/mlx4/
Dmr.c54 for (o = order; o <= buddy->max_order; ++o) in mlx4_buddy_alloc()
56 m = 1 << (buddy->max_order - o); in mlx4_buddy_alloc()
102 static int mlx4_buddy_init(struct mlx4_buddy *buddy, int max_order) in mlx4_buddy_init() argument
106 buddy->max_order = max_order; in mlx4_buddy_init()
109 buddy->bits = kcalloc(buddy->max_order + 1, sizeof(long *), in mlx4_buddy_init()
111 buddy->num_free = kcalloc(buddy->max_order + 1, sizeof(*buddy->num_free), in mlx4_buddy_init()
116 for (i = 0; i <= buddy->max_order; ++i) { in mlx4_buddy_init()
117 s = BITS_TO_LONGS(1UL << (buddy->max_order - i)); in mlx4_buddy_init()
123 set_bit(0, buddy->bits[buddy->max_order]); in mlx4_buddy_init()
124 buddy->num_free[buddy->max_order] = 1; in mlx4_buddy_init()
[all …]
Dmlx4.h254 u32 max_order; member
/drivers/gpu/drm/i915/
Di915_buddy.c86 mm->max_order = ilog2(size) - ilog2(chunk_size); in i915_buddy_init()
88 GEM_BUG_ON(mm->max_order > I915_BUDDY_MAX_ORDER); in i915_buddy_init()
90 mm->free_list = kmalloc_array(mm->max_order + 1, in i915_buddy_init()
96 for (i = 0; i <= mm->max_order; ++i) in i915_buddy_init()
128 GEM_BUG_ON(i > mm->max_order); in i915_buddy_init()
262 for (i = order; i <= mm->max_order; ++i) { in i915_buddy_alloc()
Di915_buddy.h67 unsigned int max_order; member
Di915_ttm_buddy_manager.c80 GEM_BUG_ON(order > mm->max_order); in i915_ttm_buddy_man_alloc()
/drivers/dma-buf/heaps/
Dsystem_heap.c367 unsigned int max_order) in alloc_largest_available() argument
375 if (max_order < orders[i]) in alloc_largest_available()
394 unsigned int max_order = orders[0]; in system_heap_do_allocate() local
424 page = alloc_largest_available(size_remaining, max_order); in system_heap_do_allocate()
430 max_order = compound_order(page); in system_heap_do_allocate()
/drivers/video/fbdev/vermilion/
Dvermilion.c73 static int vmlfb_alloc_vram_area(struct vram_area *va, unsigned max_order, in vmlfb_alloc_vram_area() argument
79 max_order++; in vmlfb_alloc_vram_area()
90 __get_free_pages(flags, --max_order); in vmlfb_alloc_vram_area()
91 } while (va->logical == 0 && max_order > min_order); in vmlfb_alloc_vram_area()
97 va->size = PAGE_SIZE << max_order; in vmlfb_alloc_vram_area()
98 va->order = max_order; in vmlfb_alloc_vram_area()
/drivers/pci/
Dsetup-bus.c949 int max_order) in calculate_mem_align() argument
955 for (order = 0; order <= max_order; order++) { in calculate_mem_align()
998 int order, max_order; in pbus_size_mem() local
1013 max_order = 0; in pbus_size_mem()
1063 if (order > max_order) in pbus_size_mem()
1064 max_order = order; in pbus_size_mem()
1074 min_align = calculate_mem_align(aligns, max_order); in pbus_size_mem()