Lines Matching refs:zone_alloc

242 int mlx4_zone_add_one(struct mlx4_zone_allocator *zone_alloc,  in mlx4_zone_add_one()  argument
262 spin_lock(&zone_alloc->lock); in mlx4_zone_add_one()
264 zone->uid = zone_alloc->last_uid++; in mlx4_zone_add_one()
265 zone->allocator = zone_alloc; in mlx4_zone_add_one()
267 if (zone_alloc->mask < mask) in mlx4_zone_add_one()
268 zone_alloc->mask = mask; in mlx4_zone_add_one()
270 list_for_each_entry(it, &zone_alloc->prios, prio_list) in mlx4_zone_add_one()
274 if (&it->prio_list == &zone_alloc->prios || it->priority > priority) in mlx4_zone_add_one()
278 spin_unlock(&zone_alloc->lock); in mlx4_zone_add_one()
288 struct mlx4_zone_allocator *zone_alloc = entry->allocator; in __mlx4_zone_remove_one_entry() local
292 if (!list_is_last(&entry->list, &zone_alloc->entries)) { in __mlx4_zone_remove_one_entry()
306 if (zone_alloc->flags & MLX4_ZONE_ALLOC_FLAGS_NO_OVERLAP) { in __mlx4_zone_remove_one_entry()
310 list_for_each_entry(it, &zone_alloc->prios, prio_list) { in __mlx4_zone_remove_one_entry()
316 zone_alloc->mask = mask; in __mlx4_zone_remove_one_entry()
322 void mlx4_zone_allocator_destroy(struct mlx4_zone_allocator *zone_alloc) in mlx4_zone_allocator_destroy() argument
326 spin_lock(&zone_alloc->lock); in mlx4_zone_allocator_destroy()
328 list_for_each_entry_safe(zone, tmp, &zone_alloc->entries, list) { in mlx4_zone_allocator_destroy()
334 spin_unlock(&zone_alloc->lock); in mlx4_zone_allocator_destroy()
335 kfree(zone_alloc); in mlx4_zone_allocator_destroy()
344 struct mlx4_zone_allocator *zone_alloc = zone->allocator; in __mlx4_alloc_from_zone() local
356 list_for_each_entry(curr_node, &zone_alloc->prios, prio_list) { in __mlx4_alloc_from_zone()
364 list_for_each_entry_continue_reverse(it, &zone_alloc->entries, list) { in __mlx4_alloc_from_zone()
378 list_for_each_entry_from(it, &zone_alloc->entries, list) { in __mlx4_alloc_from_zone()
396 if (list_is_last(&curr_node->prio_list, &zone_alloc->prios)) in __mlx4_alloc_from_zone()
403 list_for_each_entry_from(curr_node, &zone_alloc->entries, list) { in __mlx4_alloc_from_zone()