• Home
  • Raw
  • Download

Lines Matching full:zones

227 	struct mlx4_zone_allocator *zones = kmalloc(sizeof(*zones), GFP_KERNEL);  in mlx4_zone_allocator_create()  local
229 if (NULL == zones) in mlx4_zone_allocator_create()
232 INIT_LIST_HEAD(&zones->entries); in mlx4_zone_allocator_create()
233 INIT_LIST_HEAD(&zones->prios); in mlx4_zone_allocator_create()
234 spin_lock_init(&zones->lock); in mlx4_zone_allocator_create()
235 zones->last_uid = 0; in mlx4_zone_allocator_create()
236 zones->mask = 0; in mlx4_zone_allocator_create()
237 zones->flags = flags; in mlx4_zone_allocator_create()
239 return zones; in mlx4_zone_allocator_create()
427 struct mlx4_zone_allocator *zones, u32 uid) in __mlx4_find_zone_by_uid() argument
431 list_for_each_entry(zone, &zones->entries, list) { in __mlx4_find_zone_by_uid()
439 struct mlx4_bitmap *mlx4_zone_get_bitmap(struct mlx4_zone_allocator *zones, u32 uid) in mlx4_zone_get_bitmap() argument
444 spin_lock(&zones->lock); in mlx4_zone_get_bitmap()
446 zone = __mlx4_find_zone_by_uid(zones, uid); in mlx4_zone_get_bitmap()
450 spin_unlock(&zones->lock); in mlx4_zone_get_bitmap()
455 int mlx4_zone_remove_one(struct mlx4_zone_allocator *zones, u32 uid) in mlx4_zone_remove_one() argument
460 spin_lock(&zones->lock); in mlx4_zone_remove_one()
462 zone = __mlx4_find_zone_by_uid(zones, uid); in mlx4_zone_remove_one()
472 spin_unlock(&zones->lock); in mlx4_zone_remove_one()
480 struct mlx4_zone_allocator *zones, u32 obj) in __mlx4_find_zone_by_uid_unique() argument
491 list_for_each_entry(zone, &zones->entries, list) { in __mlx4_find_zone_by_uid_unique()
493 u32 mobj = (obj - zone->offset) & zones->mask; in __mlx4_find_zone_by_uid_unique()
509 u32 mlx4_zone_alloc_entries(struct mlx4_zone_allocator *zones, u32 uid, int count, in mlx4_zone_alloc_entries() argument
515 spin_lock(&zones->lock); in mlx4_zone_alloc_entries()
517 zone = __mlx4_find_zone_by_uid(zones, uid); in mlx4_zone_alloc_entries()
525 spin_unlock(&zones->lock); in mlx4_zone_alloc_entries()
530 u32 mlx4_zone_free_entries(struct mlx4_zone_allocator *zones, u32 uid, u32 obj, u32 count) in mlx4_zone_free_entries() argument
535 spin_lock(&zones->lock); in mlx4_zone_free_entries()
537 zone = __mlx4_find_zone_by_uid(zones, uid); in mlx4_zone_free_entries()
547 spin_unlock(&zones->lock); in mlx4_zone_free_entries()
552 u32 mlx4_zone_free_entries_unique(struct mlx4_zone_allocator *zones, u32 obj, u32 count) in mlx4_zone_free_entries_unique() argument
557 if (!(zones->flags & MLX4_ZONE_ALLOC_FLAGS_NO_OVERLAP)) in mlx4_zone_free_entries_unique()
560 spin_lock(&zones->lock); in mlx4_zone_free_entries_unique()
562 zone = __mlx4_find_zone_by_uid_unique(zones, obj); in mlx4_zone_free_entries_unique()
573 spin_unlock(&zones->lock); in mlx4_zone_free_entries_unique()