Home
last modified time | relevance | path

Searched refs:num_free (Results 1 – 16 of 16) sorted by relevance

/drivers/infiniband/hw/hns/
Dhns_roce_mr.c77 if (buddy->num_free[o]) { in hns_roce_buddy_alloc()
89 --buddy->num_free[o]; in hns_roce_buddy_alloc()
95 ++buddy->num_free[o]; in hns_roce_buddy_alloc()
113 --buddy->num_free[order]; in hns_roce_buddy_free()
119 ++buddy->num_free[order]; in hns_roce_buddy_free()
133 buddy->num_free = kzalloc((buddy->max_order + 1) * sizeof(int *), in hns_roce_buddy_init()
135 if (!buddy->bits || !buddy->num_free) in hns_roce_buddy_init()
148 buddy->num_free[buddy->max_order] = 1; in hns_roce_buddy_init()
158 kfree(buddy->num_free); in hns_roce_buddy_init()
170 kfree(buddy->num_free); in hns_roce_buddy_cleanup()
Dhns_roce_device.h206 u32 *num_free; member
/drivers/gpu/drm/via/
Dvia_dmablit.c519 blitq->num_free++; in via_dmablit_workqueue()
557 blitq->num_free = VIA_NUM_BLIT_SLOTS - 1; in via_init_dmablit()
685 DRM_DEBUG("Num free is %d\n", blitq->num_free); in via_dmablit_grab_slot()
687 while (blitq->num_free == 0) { in via_dmablit_grab_slot()
690 DRM_WAIT_ON(ret, blitq->busy_queue, HZ, blitq->num_free > 0); in via_dmablit_grab_slot()
697 blitq->num_free--; in via_dmablit_grab_slot()
713 blitq->num_free++; in via_dmablit_release_slot()
Dvia_dmablit.h68 unsigned num_free; member
/drivers/infiniband/hw/mthca/
Dmthca_mr.c93 if (buddy->num_free[o]) { in mthca_buddy_alloc()
105 --buddy->num_free[o]; in mthca_buddy_alloc()
111 ++buddy->num_free[o]; in mthca_buddy_alloc()
129 --buddy->num_free[order]; in mthca_buddy_free()
135 ++buddy->num_free[order]; in mthca_buddy_free()
149 buddy->num_free = kcalloc((buddy->max_order + 1), sizeof *buddy->num_free, in mthca_buddy_init()
151 if (!buddy->bits || !buddy->num_free) in mthca_buddy_init()
164 buddy->num_free[buddy->max_order] = 1; in mthca_buddy_init()
174 kfree(buddy->num_free); in mthca_buddy_init()
187 kfree(buddy->num_free); in mthca_buddy_cleanup()
Dmthca_dev.h206 int *num_free; member
/drivers/net/ethernet/mellanox/mlx4/
Dmr.c55 if (buddy->num_free[o]) { in mlx4_buddy_alloc()
67 --buddy->num_free[o]; in mlx4_buddy_alloc()
73 ++buddy->num_free[o]; in mlx4_buddy_alloc()
91 --buddy->num_free[order]; in mlx4_buddy_free()
97 ++buddy->num_free[order]; in mlx4_buddy_free()
111 buddy->num_free = kcalloc((buddy->max_order + 1), sizeof *buddy->num_free, in mlx4_buddy_init()
113 if (!buddy->bits || !buddy->num_free) in mlx4_buddy_init()
127 buddy->num_free[buddy->max_order] = 1; in mlx4_buddy_init()
137 kfree(buddy->num_free); in mlx4_buddy_init()
150 kfree(buddy->num_free); in mlx4_buddy_cleanup()
Dmlx4.h256 unsigned int *num_free; member
/drivers/virtio/
Dvirtio_ring.c304 if (vq->indirect && total_sg > 1 && vq->vq.num_free) in virtqueue_add()
322 if (vq->vq.num_free < descs_used) { in virtqueue_add()
324 descs_used, vq->vq.num_free); in virtqueue_add()
380 vq->vq.num_free -= descs_used; in virtqueue_add()
613 vq->vq.num_free++; in detach_buf()
621 vq->vq.num_free++; in detach_buf()
886 BUG_ON(vq->vq.num_free != vq->vring.num); in virtqueue_detach_unused_buf()
933 vq->vq.num_free = vring.num; in __vring_new_virtqueue()
/drivers/gpu/drm/virtio/
Dvirtgpu_vq.c327 wait_event(vgdev->ctrlq.ack_queue, vq->num_free); in virtio_gpu_queue_ctrl_buffer_locked()
335 ret = vq->num_free; in virtio_gpu_queue_ctrl_buffer_locked()
369 if (vq->num_free < 3) { in virtio_gpu_queue_fenced_ctrl_buffer()
371 wait_event(vgdev->ctrlq.ack_queue, vq->num_free >= 3); in virtio_gpu_queue_fenced_ctrl_buffer()
402 wait_event(vgdev->cursorq.ack_queue, vq->num_free); in virtio_gpu_queue_cursor()
412 ret = vq->num_free; in virtio_gpu_queue_cursor()
/drivers/net/caif/
Dcaif_virtio.c186 if (cfv->vq_tx->num_free <= cfv->watermark_tx) in cfv_release_used_buf()
540 if (unlikely(cfv->vq_tx->num_free <= num_present_cpus())) { in cfv_netdev_tx()
/drivers/scsi/
Dqlogicpti.c961 int num_free = QLOGICPTI_REQ_QUEUE_LEN - REQ_QUEUE_DEPTH(in_ptr, out_ptr) - 64; in update_can_queue() local
962 host->can_queue = atomic_read(&host->host_busy) + num_free; in update_can_queue()
963 host->sg_tablesize = QLOGICPTI_MAX_SG(num_free); in update_can_queue()
/drivers/net/
Dvirtio_net.c665 } while (rq->vq->num_free); in try_fill_recv()
732 if (rq->vq->num_free > virtqueue_get_vring_size(rq->vq) / 2) { in virtnet_receive()
923 if (sq->vq->num_free < 2+MAX_SKB_FRAGS) { in start_xmit()
928 if (sq->vq->num_free >= 2+MAX_SKB_FRAGS) { in start_xmit()
/drivers/char/
Dvirtio_console.c518 ret = vq->num_free; in add_inbuf()
646 if (out_vq->num_free == 0) in __send_to_port()
/drivers/block/
Dvirtio_blk.c612 virtblk_queue_depth = vblk->vqs[0].vq->num_free; in virtblk_probe()
/drivers/tty/
Dsynclink.c3986 int num_free = num_free_tx_dma_buffers(info); in load_next_tx_holding_buffer() local
3991 if (num_needed <= num_free) { in load_next_tx_holding_buffer()