Lines Matching defs:zone_alloc
241 int mlx4_zone_add_one(struct mlx4_zone_allocator *zone_alloc,
261 spin_lock(&zone_alloc->lock);
263 zone->uid = zone_alloc->last_uid++;
264 zone->allocator = zone_alloc;
266 if (zone_alloc->mask < mask)
267 zone_alloc->mask = mask;
269 list_for_each_entry(it, &zone_alloc->prios, prio_list)
273 if (&it->prio_list == &zone_alloc->prios || it->priority > priority)
277 spin_unlock(&zone_alloc->lock);
287 struct mlx4_zone_allocator *zone_alloc = entry->allocator;
291 if (!list_is_last(&entry->list, &zone_alloc->entries)) {
305 if (zone_alloc->flags & MLX4_ZONE_ALLOC_FLAGS_NO_OVERLAP) {
309 list_for_each_entry(it, &zone_alloc->prios, prio_list) {
315 zone_alloc->mask = mask;
321 void mlx4_zone_allocator_destroy(struct mlx4_zone_allocator *zone_alloc)
325 spin_lock(&zone_alloc->lock);
327 list_for_each_entry_safe(zone, tmp, &zone_alloc->entries, list) {
333 spin_unlock(&zone_alloc->lock);
334 kfree(zone_alloc);
343 struct mlx4_zone_allocator *zone_alloc = zone->allocator;
355 list_for_each_entry(curr_node, &zone_alloc->prios, prio_list) {
363 list_for_each_entry_continue_reverse(it, &zone_alloc->entries, list) {
377 list_for_each_entry_from(it, &zone_alloc->entries, list) {
395 if (list_is_last(&curr_node->prio_list, &zone_alloc->prios))
402 list_for_each_entry_from(curr_node, &zone_alloc->entries, list) {