Lines Matching refs:zone_alloc

241 int mlx4_zone_add_one(struct mlx4_zone_allocator *zone_alloc,  in mlx4_zone_add_one()  argument
261 spin_lock(&zone_alloc->lock); in mlx4_zone_add_one()
263 zone->uid = zone_alloc->last_uid++; in mlx4_zone_add_one()
264 zone->allocator = zone_alloc; in mlx4_zone_add_one()
266 if (zone_alloc->mask < mask) in mlx4_zone_add_one()
267 zone_alloc->mask = mask; in mlx4_zone_add_one()
269 list_for_each_entry(it, &zone_alloc->prios, prio_list) in mlx4_zone_add_one()
273 if (&it->prio_list == &zone_alloc->prios || it->priority > priority) in mlx4_zone_add_one()
277 spin_unlock(&zone_alloc->lock); in mlx4_zone_add_one()
287 struct mlx4_zone_allocator *zone_alloc = entry->allocator; in __mlx4_zone_remove_one_entry() local
291 if (!list_is_last(&entry->list, &zone_alloc->entries)) { in __mlx4_zone_remove_one_entry()
305 if (zone_alloc->flags & MLX4_ZONE_ALLOC_FLAGS_NO_OVERLAP) { in __mlx4_zone_remove_one_entry()
309 list_for_each_entry(it, &zone_alloc->prios, prio_list) { in __mlx4_zone_remove_one_entry()
315 zone_alloc->mask = mask; in __mlx4_zone_remove_one_entry()
319 void mlx4_zone_allocator_destroy(struct mlx4_zone_allocator *zone_alloc) in mlx4_zone_allocator_destroy() argument
323 spin_lock(&zone_alloc->lock); in mlx4_zone_allocator_destroy()
325 list_for_each_entry_safe(zone, tmp, &zone_alloc->entries, list) { in mlx4_zone_allocator_destroy()
331 spin_unlock(&zone_alloc->lock); in mlx4_zone_allocator_destroy()
332 kfree(zone_alloc); in mlx4_zone_allocator_destroy()
341 struct mlx4_zone_allocator *zone_alloc = zone->allocator; in __mlx4_alloc_from_zone() local
353 list_for_each_entry(curr_node, &zone_alloc->prios, prio_list) { in __mlx4_alloc_from_zone()
361 list_for_each_entry_continue_reverse(it, &zone_alloc->entries, list) { in __mlx4_alloc_from_zone()
375 list_for_each_entry_from(it, &zone_alloc->entries, list) { in __mlx4_alloc_from_zone()
393 if (list_is_last(&curr_node->prio_list, &zone_alloc->prios)) in __mlx4_alloc_from_zone()
400 list_for_each_entry_from(curr_node, &zone_alloc->entries, list) { in __mlx4_alloc_from_zone()