/drivers/xen/xenbus/ |
D | xenbus_comms.c | 102 unsigned int avail; in xb_write() local 119 dst = get_output_chunk(cons, prod, intf->req, &avail); in xb_write() 120 if (avail == 0) in xb_write() 122 if (avail > len) in xb_write() 123 avail = len; in xb_write() 128 memcpy(dst, data, avail); in xb_write() 129 data += avail; in xb_write() 130 len -= avail; in xb_write() 134 intf->req_prod += avail; in xb_write() 161 unsigned int avail; in xb_read() local [all …]
|
/drivers/s390/cio/ |
D | airq.c | 136 iv->avail = kmalloc(size, GFP_KERNEL); in airq_iv_create() 137 if (!iv->avail) in airq_iv_create() 139 memset(iv->avail, 0xff, size); in airq_iv_create() 166 kfree(iv->avail); in airq_iv_create() 184 kfree(iv->avail); in airq_iv_release() 202 if (!iv->avail || num == 0) in airq_iv_alloc() 205 bit = find_first_bit_inv(iv->avail, iv->bits); in airq_iv_alloc() 208 if (!test_bit_inv(bit + i, iv->avail)) in airq_iv_alloc() 213 clear_bit_inv(bit + i, iv->avail); in airq_iv_alloc() 218 bit = find_next_bit_inv(iv->avail, iv->bits, bit + i + 1); in airq_iv_alloc() [all …]
|
/drivers/uwb/ |
D | drp-avail.c | 61 void uwb_drp_available(struct uwb_rc *rc, struct uwb_mas_bm *avail) in uwb_drp_available() argument 63 bitmap_and(avail->bm, rc->drp_avail.global, rc->drp_avail.local, UWB_NUM_MAS); in uwb_drp_available() 64 bitmap_and(avail->bm, avail->bm, rc->drp_avail.pending, UWB_NUM_MAS); in uwb_drp_available() 76 struct uwb_mas_bm avail; in uwb_drp_avail_reserve_pending() local 78 uwb_drp_available(rc, &avail); in uwb_drp_avail_reserve_pending() 79 if (!bitmap_subset(mas->bm, avail.bm, UWB_NUM_MAS)) in uwb_drp_avail_reserve_pending() 119 struct uwb_mas_bm avail; in uwb_drp_avail_ie_update() local 121 bitmap_and(avail.bm, rc->drp_avail.global, rc->drp_avail.local, UWB_NUM_MAS); in uwb_drp_avail_ie_update() 125 uwb_mas_bm_copy_le(rc->drp_avail.ie.bmp, &avail); in uwb_drp_avail_ie_update()
|
/drivers/staging/fwserial/ |
D | dma_fifo.c | 85 fifo->avail = size; in dma_fifo_alloc() 134 fifo->avail = fifo->size; in dma_fifo_reset() 157 if (n > fifo->avail) in dma_fifo_in() 158 n = fifo->avail; in dma_fifo_in() 168 fifo->avail < n, in dma_fifo_in() 170 fifo->in, fifo->out, fifo->done, n, fifo->avail)) in dma_fifo_in() 174 fifo->avail -= n; in dma_fifo_in() 177 fifo->done, n, fifo->avail); in dma_fifo_in() 226 fifo->out, fifo->done, n, len, fifo->avail); in dma_fifo_out_pend() 289 fifo->avail += pending->len; in dma_fifo_out_complete() [all …]
|
D | dma_fifo.h | 57 int avail; /* # of unused bytes in fifo */ member 97 return fifo->size - fifo->avail; in dma_fifo_level() 109 return fifo->avail; in dma_fifo_avail()
|
/drivers/infiniband/hw/qib/ |
D | qib_fs.c | 149 size_t avail; in dev_counters_read() local 152 avail = dd->f_read_cntrs(dd, *ppos, NULL, &counters); in dev_counters_read() 153 return simple_read_from_buffer(buf, count, ppos, counters, avail); in dev_counters_read() 161 size_t avail; in dev_names_read() local 164 avail = dd->f_read_cntrs(dd, *ppos, &names, NULL); in dev_names_read() 165 return simple_read_from_buffer(buf, count, ppos, names, avail); in dev_names_read() 183 size_t avail; in portnames_read() local 186 avail = dd->f_read_portcntrs(dd, *ppos, 0, &names, NULL); in portnames_read() 187 return simple_read_from_buffer(buf, count, ppos, names, avail); in portnames_read() 195 size_t avail; in portcntrs_1_read() local [all …]
|
/drivers/media/pci/ngene/ |
D | ngene-dvb.c | 73 int left, avail; in ts_read() local 81 avail = dvb_ringbuffer_avail(&dev->tsin_rbuf); in ts_read() 82 if (avail > left) in ts_read() 83 avail = left; in ts_read() 84 dvb_ringbuffer_read_user(&dev->tsin_rbuf, buf, avail); in ts_read() 85 left -= avail; in ts_read() 86 buf += avail; in ts_read()
|
/drivers/misc/mic/vop/ |
D | vop_debugfs.c | 141 struct vring_avail *avail; in vop_vdev_info_show() local 166 avail = vrh->vring.avail; in vop_vdev_info_show() 168 vringh16_to_cpu(vrh, avail->flags), in vop_vdev_info_show() 170 avail->idx) & (num - 1)); in vop_vdev_info_show() 172 vringh16_to_cpu(vrh, avail->flags), in vop_vdev_info_show() 173 vringh16_to_cpu(vrh, avail->idx)); in vop_vdev_info_show() 176 j, avail->ring[j]); in vop_vdev_info_show()
|
/drivers/block/ |
D | ps3vram.c | 449 unsigned int offset, avail; in ps3vram_read() local 453 avail = priv->cache.page_size - offset; in ps3vram_read() 460 (unsigned int)from, cached, offset, avail, count); in ps3vram_read() 462 if (avail > count) in ps3vram_read() 463 avail = count; in ps3vram_read() 464 memcpy(buf, priv->xdr_buf + cached, avail); in ps3vram_read() 466 buf += avail; in ps3vram_read() 467 count -= avail; in ps3vram_read() 468 from += avail; in ps3vram_read() 490 unsigned int offset, avail; in ps3vram_write() local [all …]
|
/drivers/misc/ |
D | cs5535-mfgpt.c | 39 DECLARE_BITMAP(avail, MFGPT_MAX_TIMERS); 175 t = find_first_bit(mfgpt->avail, max); in cs5535_mfgpt_alloc_timer() 180 if (!test_bit(timer_nr, mfgpt->avail)) in cs5535_mfgpt_alloc_timer() 186 __clear_bit(timer_nr, mfgpt->avail); in cs5535_mfgpt_alloc_timer() 196 __set_bit(timer_nr, mfgpt->avail); in cs5535_mfgpt_alloc_timer() 223 __set_bit(timer->nr, timer->chip->avail); in cs5535_mfgpt_free_timer() 310 __set_bit(i, mfgpt->avail); in scan_timers()
|
/drivers/vhost/ |
D | vringh.c | 39 err = getu16(vrh, &avail_idx, &vrh->vring.avail->idx); in __vringh_get_head() 42 &vrh->vring.avail->idx); in __vringh_get_head() 54 err = getu16(vrh, &head, &vrh->vring.avail->ring[i]); in __vringh_get_head() 57 *last_avail_idx, &vrh->vring.avail->ring[i]); in __vringh_get_head() 466 err = getu16(vrh, &flags, &vrh->vring.avail->flags); in __vringh_need_notify() 469 &vrh->vring.avail->flags); in __vringh_need_notify() 502 u16 avail; in __vringh_notify_enable() local 524 if (getu16(vrh, &avail, &vrh->vring.avail->idx) != 0) { in __vringh_notify_enable() 526 &vrh->vring.avail->idx); in __vringh_notify_enable() 533 return avail == vrh->last_avail_idx; in __vringh_notify_enable() [all …]
|
D | vhost.c | 47 #define vhost_used_event(vq) ((__virtio16 __user *)&vq->avail->ring[vq->num]) 289 vq->avail = NULL; in vhost_vq_reset() 1091 struct vring_avail __user *avail, in vq_access_ok() argument 1098 access_ok(VERIFY_READ, avail, in vq_access_ok() 1099 sizeof *avail + num * sizeof *avail->ring + s) && in vq_access_ok() 1143 iotlb_access_ok(vq, VHOST_ACCESS_RO, (u64)(uintptr_t)vq->avail, in vq_iotlb_prefetch() 1144 sizeof *vq->avail + in vq_iotlb_prefetch() 1145 num * sizeof *vq->avail->ring + s) && in vq_iotlb_prefetch() 1185 return vq_access_ok(vq, vq->num, vq->desc, vq->avail, vq->used); in vhost_vq_access_ok() 1355 BUILD_BUG_ON(__alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE); in vhost_vring_ioctl() [all …]
|
/drivers/dma/ |
D | k3dma.c | 526 size_t len, avail, total = 0; in k3_dma_prep_slave_sg() local 537 avail = sg_dma_len(sg); in k3_dma_prep_slave_sg() 538 if (avail > DMA_MAX_SIZE) in k3_dma_prep_slave_sg() 539 num += DIV_ROUND_UP(avail, DMA_MAX_SIZE) - 1; in k3_dma_prep_slave_sg() 549 avail = sg_dma_len(sg); in k3_dma_prep_slave_sg() 550 total += avail; in k3_dma_prep_slave_sg() 553 len = min_t(size_t, avail, DMA_MAX_SIZE); in k3_dma_prep_slave_sg() 566 avail -= len; in k3_dma_prep_slave_sg() 567 } while (avail); in k3_dma_prep_slave_sg() 583 size_t len, avail, total = 0; in k3_dma_prep_dma_cyclic() local [all …]
|
/drivers/media/usb/go7007/ |
D | snd-go7007.c | 51 int avail; member 83 gosnd->avail += frames; in parse_audio_stream_data() 96 if (gosnd->avail < runtime->period_size) { in parse_audio_stream_data() 100 gosnd->avail -= runtime->period_size; in parse_audio_stream_data() 179 gosnd->hw_ptr = gosnd->w_idx = gosnd->avail = 0; in go7007_snd_pcm_trigger() 242 gosnd->hw_ptr = gosnd->w_idx = gosnd->avail = 0; in go7007_snd_init()
|
/drivers/pci/ |
D | bus.c | 166 struct resource *r, avail; in pci_bus_alloc_from_region() local 187 avail = *r; in pci_bus_alloc_from_region() 188 pci_clip_resource_to_region(bus, &avail, region); in pci_bus_alloc_from_region() 196 if (avail.start) in pci_bus_alloc_from_region() 197 min_used = avail.start; in pci_bus_alloc_from_region() 199 max = avail.end; in pci_bus_alloc_from_region()
|
/drivers/net/ethernet/chelsio/cxgb4vf/ |
D | sge.c | 266 return fl->avail - fl->pend_cred <= s->fl_starve_thres; in fl_starving() 434 int avail = reclaimable(tq); in reclaim_completed_tx() local 436 if (avail) { in reclaim_completed_tx() 441 if (avail > MAX_TX_RECLAIM) in reclaim_completed_tx() 442 avail = MAX_TX_RECLAIM; in reclaim_completed_tx() 444 free_tx_desc(adapter, tq, avail, unmap); in reclaim_completed_tx() 445 tq->in_use -= avail; in reclaim_completed_tx() 486 fl->avail--; in free_rx_bufs() 514 fl->avail--; in unmap_rx_buf() 610 unsigned int cred = fl->avail; in refill_fl() [all …]
|
/drivers/remoteproc/ |
D | remoteproc_core.c | 53 void *, int offset, int avail); 327 int offset, int avail) in rproc_handle_vdev() argument 335 + rsc->config_len > avail) { in rproc_handle_vdev() 404 int offset, int avail) in rproc_handle_trace() argument 411 if (sizeof(*rsc) > avail) { in rproc_handle_trace() 484 int offset, int avail) in rproc_handle_devmem() argument 494 if (sizeof(*rsc) > avail) { in rproc_handle_devmem() 556 int offset, int avail) in rproc_handle_carveout() argument 564 if (sizeof(*rsc) > avail) { in rproc_handle_carveout() 677 int offset, int avail) in rproc_count_vrings() argument [all …]
|
/drivers/net/ethernet/chelsio/cxgb4/ |
D | cxgb4_debugfs.c | 1634 loff_t avail = file_inode(file)->i_size; in flash_read() local 1639 if (pos >= avail) in flash_read() 1641 if (count > avail - pos) in flash_read() 1642 count = avail - pos; in flash_read() 2494 R("FL avail:", fl.avail); in sge_qinfo_show() 2636 loff_t avail = file_inode(file)->i_size; in mem_read() local 2644 if (pos >= avail) in mem_read() 2646 if (count > avail - pos) in mem_read() 2647 count = avail - pos; in mem_read() 2838 struct mem_desc avail[4]; in meminfo_show() local [all …]
|
/drivers/staging/lustre/lustre/ldlm/ |
D | ldlm_request.c | 548 int avail; in ldlm_req_handles_avail() local 550 avail = min_t(int, LDLM_MAXREQSIZE, PAGE_SIZE - 512) - req_size; in ldlm_req_handles_avail() 551 if (likely(avail >= 0)) in ldlm_req_handles_avail() 552 avail /= (int)sizeof(struct lustre_handle); in ldlm_req_handles_avail() 554 avail = 0; in ldlm_req_handles_avail() 555 avail += LDLM_LOCKREQ_HANDLES - off; in ldlm_req_handles_avail() 557 return avail; in ldlm_req_handles_avail() 593 int flags, avail, to_free, pack = 0; in ldlm_prep_elc_req() local 602 avail = ldlm_capsule_handles_avail(pill, RCL_CLIENT, canceloff); in ldlm_prep_elc_req() 613 if (avail > count) in ldlm_prep_elc_req() [all …]
|
/drivers/infiniband/hw/hfi1/ |
D | debugfs.c | 364 size_t avail; in dev_counters_read() local 369 avail = hfi1_read_cntrs(dd, NULL, &counters); in dev_counters_read() 370 rval = simple_read_from_buffer(buf, count, ppos, counters, avail); in dev_counters_read() 379 size_t avail; in dev_names_read() local 384 avail = hfi1_read_cntrs(dd, &names, NULL); in dev_names_read() 385 rval = simple_read_from_buffer(buf, count, ppos, names, avail); in dev_names_read() 404 size_t avail; in portnames_read() local 409 avail = hfi1_read_portcntrs(dd->pport, &names, NULL); in portnames_read() 410 rval = simple_read_from_buffer(buf, count, ppos, names, avail); in portnames_read() 419 size_t avail; in portcntrs_debugfs_read() local [all …]
|
/drivers/media/dvb-core/ |
D | dvb_ringbuffer.c | 88 ssize_t avail; in dvb_ringbuffer_avail() local 94 avail = smp_load_acquire(&rbuf->pwrite) - rbuf->pread; in dvb_ringbuffer_avail() 95 if (avail < 0) in dvb_ringbuffer_avail() 96 avail += rbuf->size; in dvb_ringbuffer_avail() 97 return avail; in dvb_ringbuffer_avail()
|
/drivers/virtio/ |
D | virtio_ring.c | 271 unsigned int i, n, avail, descs_used, uninitialized_var(prev), err_idx; in virtqueue_add() local 395 avail = vq->avail_idx_shadow & (vq->vring.num - 1); in virtqueue_add() 396 vq->vring.avail->ring[avail] = cpu_to_virtio16(_vq->vdev, head); in virtqueue_add() 402 vq->vring.avail->idx = cpu_to_virtio16(_vq->vdev, vq->avail_idx_shadow); in virtqueue_add() 734 vq->vring.avail->flags = cpu_to_virtio16(_vq->vdev, vq->avail_flags_shadow); in virtqueue_disable_cb() 767 vq->vring.avail->flags = cpu_to_virtio16(_vq->vdev, vq->avail_flags_shadow); in virtqueue_enable_cb_prepare() 839 vq->vring.avail->flags = cpu_to_virtio16(_vq->vdev, vq->avail_flags_shadow); in virtqueue_enable_cb_delayed() 881 vq->vring.avail->idx = cpu_to_virtio16(_vq->vdev, vq->avail_idx_shadow); in virtqueue_detach_unused_buf() 958 vq->vring.avail->flags = cpu_to_virtio16(vdev, vq->avail_flags_shadow); in __vring_new_virtqueue() 1184 ((char *)vq->vring.avail - (char *)vq->vring.desc); in virtqueue_get_avail_addr()
|
/drivers/platform/goldfish/ |
D | goldfish_pipe.c | 197 unsigned long address, unsigned long avail, in access_with_param() argument 207 aps->size = avail; in access_with_param() 253 unsigned long next, avail; in goldfish_pipe_read_write() local 301 avail = next - address; in goldfish_pipe_read_write() 307 xaddr, avail, pipe, &status)) { in goldfish_pipe_read_write() 310 writel(avail, dev->base + PIPE_REG_SIZE); in goldfish_pipe_read_write()
|
/drivers/infiniband/sw/rdmavt/ |
D | trace.h | 148 __field(u32, avail) 161 __entry->avail = qp->s_avail; 175 __entry->avail,
|
/drivers/gpu/drm/msm/mdp/mdp5/ |
D | mdp5_smp.c | 143 int i, ret, avail, cur_nblks, cnt = smp->blk_cnt; in smp_request_block() local 156 avail = cnt - bitmap_weight(smp->state, cnt); in smp_request_block() 157 if (nblks > avail) { in smp_request_block() 159 nblks, avail); in smp_request_block()
|