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;
319 void mlx4_zone_allocator_destroy(struct mlx4_zone_allocator *zone_alloc)
323 spin_lock(&zone_alloc->lock);
325 list_for_each_entry_safe(zone, tmp, &zone_alloc->entries, list) {
331 spin_unlock(&zone_alloc->lock);
332 kfree(zone_alloc);
341 struct mlx4_zone_allocator *zone_alloc = zone->allocator;
353 list_for_each_entry(curr_node, &zone_alloc->prios, prio_list) {
361 list_for_each_entry_continue_reverse(it, &zone_alloc->entries, list) {
375 list_for_each_entry_from(it, &zone_alloc->entries, list) {
393 if (list_is_last(&curr_node->prio_list, &zone_alloc->prios))
400 list_for_each_entry_from(curr_node, &zone_alloc->entries, list) {