Home
last modified time | relevance | path

Searched refs:alloc (Results 1 – 25 of 95) sorted by relevance

1234

/drivers/infiniband/hw/cxgb4/
Did_table.c44 u32 c4iw_id_alloc(struct c4iw_id_table *alloc) in c4iw_id_alloc() argument
49 spin_lock_irqsave(&alloc->lock, flags); in c4iw_id_alloc()
51 obj = find_next_zero_bit(alloc->table, alloc->max, alloc->last); in c4iw_id_alloc()
52 if (obj >= alloc->max) in c4iw_id_alloc()
53 obj = find_first_zero_bit(alloc->table, alloc->max); in c4iw_id_alloc()
55 if (obj < alloc->max) { in c4iw_id_alloc()
56 if (alloc->flags & C4IW_ID_TABLE_F_RANDOM) in c4iw_id_alloc()
57 alloc->last += prandom_u32() % RANDOM_SKIP; in c4iw_id_alloc()
59 alloc->last = obj + 1; in c4iw_id_alloc()
60 if (alloc->last >= alloc->max) in c4iw_id_alloc()
[all …]
/drivers/infiniband/hw/mthca/
Dmthca_allocator.c40 u32 mthca_alloc(struct mthca_alloc *alloc) in mthca_alloc() argument
45 spin_lock_irqsave(&alloc->lock, flags); in mthca_alloc()
47 obj = find_next_zero_bit(alloc->table, alloc->max, alloc->last); in mthca_alloc()
48 if (obj >= alloc->max) { in mthca_alloc()
49 alloc->top = (alloc->top + alloc->max) & alloc->mask; in mthca_alloc()
50 obj = find_first_zero_bit(alloc->table, alloc->max); in mthca_alloc()
53 if (obj < alloc->max) { in mthca_alloc()
54 set_bit(obj, alloc->table); in mthca_alloc()
55 obj |= alloc->top; in mthca_alloc()
59 spin_unlock_irqrestore(&alloc->lock, flags); in mthca_alloc()
[all …]
Dmthca_uar.c40 uar->index = mthca_alloc(&dev->uar_table.alloc); in mthca_uar_alloc()
51 mthca_free(&dev->uar_table.alloc, uar->index); in mthca_uar_free()
58 ret = mthca_alloc_init(&dev->uar_table.alloc, in mthca_init_uar_table()
67 mthca_alloc_cleanup(&dev->uar_table.alloc); in mthca_init_uar_table()
77 mthca_alloc_cleanup(&dev->uar_table.alloc); in mthca_cleanup_uar_table()
Dmthca_pd.c46 pd->pd_num = mthca_alloc(&dev->pd_table.alloc); in mthca_pd_alloc()
56 mthca_free(&dev->pd_table.alloc, pd->pd_num); in mthca_pd_alloc()
66 mthca_free(&dev->pd_table.alloc, pd->pd_num); in mthca_pd_free()
71 return mthca_alloc_init(&dev->pd_table.alloc, in mthca_init_pd_table()
80 mthca_alloc_cleanup(&dev->pd_table.alloc); in mthca_cleanup_pd_table()
Dmthca_dev.h195 struct mthca_alloc alloc; member
201 struct mthca_alloc alloc; member
227 struct mthca_alloc alloc; member
240 struct mthca_alloc alloc; member
247 struct mthca_alloc alloc; member
254 struct mthca_alloc alloc; member
270 struct mthca_alloc alloc; member
275 struct mthca_alloc alloc; member
414 u32 mthca_alloc(struct mthca_alloc *alloc);
415 void mthca_free(struct mthca_alloc *alloc, u32 obj);
[all …]
Dmthca_mcg.c148 index = mthca_alloc(&dev->mcg_table.alloc); in mthca_multicast_attach()
206 mthca_free(&dev->mcg_table.alloc, index); in mthca_multicast_attach()
286 mthca_free(&dev->mcg_table.alloc, amgm_index_to_free); in mthca_multicast_detach()
305 mthca_free(&dev->mcg_table.alloc, index); in mthca_multicast_detach()
320 err = mthca_alloc_init(&dev->mcg_table.alloc, in mthca_init_mcg_table()
334 mthca_alloc_cleanup(&dev->mcg_table.alloc); in mthca_cleanup_mcg_table()
Dmthca_av.c172 index = mthca_alloc(&dev->av_table.alloc); in mthca_create_ah()
244 mthca_free(&dev->av_table.alloc, in mthca_destroy_ah()
331 err = mthca_alloc_init(&dev->av_table.alloc, in mthca_init_av_table()
361 mthca_alloc_cleanup(&dev->av_table.alloc); in mthca_init_av_table()
373 mthca_alloc_cleanup(&dev->av_table.alloc); in mthca_cleanup_av_table()
Dmthca_srq.c229 srq->srqn = mthca_alloc(&dev->srq_table.alloc); in mthca_alloc_srq()
314 mthca_free(&dev->srq_table.alloc, srq->srqn); in mthca_alloc_srq()
360 mthca_free(&dev->srq_table.alloc, srq->srqn); in mthca_free_srq()
674 err = mthca_alloc_init(&dev->srq_table.alloc, in mthca_init_srq_table()
684 mthca_alloc_cleanup(&dev->srq_table.alloc); in mthca_init_srq_table()
695 mthca_alloc_cleanup(&dev->srq_table.alloc); in mthca_cleanup_srq_table()
Dmthca_cq.c787 cq->cqn = mthca_alloc(&dev->cq_table.alloc); in mthca_init_cq()
890 mthca_free(&dev->cq_table.alloc, cq->cqn); in mthca_init_cq()
955 mthca_free(&dev->cq_table.alloc, cq->cqn); in mthca_free_cq()
965 err = mthca_alloc_init(&dev->cq_table.alloc, in mthca_init_cq_table()
975 mthca_alloc_cleanup(&dev->cq_table.alloc); in mthca_init_cq_table()
983 mthca_alloc_cleanup(&dev->cq_table.alloc); in mthca_cleanup_cq_table()
/drivers/char/agp/
Dcompat_ioctl.c151 struct agp_allocate32 alloc; in compat_agpioc_allocate_wrap() local
154 if (copy_from_user(&alloc, arg, sizeof(alloc))) in compat_agpioc_allocate_wrap()
157 memory = agp_allocate_memory_wrap(alloc.pg_count, alloc.type); in compat_agpioc_allocate_wrap()
162 alloc.key = memory->key; in compat_agpioc_allocate_wrap()
163 alloc.physical = memory->physical; in compat_agpioc_allocate_wrap()
165 if (copy_to_user(arg, &alloc, sizeof(alloc))) { in compat_agpioc_allocate_wrap()
Dfrontend.c888 struct agp_allocate alloc; in agpioc_allocate_wrap() local
891 if (copy_from_user(&alloc, arg, sizeof(struct agp_allocate))) in agpioc_allocate_wrap()
894 if (alloc.type >= AGP_USER_TYPES) in agpioc_allocate_wrap()
897 memory = agp_allocate_memory_wrap(alloc.pg_count, alloc.type); in agpioc_allocate_wrap()
902 alloc.key = memory->key; in agpioc_allocate_wrap()
903 alloc.physical = memory->physical; in agpioc_allocate_wrap()
905 if (copy_to_user(arg, &alloc, sizeof(struct agp_allocate))) { in agpioc_allocate_wrap()
/drivers/gpu/drm/radeon/
Dradeon_mem.c223 drm_radeon_mem_alloc_t *alloc = data; in radeon_mem_alloc() local
231 heap = get_heap(dev_priv, alloc->region); in radeon_mem_alloc()
238 if (alloc->alignment < 12) in radeon_mem_alloc()
239 alloc->alignment = 12; in radeon_mem_alloc()
241 block = alloc_block(*heap, alloc->size, alloc->alignment, file_priv); in radeon_mem_alloc()
246 if (DRM_COPY_TO_USER(alloc->region_offset, &block->start, in radeon_mem_alloc()
/drivers/staging/tidspbridge/include/dspbridge/
Ddynamic_loader.h79 struct dynamic_loader_allocate *alloc,
115 struct dynamic_loader_allocate *alloc,
146 struct dynamic_loader_allocate *alloc,
/drivers/uwb/
Ddrp-ie.c299 const struct uwb_drp_alloc *alloc; in uwb_drp_ie_to_bm() local
308 alloc = &drp_ie->allocs[cnt]; in uwb_drp_ie_to_bm()
309 zone_bm = le16_to_cpu(alloc->zone_bm); in uwb_drp_ie_to_bm()
310 mas_bm = le16_to_cpu(alloc->mas_bm); in uwb_drp_ie_to_bm()
/drivers/media/rc/
Drc-main.c127 rc_map->alloc = roundup_pow_of_two(size * sizeof(struct rc_map_table)); in ir_create_table()
128 rc_map->size = rc_map->alloc / sizeof(struct rc_map_table); in ir_create_table()
129 rc_map->scan = kmalloc(rc_map->alloc, GFP_KERNEL); in ir_create_table()
134 rc_map->size, rc_map->alloc); in ir_create_table()
163 unsigned int oldalloc = rc_map->alloc; in ir_resize_table()
170 if (rc_map->alloc >= IR_TAB_MAX_SIZE) in ir_resize_table()
194 rc_map->alloc = newalloc; in ir_resize_table()
195 rc_map->size = rc_map->alloc / sizeof(struct rc_map_table); in ir_resize_table()
381 rc_map->size, rc_map->alloc); in ir_setkeytable()
/drivers/staging/tidspbridge/dynload/
Dcload.c122 struct dynamic_loader_allocate *alloc, in dynamic_load_module() argument
153 dl_state.myalloc = alloc; in dynamic_load_module()
191 dynamic_unload_module(dl_state.myhandle, syms, alloc, in dynamic_load_module()
231 struct dynamic_loader_allocate *alloc, in dynamic_open_module() argument
262 dl_state.myalloc = alloc; in dynamic_open_module()
296 dynamic_unload_module(dl_state.myhandle, syms, alloc, in dynamic_open_module()
1799 struct dynamic_loader_allocate *alloc, in dynamic_unload_module() argument
1826 if (alloc) in dynamic_unload_module()
1830 alloc->dload_deallocate(alloc, asecs++); in dynamic_unload_module()
1894 if (alloc) in dynamic_unload_module()
[all …]
/drivers/scsi/arm/
Dqueue.c73 queue->alloc = q = kmalloc(sizeof(QE_t) * nqueues, GFP_KERNEL); in queue_initialise()
82 return queue->alloc != NULL; in queue_initialise()
94 kfree(queue->alloc); in queue_free()
Dqueue.h17 void *alloc; /* start of allocated mem */ member
/drivers/gpu/drm/nouveau/core/core/
Dgpuobj.c86 ret = imem->alloc(imem, parent, size, align, &parent); in nouveau_gpuobj_create_()
94 if (bar && bar->alloc) { in nouveau_gpuobj_create_()
98 if (!bar->alloc(bar, parent, node, &pargpu)) { in nouveau_gpuobj_create_()
/drivers/md/bcache/
Drequest.c302 struct bkey *alloc) in pick_data_bucket() argument
315 if (!ret->sectors_free && KEY_PTRS(alloc)) { in pick_data_bucket()
317 bkey_copy(&ret->key, alloc); in pick_data_bucket()
318 bkey_init(alloc); in pick_data_bucket()
342 BKEY_PADDED(key) alloc; in bch_alloc_sectors()
358 bkey_init(&alloc.key); in bch_alloc_sectors()
361 while (!(b = pick_data_bucket(c, k, s->task, &alloc.key))) { in bch_alloc_sectors()
368 if (bch_bucket_alloc_set(c, watermark, &alloc.key, 1, w)) in bch_alloc_sectors()
379 if (KEY_PTRS(&alloc.key)) in bch_alloc_sectors()
380 __bkey_put(c, &alloc.key); in bch_alloc_sectors()
DMakefile4 bcache-y := alloc.o btree.o bset.o io.o journal.o writeback.o\
/drivers/net/ethernet/micrel/
Dksz884x.c1013 int alloc; member
3821 int alloc = info->alloc; in ksz_check_desc_num() local
3825 while (!(alloc & 1)) { in ksz_check_desc_num()
3827 alloc >>= 1; in ksz_check_desc_num()
3829 if (alloc != 1 || shift < MIN_DESC_SHIFT) { in ksz_check_desc_num()
3831 while (alloc) { in ksz_check_desc_num()
3833 alloc >>= 1; in ksz_check_desc_num()
3837 alloc = 1 << shift; in ksz_check_desc_num()
3838 info->alloc = alloc; in ksz_check_desc_num()
3840 info->mask = info->alloc - 1; in ksz_check_desc_num()
[all …]
/drivers/misc/
Dvmw_balloon.c155 unsigned int alloc; member
419 STATS_INC(b->stats.alloc); in vmballoon_reserve_page()
727 stats->alloc, stats->alloc_fail, in vmballoon_debug_show()
/drivers/net/ethernet/
Djme.c568 txring->alloc = dma_alloc_coherent(&(jme->pdev->dev), in jme_setup_tx_resources()
573 if (!txring->alloc) in jme_setup_tx_resources()
579 txring->desc = (void *)ALIGN((unsigned long)(txring->alloc), in jme_setup_tx_resources()
594 memset(txring->alloc, 0, TX_RING_ALLOC_SIZE(jme->tx_ring_size)); in jme_setup_tx_resources()
603 txring->alloc, in jme_setup_tx_resources()
622 if (txring->alloc) { in jme_free_tx_resources()
640 txring->alloc, in jme_free_tx_resources()
643 txring->alloc = NULL; in jme_free_tx_resources()
805 if (rxring->alloc) { in jme_free_rx_resources()
814 rxring->alloc, in jme_free_rx_resources()
[all …]
/drivers/net/ethernet/mellanox/mlx4/
DMakefile3 mlx4_core-y := alloc.o catas.o cmd.o cq.o eq.o fw.o icm.o intf.o main.o mcg.o \

1234