/drivers/net/ethernet/mellanox/mlx5/core/steering/ |
D | dr_buddy.c | 10 int mlx5dr_buddy_init(struct mlx5dr_icm_buddy_mem *buddy, in mlx5dr_buddy_init() argument 15 buddy->max_order = max_order; in mlx5dr_buddy_init() 17 INIT_LIST_HEAD(&buddy->list_node); in mlx5dr_buddy_init() 18 INIT_LIST_HEAD(&buddy->used_list); in mlx5dr_buddy_init() 19 INIT_LIST_HEAD(&buddy->hot_list); in mlx5dr_buddy_init() 21 buddy->bitmap = kcalloc(buddy->max_order + 1, in mlx5dr_buddy_init() 22 sizeof(*buddy->bitmap), in mlx5dr_buddy_init() 24 buddy->num_free = kcalloc(buddy->max_order + 1, in mlx5dr_buddy_init() 25 sizeof(*buddy->num_free), in mlx5dr_buddy_init() 28 if (!buddy->bitmap || !buddy->num_free) in mlx5dr_buddy_init() [all …]
|
D | dr_icm_pool.c | 138 static int dr_icm_buddy_get_ste_size(struct mlx5dr_icm_buddy_mem *buddy) in dr_icm_buddy_get_ste_size() argument 150 struct mlx5dr_icm_buddy_mem *buddy = chunk->buddy_mem; in dr_icm_chunk_ste_init() local 153 chunk->ste_arr = &buddy->ste_arr[index]; in dr_icm_chunk_ste_init() 154 chunk->miss_list = &buddy->miss_list[index]; in dr_icm_chunk_ste_init() 155 chunk->hw_ste_arr = buddy->hw_ste_arr + in dr_icm_chunk_ste_init() 156 index * dr_icm_buddy_get_ste_size(buddy); in dr_icm_chunk_ste_init() 161 struct mlx5dr_icm_buddy_mem *buddy = chunk->buddy_mem; in dr_icm_chunk_ste_cleanup() local 164 chunk->num_of_entries * dr_icm_buddy_get_ste_size(buddy)); in dr_icm_chunk_ste_cleanup() 176 struct mlx5dr_icm_buddy_mem *buddy) in dr_icm_chunk_destroy() argument 180 buddy->used_memory -= chunk->byte_size; in dr_icm_chunk_destroy() [all …]
|
D | mlx5dr.h | 171 int mlx5dr_buddy_init(struct mlx5dr_icm_buddy_mem *buddy, 173 void mlx5dr_buddy_cleanup(struct mlx5dr_icm_buddy_mem *buddy); 174 int mlx5dr_buddy_alloc_mem(struct mlx5dr_icm_buddy_mem *buddy, 177 void mlx5dr_buddy_free_mem(struct mlx5dr_icm_buddy_mem *buddy,
|
/drivers/infiniband/hw/mthca/ |
D | mthca_mr.c | 42 struct mthca_buddy *buddy; member 84 static u32 mthca_buddy_alloc(struct mthca_buddy *buddy, int order) in mthca_buddy_alloc() argument 90 spin_lock(&buddy->lock); in mthca_buddy_alloc() 92 for (o = order; o <= buddy->max_order; ++o) in mthca_buddy_alloc() 93 if (buddy->num_free[o]) { in mthca_buddy_alloc() 94 m = 1 << (buddy->max_order - o); in mthca_buddy_alloc() 95 seg = find_first_bit(buddy->bits[o], m); in mthca_buddy_alloc() 100 spin_unlock(&buddy->lock); in mthca_buddy_alloc() 104 clear_bit(seg, buddy->bits[o]); in mthca_buddy_alloc() 105 --buddy->num_free[o]; in mthca_buddy_alloc() [all …]
|
/drivers/net/ethernet/mellanox/mlx4/ |
D | mr.c | 46 static u32 mlx4_buddy_alloc(struct mlx4_buddy *buddy, int order) in mlx4_buddy_alloc() argument 52 spin_lock(&buddy->lock); in mlx4_buddy_alloc() 54 for (o = order; o <= buddy->max_order; ++o) in mlx4_buddy_alloc() 55 if (buddy->num_free[o]) { in mlx4_buddy_alloc() 56 m = 1 << (buddy->max_order - o); in mlx4_buddy_alloc() 57 seg = find_first_bit(buddy->bits[o], m); in mlx4_buddy_alloc() 62 spin_unlock(&buddy->lock); in mlx4_buddy_alloc() 66 clear_bit(seg, buddy->bits[o]); in mlx4_buddy_alloc() 67 --buddy->num_free[o]; in mlx4_buddy_alloc() 72 set_bit(seg ^ 1, buddy->bits[o]); in mlx4_buddy_alloc() [all …]
|
/drivers/gpu/drm/i915/ |
D | i915_buddy.c | 211 struct i915_buddy_block *buddy; in __i915_buddy_free() local 213 buddy = get_buddy(block); in __i915_buddy_free() 215 if (!i915_buddy_block_is_free(buddy)) in __i915_buddy_free() 218 list_del(&buddy->link); in __i915_buddy_free() 221 i915_block_free(mm, buddy); in __i915_buddy_free() 320 struct i915_buddy_block *buddy; in i915_buddy_alloc_range() local 394 buddy = get_buddy(block); in i915_buddy_alloc_range() 395 if (buddy && in i915_buddy_alloc_range() 397 i915_buddy_block_is_free(buddy))) in i915_buddy_alloc_range()
|
/drivers/gpu/drm/i915/selftests/ |
D | i915_buddy.c | 13 bool buddy) in __igt_dump_block() argument 22 yesno(buddy)); in __igt_dump_block() 28 struct i915_buddy_block *buddy; in igt_dump_block() local 32 buddy = get_buddy(block); in igt_dump_block() 33 if (buddy) in igt_dump_block() 34 __igt_dump_block(mm, buddy, true); in igt_dump_block() 40 struct i915_buddy_block *buddy; in igt_check_block() local 83 buddy = get_buddy(block); in igt_check_block() 85 if (!buddy && block->parent) { in igt_check_block() 90 if (buddy) { in igt_check_block() [all …]
|
D | i915_mock_selftests.h | 36 selftest(buddy, i915_buddy_mock_selftests)
|
/drivers/staging/r8188eu/core/ |
D | rtw_pwrctrl.c | 100 struct adapter *buddy = adapter->pbuddy_adapter; in rtw_pwr_unassociated_idle() local 124 if (buddy) { in rtw_pwr_unassociated_idle() 125 struct mlme_priv *b_pmlmepriv = &buddy->mlmepriv; in rtw_pwr_unassociated_idle() 127 struct wifidirect_info *b_pwdinfo = &buddy->wdinfo; in rtw_pwr_unassociated_idle()
|
/drivers/dma-buf/heaps/ |
D | Kconfig | 16 is backed by pages from the buddy allocator. If in doubt, say Y.
|
/drivers/staging/rtl8723bs/core/ |
D | rtw_pwrctrl.c | 92 struct adapter *buddy = adapter->pbuddy_adapter; in rtw_pwr_unassociated_idle() local 112 if (buddy) { in rtw_pwr_unassociated_idle() 113 struct mlme_priv *b_pmlmepriv = &(buddy->mlmepriv); in rtw_pwr_unassociated_idle()
|