/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 | 135 iv->avail = kmalloc(size, GFP_KERNEL); in airq_iv_create() 136 if (!iv->avail) in airq_iv_create() 138 memset(iv->avail, 0xff, size); in airq_iv_create() 165 kfree(iv->avail); in airq_iv_create() 183 kfree(iv->avail); in airq_iv_release() 201 if (!iv->avail || num == 0) in airq_iv_alloc() 204 bit = find_first_bit_inv(iv->avail, iv->bits); in airq_iv_alloc() 207 if (!test_bit_inv(bit + i, iv->avail)) in airq_iv_alloc() 212 clear_bit_inv(bit + i, iv->avail); in airq_iv_alloc() 217 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/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() 467 err = getu16(vrh, &flags, &vrh->vring.avail->flags); in __vringh_need_notify() 470 &vrh->vring.avail->flags); in __vringh_need_notify() 503 u16 avail; in __vringh_notify_enable() local 525 if (getu16(vrh, &avail, &vrh->vring.avail->idx) != 0) { in __vringh_notify_enable() 527 &vrh->vring.avail->idx); in __vringh_notify_enable() 534 return avail == vrh->last_avail_idx; in __vringh_notify_enable() [all …]
|
D | vhost.c | 48 #define vhost_used_event(vq) ((__virtio16 __user *)&vq->avail->ring[vq->num]) 290 vq->avail = NULL; in vhost_vq_reset() 1112 struct vring_avail __user *avail, in vq_access_ok() argument 1119 access_ok(VERIFY_READ, avail, in vq_access_ok() 1120 sizeof *avail + num * sizeof *avail->ring + s) && in vq_access_ok() 1164 iotlb_access_ok(vq, VHOST_ACCESS_RO, (u64)(uintptr_t)vq->avail, in vq_iotlb_prefetch() 1165 sizeof *vq->avail + in vq_iotlb_prefetch() 1166 num * sizeof *vq->avail->ring + s) && in vq_iotlb_prefetch() 1206 return vq_access_ok(vq, vq->num, vq->desc, vq->avail, vq->used); in vhost_vq_access_ok() 1377 BUILD_BUG_ON(__alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE); in vhost_vring_ioctl() [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/misc/mic/host/ |
D | mic_debugfs.c | 215 struct vring_avail *avail; in mic_vdev_info_show() local 239 avail = vrh->vring.avail; in mic_vdev_info_show() 241 vringh16_to_cpu(vrh, avail->flags), in mic_vdev_info_show() 242 vringh16_to_cpu(vrh, avail->idx) & (num - 1)); in mic_vdev_info_show() 244 vringh16_to_cpu(vrh, avail->flags), in mic_vdev_info_show() 245 vringh16_to_cpu(vrh, avail->idx)); in mic_vdev_info_show() 248 j, avail->ring[j]); in mic_vdev_info_show()
|
/drivers/pci/ |
D | bus.c | 137 struct resource *r, avail; in pci_bus_alloc_from_region() local 158 avail = *r; in pci_bus_alloc_from_region() 159 pci_clip_resource_to_region(bus, &avail, region); in pci_bus_alloc_from_region() 167 if (avail.start) in pci_bus_alloc_from_region() 168 min_used = avail.start; in pci_bus_alloc_from_region() 170 max = avail.end; in pci_bus_alloc_from_region()
|
/drivers/staging/rdma/hfi1/ |
D | debugfs.c | 338 size_t avail; in dev_counters_read() local 344 avail = hfi1_read_cntrs(dd, *ppos, NULL, &counters); in dev_counters_read() 345 rval = simple_read_from_buffer(buf, count, ppos, counters, avail); in dev_counters_read() 355 size_t avail; in dev_names_read() local 361 avail = hfi1_read_cntrs(dd, *ppos, &names, NULL); in dev_names_read() 362 rval = simple_read_from_buffer(buf, count, ppos, names, avail); in dev_names_read() 382 size_t avail; in portnames_read() local 389 avail = hfi1_read_portcntrs(dd, *ppos, 0, &names, NULL); in portnames_read() 390 rval = simple_read_from_buffer(buf, count, ppos, names, avail); in portnames_read() 400 size_t avail; in portcntrs_debugfs_read() local [all …]
|
/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/net/ethernet/chelsio/cxgb4/ |
D | cxgb4_debugfs.c | 1509 loff_t avail = file_inode(file)->i_size; in flash_read() local 1514 if (pos >= avail) in flash_read() 1516 if (count > avail - pos) in flash_read() 1517 count = avail - pos; in flash_read() 2310 R("FL avail:", fl.avail); in sge_qinfo_show() 2353 R("FL avail:", fl.avail); in sge_qinfo_show() 2382 R("FL avail:", fl.avail); in sge_qinfo_show() 2521 loff_t avail = file_inode(file)->i_size; in mem_read() local 2529 if (pos >= avail) in mem_read() 2531 if (count > avail - pos) in mem_read() [all …]
|
D | sge.c | 249 return fl->avail - fl->pend_cred <= s->fl_starve_thres; in fl_starving() 427 int avail = reclaimable(q); in reclaim_completed_tx() local 429 if (avail) { in reclaim_completed_tx() 434 if (avail > MAX_TX_RECLAIM) in reclaim_completed_tx() 435 avail = MAX_TX_RECLAIM; in reclaim_completed_tx() 437 free_tx_desc(adap, q, avail, unmap); in reclaim_completed_tx() 438 q->in_use -= avail; in reclaim_completed_tx() 495 q->avail--; in free_rx_bufs() 520 q->avail--; in unmap_rx_buf() 585 unsigned int cred = q->avail; in refill_fl() [all …]
|
/drivers/remoteproc/ |
D | remoteproc_core.c | 53 void *, int offset, int avail); 331 int offset, int avail) in rproc_handle_vdev() argument 339 + rsc->config_len > avail) { in rproc_handle_vdev() 408 int offset, int avail) in rproc_handle_trace() argument 415 if (sizeof(*rsc) > avail) { in rproc_handle_trace() 488 int offset, int avail) in rproc_handle_devmem() argument 498 if (sizeof(*rsc) > avail) { in rproc_handle_devmem() 560 int offset, int avail) in rproc_handle_carveout() argument 569 if (sizeof(*rsc) > avail) { in rproc_handle_carveout() 682 int offset, int avail) in rproc_count_vrings() argument [all …]
|
/drivers/virtio/ |
D | virtio_ring.c | 266 unsigned int i, n, avail, descs_used, uninitialized_var(prev), err_idx; in virtqueue_add() local 390 avail = vq->avail_idx_shadow & (vq->vring.num - 1); in virtqueue_add() 391 vq->vring.avail->ring[avail] = cpu_to_virtio16(_vq->vdev, head); in virtqueue_add() 397 vq->vring.avail->idx = cpu_to_virtio16(_vq->vdev, vq->avail_idx_shadow); in virtqueue_add() 730 vq->vring.avail->flags = cpu_to_virtio16(_vq->vdev, vq->avail_flags_shadow); in virtqueue_disable_cb() 763 vq->vring.avail->flags = cpu_to_virtio16(_vq->vdev, vq->avail_flags_shadow); in virtqueue_enable_cb_prepare() 838 vq->vring.avail->flags = cpu_to_virtio16(_vq->vdev, vq->avail_flags_shadow); in virtqueue_enable_cb_delayed() 877 vq->vring.avail->idx = cpu_to_virtio16(_vq->vdev, vq->avail_idx_shadow); in virtqueue_detach_unused_buf() 959 vq->vring.avail->flags = cpu_to_virtio16(vdev, vq->avail_flags_shadow); in vring_new_virtqueue() 1047 return vq->vring.avail; in virtqueue_get_avail()
|
/drivers/staging/lustre/lustre/ldlm/ |
D | ldlm_request.c | 533 int avail; in ldlm_req_handles_avail() local 535 avail = min_t(int, LDLM_MAXREQSIZE, PAGE_CACHE_SIZE - 512) - req_size; in ldlm_req_handles_avail() 536 if (likely(avail >= 0)) in ldlm_req_handles_avail() 537 avail /= (int)sizeof(struct lustre_handle); in ldlm_req_handles_avail() 539 avail = 0; in ldlm_req_handles_avail() 540 avail += LDLM_LOCKREQ_HANDLES - off; in ldlm_req_handles_avail() 542 return avail; in ldlm_req_handles_avail() 578 int flags, avail, to_free, pack = 0; in ldlm_prep_elc_req() local 587 avail = ldlm_capsule_handles_avail(pill, RCL_CLIENT, canceloff); in ldlm_prep_elc_req() 597 if (avail > count) in ldlm_prep_elc_req() [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/tty/ |
D | goldfish.c | 108 unsigned long avail = next - address; in goldfish_tty_rw() local 114 avail, dma_dir); in goldfish_tty_rw() 120 do_rw_io(qtty, dma_handle, avail, is_write); in goldfish_tty_rw() 125 dma_unmap_single(qtty->dev, dma_handle, avail, dma_dir); in goldfish_tty_rw() 127 address += avail; in goldfish_tty_rw()
|
/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()
|
/drivers/platform/goldfish/ |
D | goldfish_pipe_v1.c | 185 unsigned long address, unsigned long avail, in access_with_param() argument 195 aps->size = avail; in access_with_param() 281 unsigned long avail; in goldfish_pipe_read_write() local 335 avail = min(page_end, address_end) - address; in goldfish_pipe_read_write() 337 status = transfer_pages(dev, pipe, pipe_cmd, xaddr, avail); in goldfish_pipe_read_write()
|