/linux/drivers/gpu/drm/ |
A D | drm_dma.c | 68 memset(&dev->dma->bufs[i], 0, sizeof(dev->dma->bufs[0])); in drm_legacy_dma_setup() 96 if (dma->bufs[i].seg_count) { in drm_legacy_dma_takedown() 100 dma->bufs[i].buf_count, in drm_legacy_dma_takedown() 101 dma->bufs[i].seg_count); in drm_legacy_dma_takedown() 102 for (j = 0; j < dma->bufs[i].seg_count; j++) { in drm_legacy_dma_takedown() 103 if (dma->bufs[i].seglist[j]) { in drm_legacy_dma_takedown() 104 dmah = dma->bufs[i].seglist[j]; in drm_legacy_dma_takedown() 112 kfree(dma->bufs[i].seglist); in drm_legacy_dma_takedown() 114 if (dma->bufs[i].buf_count) { in drm_legacy_dma_takedown() 116 kfree(dma->bufs[i].buflist[j].dev_private); in drm_legacy_dma_takedown() [all …]
|
/linux/sound/core/oss/ |
A 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/drivers/net/ethernet/cisco/enic/ |
A 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 …]
|
A 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/drivers/scsi/fnic/ |
A 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()
|
A 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/drivers/scsi/snic/ |
A 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/drivers/media/v4l2-core/ |
A D | videobuf-core.c | 204 if (NULL == q->bufs[i]) in videobuf_queue_is_busy() 206 if (q->bufs[i]->map) { in videobuf_queue_is_busy() 246 if (q->bufs[i] && q->bufs[i]->map) { in __videobuf_free() 252 if (NULL == q->bufs[i]) in __videobuf_free() 255 kfree(q->bufs[i]); in __videobuf_free() 256 q->bufs[i] = NULL; in __videobuf_free() 275 if (NULL == q->bufs[i]) in videobuf_queue_cancel() 287 if (NULL == q->bufs[i]) in videobuf_queue_cancel() 401 if (NULL == q->bufs[i]) in __videobuf_mmap_setup() 1006 kfree(q->bufs[i]); in __videobuf_read_stop() [all …]
|
A 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() 604 if (buf == q->bufs[first]) { in __videobuf_mmap_mapper() 627 if (NULL == q->bufs[i]) in __videobuf_mmap_mapper() 629 q->bufs[i]->map = map; in __videobuf_mmap_mapper() 630 q->bufs[i]->baddr = vma->vm_start + size; in __videobuf_mmap_mapper() [all …]
|
A 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()
|
A D | videobuf-dma-contig.c | 94 if (NULL == q->bufs[i]) in videobuf_vm_close() 97 if (q->bufs[i]->map != map) in videobuf_vm_close() 100 mem = q->bufs[i]->priv; in videobuf_vm_close() 120 q->bufs[i]->map = NULL; in videobuf_vm_close() 121 q->bufs[i]->baddr = 0; in videobuf_vm_close()
|
/linux/tools/virtio/ringtest/ |
A 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/drivers/scsi/arm/ |
A 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/drivers/net/ethernet/marvell/prestera/ |
A D | prestera_rxtx.c | 84 struct prestera_sdma_buf *bufs; member 89 struct prestera_sdma_buf *bufs; member 300 buf = &ring->bufs[buf_idx]; in prestera_sdma_rx_poll() 348 if (!ring->bufs) in prestera_sdma_rx_fini() 386 if (!ring->bufs) in prestera_sdma_rx_init() 391 tail = &ring->bufs[bnum - 1]; in prestera_sdma_rx_init() 392 head = &ring->bufs[0]; in prestera_sdma_rx_init() 536 if (!tx_ring->bufs) in prestera_sdma_tx_init() 539 tail = &tx_ring->bufs[bnum - 1]; in prestera_sdma_tx_init() 540 head = &tx_ring->bufs[0]; in prestera_sdma_tx_init() [all …]
|
/linux/drivers/soc/fsl/qbman/ |
A D | bman.c | 113 struct bm_buffer bufs[8]; member 151 struct bm_buffer bufs[8]; member 738 int bman_release(struct bman_pool *pool, const struct bm_buffer *bufs, u8 num) in bman_release() argument 772 bm_buffer_set64(r->bufs, bm_buffer_get64(bufs)); in bman_release() 773 bm_buffer_set_bpid(r->bufs, pool->bpid); in bman_release() 775 memcpy(&r->bufs[1], &bufs[1], i * sizeof(bufs[0])); in bman_release() 786 int bman_acquire(struct bman_pool *pool, struct bm_buffer *bufs, u8 num) in bman_acquire() argument 805 if (bufs) in bman_acquire() 806 memcpy(&bufs[0], &mcr->bufs[0], num * sizeof(bufs[0])); in bman_acquire()
|
/linux/fs/ |
A D | pipe.c | 519 buf = &pipe->bufs[head & mask]; in pipe_write() 808 if (pipe->bufs) { in alloc_pipe_info() 848 kfree(pipe->bufs); in free_pipe_info() 1247 struct pipe_buffer *bufs; in pipe_resize_ring() local 1263 bufs = kcalloc(nr_slots, sizeof(*bufs), in pipe_resize_ring() 1265 if (unlikely(!bufs)) in pipe_resize_ring() 1276 memcpy(bufs, pipe->bufs + t, in pipe_resize_ring() 1281 memcpy(bufs + tsize, pipe->bufs, in pipe_resize_ring() 1283 memcpy(bufs, pipe->bufs + t, in pipe_resize_ring() 1291 kfree(pipe->bufs); in pipe_resize_ring() [all …]
|
/linux/drivers/media/common/videobuf2/ |
A D | videobuf2-core.c | 486 vb = q->bufs[buffer]; in __vb2_free_mem() 1529 vb = q->bufs[index]; in vb2_core_prepare_buf() 1600 vb = q->bufs[i]; in vb2_start_streaming() 1628 vb = q->bufs[index]; in vb2_core_qbuf() 2004 q->bufs[i]); in __vb2_queue_cancel() 2220 vb = q->bufs[index]; in vb2_core_expbuf() 2307 vb = q->bufs[buffer]; in vb2_mmap() 2366 vb = q->bufs[buffer]; in vb2_get_unmapped_area() 2653 fileio->bufs[i].vaddr = vb2_plane_vaddr(q->bufs[i], 0); in __vb2_init_fileio() 2658 fileio->bufs[i].size = vb2_plane_size(q->bufs[i], 0); in __vb2_init_fileio() [all …]
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/fpga/ |
A 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() 539 if (!conn->qp.rq.bufs) { in mlx5_fpga_conn_create_qp() 547 if (!conn->qp.sq.bufs) { in mlx5_fpga_conn_create_qp() 595 kvfree(conn->qp.sq.bufs); in mlx5_fpga_conn_create_qp() 597 kvfree(conn->qp.rq.bufs); in mlx5_fpga_conn_create_qp() 652 kvfree(conn->qp.sq.bufs); in mlx5_fpga_conn_destroy_qp() [all …]
|
/linux/arch/mips/include/asm/octeon/ |
A 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/drivers/md/ |
A D | dm-verity-fec.c | 107 return &fio->bufs[i][j * v->fec->rsn]; in fec_buffer_rs_block() 313 if (fio->bufs[n]) in fec_alloc_bufs() 316 fio->bufs[n] = mempool_alloc(&v->fec->prealloc_pool, GFP_NOWAIT); in fec_alloc_bufs() 317 if (unlikely(!fio->bufs[n])) { in fec_alloc_bufs() 325 if (fio->bufs[n]) in fec_alloc_bufs() 328 fio->bufs[n] = mempool_alloc(&v->fec->extra_pool, GFP_NOWAIT); in fec_alloc_bufs() 330 if (unlikely(!fio->bufs[n])) in fec_alloc_bufs() 350 memset(fio->bufs[n], 0, v->fec->rsn << DM_VERITY_FEC_BUF_RS_BITS); in fec_init_bufs() 497 mempool_free(fio->bufs[n], &f->prealloc_pool); in verity_fec_finish_io() 500 mempool_free(fio->bufs[n], &f->extra_pool); in verity_fec_finish_io() [all …]
|
/linux/drivers/infiniband/hw/hns/ |
A D | hns_roce_alloc.c | 133 int hns_roce_get_kmem_bufs(struct hns_roce_dev *hr_dev, dma_addr_t *bufs, in hns_roce_get_kmem_bufs() argument 150 bufs[total++] = hns_roce_buf_dma_addr(buf, offset); in hns_roce_get_kmem_bufs() 157 int hns_roce_get_umem_bufs(struct hns_roce_dev *hr_dev, dma_addr_t *bufs, in hns_roce_get_umem_bufs() argument 166 bufs[total++] = rdma_block_iter_dma_address(&biter); in hns_roce_get_umem_bufs()
|
/linux/sound/core/ |
A D | pcm_compat.c | 321 u32 bufs; /* this is void **; */ member 337 void __user **bufs; in snd_pcm_ioctl_xfern_compat() local 350 if (get_user(buf, &data32->bufs) || in snd_pcm_ioctl_xfern_compat() 354 bufs = kmalloc_array(ch, sizeof(void __user *), GFP_KERNEL); in snd_pcm_ioctl_xfern_compat() 355 if (bufs == NULL) in snd_pcm_ioctl_xfern_compat() 360 kfree(bufs); in snd_pcm_ioctl_xfern_compat() 363 bufs[i] = compat_ptr(ptr); in snd_pcm_ioctl_xfern_compat() 367 err = snd_pcm_lib_writev(substream, bufs, frames); in snd_pcm_ioctl_xfern_compat() 369 err = snd_pcm_lib_readv(substream, bufs, frames); in snd_pcm_ioctl_xfern_compat() 374 kfree(bufs); in snd_pcm_ioctl_xfern_compat()
|
/linux/tools/virtio/ |
A D | virtio_test.c | 169 bool delayed, int batch, int reset_n, int bufs) in run_test() argument 194 while (started < bufs && in run_test() 217 if (started >= bufs) in run_test() 257 assert(completed <= bufs); in run_test() 258 assert(started <= bufs); in run_test() 259 if (completed == bufs) in run_test()
|
/linux/fs/jbd2/ |
A D | commit.c | 388 int bufs; in jbd2_journal_commit_transaction() local 620 bufs = 0; in jbd2_journal_commit_transaction() 652 J_ASSERT (bufs == 0); in jbd2_journal_commit_transaction() 673 wbuf[bufs++] = descriptor; in jbd2_journal_commit_transaction() 710 jh, &wbuf[bufs], blocknr); in jbd2_journal_commit_transaction() 715 jbd2_file_log_bh(&io_bufs, wbuf[bufs]); in jbd2_journal_commit_transaction() 733 bufs++; in jbd2_journal_commit_transaction() 745 if (bufs == journal->j_wbufsize || in jbd2_journal_commit_transaction() 749 jbd_debug(4, "JBD2: Submit %d IOs\n", bufs); in jbd2_journal_commit_transaction() 761 for (i = 0; i < bufs; i++) { in jbd2_journal_commit_transaction() [all …]
|
/linux/lib/ |
A D | iov_iter.c | 359 p = &pipe->bufs[i_head & p_mask]; in sanity() 373 pipe->bufs[idx].ops, in sanity() 374 pipe->bufs[idx].page, in sanity() 375 pipe->bufs[idx].offset, in sanity() 376 pipe->bufs[idx].len); in sanity() 404 buf = &pipe->bufs[i_head & p_mask]; in copy_page_to_iter_pipe() 413 buf = &pipe->bufs[i_head & p_mask]; in copy_page_to_iter_pipe() 569 pipe->bufs[iter_head & p_mask].len += size; in push_pipe() 991 buf = &pipe->bufs[i_head & p_mask]; in pipe_truncate() 1016 buf = &pipe->bufs[i_head & p_mask]; in pipe_advance() [all …]
|