| /Linux-v5.4/drivers/gpu/drm/ |
| D | drm_dma.c | 68 memset(&dev->dma->bufs[i], 0, sizeof(dev->dma->bufs[0])); in drm_legacy_dma_setup() 95 if (dma->bufs[i].seg_count) { in drm_legacy_dma_takedown() 99 dma->bufs[i].buf_count, in drm_legacy_dma_takedown() 100 dma->bufs[i].seg_count); in drm_legacy_dma_takedown() 101 for (j = 0; j < dma->bufs[i].seg_count; j++) { in drm_legacy_dma_takedown() 102 if (dma->bufs[i].seglist[j]) { in drm_legacy_dma_takedown() 103 drm_pci_free(dev, dma->bufs[i].seglist[j]); in drm_legacy_dma_takedown() 106 kfree(dma->bufs[i].seglist); in drm_legacy_dma_takedown() 108 if (dma->bufs[i].buf_count) { in drm_legacy_dma_takedown() 109 for (j = 0; j < dma->bufs[i].buf_count; j++) { in drm_legacy_dma_takedown() [all …]
|
| /Linux-v5.4/sound/core/oss/ |
| D | io.c | 50 void **bufs = (void**)plugin->extra_data; in io_playback_transfer() local 51 if (snd_BUG_ON(!bufs)) in io_playback_transfer() 55 bufs[channel] = src_channels[channel].area.addr; in io_playback_transfer() 57 bufs[channel] = NULL; in io_playback_transfer() 59 return pcm_writev(plugin->plug, bufs, frames); in io_playback_transfer() 76 void **bufs = (void**)plugin->extra_data; in io_capture_transfer() local 77 if (snd_BUG_ON(!bufs)) in io_capture_transfer() 81 bufs[channel] = dst_channels[channel].area.addr; in io_capture_transfer() 83 bufs[channel] = NULL; in io_capture_transfer() 85 return pcm_readv(plugin->plug, bufs, frames); in io_capture_transfer()
|
| /Linux-v5.4/drivers/net/ethernet/cisco/enic/ |
| D | vnic_rq.c | 38 rq->bufs[i] = kzalloc(VNIC_RQ_BUF_BLK_SZ(count), GFP_KERNEL); in vnic_rq_alloc_bufs() 39 if (!rq->bufs[i]) in vnic_rq_alloc_bufs() 44 buf = rq->bufs[i]; in vnic_rq_alloc_bufs() 50 buf->next = rq->bufs[0]; in vnic_rq_alloc_bufs() 53 buf->next = rq->bufs[i + 1]; in vnic_rq_alloc_bufs() 61 rq->to_use = rq->to_clean = rq->bufs[0]; in vnic_rq_alloc_bufs() 76 if (rq->bufs[i]) { in vnic_rq_free() 77 kfree(rq->bufs[i]); in vnic_rq_free() 78 rq->bufs[i] = NULL; in vnic_rq_free() 134 &rq->bufs[fetch_index / VNIC_RQ_BUF_BLK_ENTRIES(count)] in vnic_rq_init_start() [all …]
|
| D | vnic_wq.c | 38 wq->bufs[i] = kzalloc(VNIC_WQ_BUF_BLK_SZ(count), GFP_KERNEL); in vnic_wq_alloc_bufs() 39 if (!wq->bufs[i]) in vnic_wq_alloc_bufs() 44 buf = wq->bufs[i]; in vnic_wq_alloc_bufs() 50 buf->next = wq->bufs[0]; in vnic_wq_alloc_bufs() 54 buf->next = wq->bufs[i + 1]; in vnic_wq_alloc_bufs() 64 wq->to_use = wq->to_clean = wq->bufs[0]; in vnic_wq_alloc_bufs() 79 if (wq->bufs[i]) { in vnic_wq_free() 80 kfree(wq->bufs[i]); in vnic_wq_free() 81 wq->bufs[i] = NULL; in vnic_wq_free() 153 &wq->bufs[fetch_index / VNIC_WQ_BUF_BLK_ENTRIES(count)] in enic_wq_init_start() [all …]
|
| /Linux-v5.4/drivers/scsi/fnic/ |
| D | vnic_rq.c | 34 rq->bufs[i] = kzalloc(VNIC_RQ_BUF_BLK_SZ, GFP_ATOMIC); in vnic_rq_alloc_bufs() 35 if (!rq->bufs[i]) { in vnic_rq_alloc_bufs() 42 buf = rq->bufs[i]; in vnic_rq_alloc_bufs() 48 buf->next = rq->bufs[0]; in vnic_rq_alloc_bufs() 51 buf->next = rq->bufs[i + 1]; in vnic_rq_alloc_bufs() 59 rq->to_use = rq->to_clean = rq->bufs[0]; in vnic_rq_alloc_bufs() 75 kfree(rq->bufs[i]); in vnic_rq_free() 76 rq->bufs[i] = NULL; in vnic_rq_free() 130 &rq->bufs[fetch_index / VNIC_RQ_BUF_BLK_ENTRIES] in vnic_rq_init() 186 &rq->bufs[fetch_index / VNIC_RQ_BUF_BLK_ENTRIES] in vnic_rq_clean()
|
| D | vnic_wq.c | 54 wq->bufs[i] = kzalloc(VNIC_WQ_BUF_BLK_SZ, GFP_ATOMIC); in vnic_wq_alloc_bufs() 55 if (!wq->bufs[i]) { in vnic_wq_alloc_bufs() 62 buf = wq->bufs[i]; in vnic_wq_alloc_bufs() 68 buf->next = wq->bufs[0]; in vnic_wq_alloc_bufs() 71 buf->next = wq->bufs[i + 1]; in vnic_wq_alloc_bufs() 79 wq->to_use = wq->to_clean = wq->bufs[0]; in vnic_wq_alloc_bufs() 94 kfree(wq->bufs[i]); in vnic_wq_free() 95 wq->bufs[i] = NULL; in vnic_wq_free() 172 &wq->bufs[fetch_index / VNIC_WQ_BUF_BLK_ENTRIES] in vnic_wq_init_start() 239 wq->to_use = wq->to_clean = wq->bufs[0]; in vnic_wq_clean()
|
| /Linux-v5.4/drivers/scsi/snic/ |
| D | vnic_wq.c | 50 wq->bufs[i] = kzalloc(VNIC_WQ_BUF_BLK_SZ, GFP_ATOMIC); in vnic_wq_alloc_bufs() 51 if (!wq->bufs[i]) { in vnic_wq_alloc_bufs() 59 buf = wq->bufs[i]; in vnic_wq_alloc_bufs() 65 buf->next = wq->bufs[0]; in vnic_wq_alloc_bufs() 68 buf->next = wq->bufs[i + 1]; in vnic_wq_alloc_bufs() 76 wq->to_use = wq->to_clean = wq->bufs[0]; in vnic_wq_alloc_bufs() 91 kfree(wq->bufs[i]); in svnic_wq_free() 92 wq->bufs[i] = NULL; in svnic_wq_free() 173 &wq->bufs[fetch_index / VNIC_WQ_BUF_BLK_ENTRIES(count)] in vnic_wq_init_start() 230 wq->to_use = wq->to_clean = wq->bufs[0]; in svnic_wq_clean()
|
| /Linux-v5.4/fs/ |
| D | pipe.c | 288 int bufs = pipe->nrbufs; in pipe_read() local 289 if (bufs) { in pipe_read() 291 struct pipe_buffer *buf = pipe->bufs + curbuf; in pipe_read() 326 pipe->nrbufs = --bufs; in pipe_read() 333 if (bufs) /* More to do? */ in pipe_read() 405 struct pipe_buffer *buf = pipe->bufs + lastbuf; in pipe_write() 426 int bufs; in pipe_write() local 434 bufs = pipe->nrbufs; in pipe_write() 435 if (bufs < pipe->buffers) { in pipe_write() 436 int newbuf = (pipe->curbuf + bufs) & (pipe->buffers-1); in pipe_write() [all …]
|
| /Linux-v5.4/drivers/infiniband/hw/hns/ |
| D | hns_roce_alloc.c | 240 int hns_roce_get_kmem_bufs(struct hns_roce_dev *hr_dev, dma_addr_t *bufs, in hns_roce_get_kmem_bufs() argument 257 bufs[total++] = buf->direct.map + in hns_roce_get_kmem_bufs() 260 bufs[total++] = buf->page_list[i].map; in hns_roce_get_kmem_bufs() 265 int hns_roce_get_umem_bufs(struct hns_roce_dev *hr_dev, dma_addr_t *bufs, in hns_roce_get_umem_bufs() argument 284 bufs[total++] = addr; in hns_roce_get_umem_bufs() 307 void hns_roce_free_buf_list(dma_addr_t **bufs, int region_cnt) in hns_roce_free_buf_list() argument 312 kfree(bufs[i]); in hns_roce_free_buf_list() 313 bufs[i] = NULL; in hns_roce_free_buf_list() 318 dma_addr_t **bufs, int region_cnt) in hns_roce_alloc_buf_list() argument 325 bufs[i] = kcalloc(r->count, sizeof(dma_addr_t), GFP_KERNEL); in hns_roce_alloc_buf_list() [all …]
|
| /Linux-v5.4/drivers/media/v4l2-core/ |
| D | videobuf-core.c | 203 if (NULL == q->bufs[i]) in videobuf_queue_is_busy() 205 if (q->bufs[i]->map) { in videobuf_queue_is_busy() 209 if (q->bufs[i]->state == VIDEOBUF_QUEUED) { in videobuf_queue_is_busy() 213 if (q->bufs[i]->state == VIDEOBUF_ACTIVE) { in videobuf_queue_is_busy() 245 if (q->bufs[i] && q->bufs[i]->map) { in __videobuf_free() 251 if (NULL == q->bufs[i]) in __videobuf_free() 253 q->ops->buf_release(q, q->bufs[i]); in __videobuf_free() 254 kfree(q->bufs[i]); in __videobuf_free() 255 q->bufs[i] = NULL; in __videobuf_free() 274 if (NULL == q->bufs[i]) in videobuf_queue_cancel() [all …]
|
| D | videobuf-dma-sg.c | 409 if (NULL == q->bufs[i]) in videobuf_vm_close() 411 mem = q->bufs[i]->priv; in videobuf_vm_close() 417 if (q->bufs[i]->map != map) in videobuf_vm_close() 419 q->bufs[i]->map = NULL; in videobuf_vm_close() 420 q->bufs[i]->baddr = 0; in videobuf_vm_close() 421 q->ops->buf_release(q, q->bufs[i]); in videobuf_vm_close() 603 if (buf == q->bufs[first]) { in __videobuf_mmap_mapper() 604 size = PAGE_ALIGN(q->bufs[first]->bsize); in __videobuf_mmap_mapper() 626 if (NULL == q->bufs[i]) in __videobuf_mmap_mapper() 628 q->bufs[i]->map = map; in __videobuf_mmap_mapper() [all …]
|
| D | videobuf-vmalloc.c | 82 if (NULL == q->bufs[i]) in videobuf_vm_close() 85 if (q->bufs[i]->map != map) in videobuf_vm_close() 88 mem = q->bufs[i]->priv; in videobuf_vm_close() 108 q->bufs[i]->map = NULL; in videobuf_vm_close() 109 q->bufs[i]->baddr = 0; in videobuf_vm_close()
|
| /Linux-v5.4/tools/virtio/ringtest/ |
| D | main.c | 111 int bufs = runcycles; in run_guest() local 123 if (started < bufs && in run_guest() 141 if (__builtin_expect(completed == bufs, false)) in run_guest() 148 assert(completed <= bufs); in run_guest() 149 assert(started <= bufs); in run_guest() 170 int bufs = runcycles; in run_host() local 188 if (__builtin_expect(completed == bufs, false)) in run_host() 193 assert(completed <= bufs); in run_host() 194 if (completed == bufs) in run_host()
|
| /Linux-v5.4/drivers/scsi/arm/ |
| D | scsi.h | 26 int bufs = SCp->buffers_residual; in copy_SCp_to_sg() local 31 BUG_ON(bufs + 1 > max); in copy_SCp_to_sg() 35 if (bufs) { in copy_SCp_to_sg() 39 for_each_sg(sg_next(SCp->buffer), src_sg, bufs, i) in copy_SCp_to_sg() 44 return bufs + 1; in copy_SCp_to_sg()
|
| /Linux-v5.4/drivers/crypto/caam/ |
| D | caamrng.c | 78 struct buf_data bufs[2]; member 103 rng_unmap_buf(jrdev, &ctx->bufs[0]); in rng_unmap_ctx() 104 rng_unmap_buf(jrdev, &ctx->bufs[1]); in rng_unmap_ctx() 128 struct buf_data *bd = &ctx->bufs[!(to_current ^ ctx->current_buf)]; in submit_job() 147 struct buf_data *bd = &ctx->bufs[ctx->current_buf]; in caam_read() 226 struct buf_data *bd = &ctx->bufs[buf_id]; in rng_create_job_desc() 253 bd = &rng_ctx->bufs[i]; in caam_cleanup() 263 struct buf_data *bd = &ctx->bufs[buf_id]; in caam_init_buf()
|
| /Linux-v5.4/drivers/soc/fsl/qbman/ |
| D | bman.c | 113 struct bm_buffer bufs[8]; member 151 struct bm_buffer bufs[8]; member 739 int bman_release(struct bman_pool *pool, const struct bm_buffer *bufs, u8 num) in bman_release() argument 773 bm_buffer_set64(r->bufs, bm_buffer_get64(bufs)); in bman_release() 774 bm_buffer_set_bpid(r->bufs, pool->bpid); in bman_release() 776 memcpy(&r->bufs[1], &bufs[1], i * sizeof(bufs[0])); in bman_release() 787 int bman_acquire(struct bman_pool *pool, struct bm_buffer *bufs, u8 num) in bman_acquire() argument 806 if (bufs) in bman_acquire() 807 memcpy(&bufs[0], &mcr->bufs[0], num * sizeof(bufs[0])); in bman_acquire()
|
| /Linux-v5.4/drivers/media/common/videobuf2/ |
| D | videobuf2-core.c | 310 struct vb2_buffer *prev = q->bufs[vb->index - 1]; in __setup_offsets() 366 q->bufs[vb->index] = vb; in __vb2_queue_alloc() 374 q->bufs[vb->index] = NULL; in __vb2_queue_alloc() 389 q->bufs[vb->index] = NULL; in __vb2_queue_alloc() 412 vb = q->bufs[buffer]; in __vb2_free_mem() 445 if (q->bufs[buffer] == NULL) in __vb2_queue_free() 447 if (q->bufs[buffer]->state == VB2_BUF_STATE_PREPARING) { in __vb2_queue_free() 456 struct vb2_buffer *vb = q->bufs[buffer]; in __vb2_queue_free() 491 struct vb2_buffer *vb = q->bufs[buffer]; in __vb2_queue_free() 531 kfree(q->bufs[buffer]); in __vb2_queue_free() [all …]
|
| /Linux-v5.4/drivers/net/ethernet/mellanox/mlx5/core/fpga/ |
| D | conn.c | 122 conn->qp.rq.bufs[ix] = buf; in mlx5_fpga_conn_post_recv() 171 conn->qp.sq.bufs[ix] = buf; in mlx5_fpga_conn_post_send() 257 buf = conn->qp.rq.bufs[ix]; in mlx5_fpga_conn_rq_cqe() 258 conn->qp.rq.bufs[ix] = NULL; in mlx5_fpga_conn_rq_cqe() 300 buf = conn->qp.sq.bufs[ix]; in mlx5_fpga_conn_sq_cqe() 301 conn->qp.sq.bufs[ix] = NULL; in mlx5_fpga_conn_sq_cqe() 556 conn->qp.rq.bufs = kvcalloc(conn->qp.rq.size, in mlx5_fpga_conn_create_qp() 557 sizeof(conn->qp.rq.bufs[0]), in mlx5_fpga_conn_create_qp() 559 if (!conn->qp.rq.bufs) { in mlx5_fpga_conn_create_qp() 564 conn->qp.sq.bufs = kvcalloc(conn->qp.sq.size, in mlx5_fpga_conn_create_qp() [all …]
|
| D | conn.h | 74 struct mlx5_fpga_dma_buf **bufs; member 81 struct mlx5_fpga_dma_buf **bufs; member
|
| /Linux-v5.4/drivers/md/ |
| D | dm-verity-fec.c | 108 return &fio->bufs[i][j * v->fec->rsn]; in fec_buffer_rs_block() 314 if (fio->bufs[n]) in fec_alloc_bufs() 317 fio->bufs[n] = mempool_alloc(&v->fec->prealloc_pool, GFP_NOWAIT); in fec_alloc_bufs() 318 if (unlikely(!fio->bufs[n])) { in fec_alloc_bufs() 326 if (fio->bufs[n]) in fec_alloc_bufs() 329 fio->bufs[n] = mempool_alloc(&v->fec->extra_pool, GFP_NOWAIT); in fec_alloc_bufs() 331 if (unlikely(!fio->bufs[n])) in fec_alloc_bufs() 351 memset(fio->bufs[n], 0, v->fec->rsn << DM_VERITY_FEC_BUF_RS_BITS); in fec_init_bufs() 498 mempool_free(fio->bufs[n], &f->prealloc_pool); in verity_fec_finish_io() 501 mempool_free(fio->bufs[n], &f->extra_pool); in verity_fec_finish_io() [all …]
|
| /Linux-v5.4/arch/mips/include/asm/octeon/ |
| D | cvmx-wqe.h | 62 uint64_t bufs:8; member 193 uint64_t bufs:8; 198 uint64_t bufs:8; member 240 uint64_t bufs:8; 268 uint64_t bufs:8; member 399 uint64_t bufs:8;
|
| /Linux-v5.4/lib/ |
| D | iov_iter.c | 337 p = &pipe->bufs[idx]; in sanity() 351 pipe->bufs[idx].ops, in sanity() 352 pipe->bufs[idx].page, in sanity() 353 pipe->bufs[idx].offset, in sanity() 354 pipe->bufs[idx].len); in sanity() 386 buf = &pipe->bufs[idx]; in copy_page_to_iter_pipe() 395 buf = &pipe->bufs[idx]; in copy_page_to_iter_pipe() 487 if (off && (!allocated(&i->pipe->bufs[idx]) || off == PAGE_SIZE)) { in data_start() 515 pipe->bufs[idx].len += size; in push_pipe() 518 pipe->bufs[idx].len = PAGE_SIZE; in push_pipe() [all …]
|
| /Linux-v5.4/fs/jbd2/ |
| D | commit.c | 362 int bufs; in jbd2_journal_commit_transaction() local 571 bufs = 0; in jbd2_journal_commit_transaction() 603 J_ASSERT (bufs == 0); in jbd2_journal_commit_transaction() 624 wbuf[bufs++] = descriptor; in jbd2_journal_commit_transaction() 662 jh, &wbuf[bufs], blocknr); in jbd2_journal_commit_transaction() 667 jbd2_file_log_bh(&io_bufs, wbuf[bufs]); in jbd2_journal_commit_transaction() 681 jbd2_block_tag_csum_set(journal, tag, wbuf[bufs], in jbd2_journal_commit_transaction() 685 bufs++; in jbd2_journal_commit_transaction() 697 if (bufs == journal->j_wbufsize || in jbd2_journal_commit_transaction() 701 jbd_debug(4, "JBD2: Submit %d IOs\n", bufs); in jbd2_journal_commit_transaction() [all …]
|
| /Linux-v5.4/tools/virtio/ |
| D | virtio_test.c | 155 bool delayed, int bufs) in run_test() argument 169 if (started < bufs) { in run_test() 191 assert(completed <= bufs); in run_test() 192 assert(started <= bufs); in run_test() 193 if (completed == bufs) in run_test()
|
| /Linux-v5.4/include/soc/fsl/ |
| D | bman.h | 114 int bman_release(struct bman_pool *pool, const struct bm_buffer *bufs, u8 num); 127 int bman_acquire(struct bman_pool *pool, struct bm_buffer *bufs, u8 num);
|