Home
last modified time | relevance | path

Searched refs:avail (Results 1 – 25 of 165) sorted by relevance

1234567

/linux-3.4.99/drivers/xen/xenbus/
Dxenbus_comms.c100 unsigned int avail; in xb_write() local
117 dst = get_output_chunk(cons, prod, intf->req, &avail); in xb_write()
118 if (avail == 0) in xb_write()
120 if (avail > len) in xb_write()
121 avail = len; in xb_write()
126 memcpy(dst, data, avail); in xb_write()
127 data += avail; in xb_write()
128 len -= avail; in xb_write()
132 intf->req_prod += avail; in xb_write()
159 unsigned int avail; in xb_read() local
[all …]
/linux-3.4.99/arch/x86/kernel/
Dresource.c25 static void remove_e820_regions(struct resource *avail) in remove_e820_regions() argument
33 resource_clip(avail, entry->addr, in remove_e820_regions()
38 void arch_remove_reservations(struct resource *avail) in arch_remove_reservations() argument
41 if (avail->flags & IORESOURCE_MEM) { in arch_remove_reservations()
42 if (avail->start < BIOS_END) in arch_remove_reservations()
43 avail->start = BIOS_END; in arch_remove_reservations()
44 resource_clip(avail, BIOS_ROM_BASE, BIOS_ROM_END); in arch_remove_reservations()
46 remove_e820_regions(avail); in arch_remove_reservations()
/linux-3.4.99/fs/squashfs/
Dlzo_wrapper.c83 int avail, i, bytes = length, res; in lzo_uncompress() local
93 avail = min(bytes, msblk->devblksize - offset); in lzo_uncompress()
94 memcpy(buff, bh[i]->b_data + offset, avail); in lzo_uncompress()
95 buff += avail; in lzo_uncompress()
96 bytes -= avail; in lzo_uncompress()
108 avail = min_t(int, bytes, PAGE_CACHE_SIZE); in lzo_uncompress()
109 memcpy(buffer[i], buff, avail); in lzo_uncompress()
110 buff += avail; in lzo_uncompress()
111 bytes -= avail; in lzo_uncompress()
Dblock.c96 int bytes, compressed, b = 0, k = 0, page = 0, avail; in squashfs_read_data() local
186 avail = min_t(int, in, PAGE_CACHE_SIZE - in squashfs_read_data()
189 bh[k]->b_data + offset, avail); in squashfs_read_data()
190 in -= avail; in squashfs_read_data()
191 pg_offset += avail; in squashfs_read_data()
192 offset += avail; in squashfs_read_data()
Dxz_wrapper.c111 int avail, total = 0, k = 0, page = 0; in squashfs_xz_uncompress() local
125 avail = min(length, msblk->devblksize - offset); in squashfs_xz_uncompress()
126 length -= avail; in squashfs_xz_uncompress()
132 stream->buf.in_size = avail; in squashfs_xz_uncompress()
/linux-3.4.99/drivers/tty/serial/
Dmsm_smd_tty.c55 int avail; in smd_tty_notify() local
69 avail = smd_read_avail(info->ch); in smd_tty_notify()
70 if (avail == 0) in smd_tty_notify()
73 avail = tty_prepare_flip_string(tty, &ptr, avail); in smd_tty_notify()
75 if (smd_read(info->ch, ptr, avail) != avail) { in smd_tty_notify()
151 int avail; in smd_tty_write() local
157 avail = smd_write_avail(info->ch); in smd_tty_write()
158 if (len > avail) in smd_tty_write()
159 len = avail; in smd_tty_write()
/linux-3.4.99/drivers/uwb/
Ddrp-avail.c61 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()
/linux-3.4.99/net/rds/
Dstats.c116 unsigned int avail; in rds_stats_info() local
118 avail = len / sizeof(struct rds_info_counter); in rds_stats_info()
120 if (avail < ARRAY_SIZE(rds_stat_names)) { in rds_stats_info()
121 avail = 0; in rds_stats_info()
134 avail -= ARRAY_SIZE(rds_stat_names); in rds_stats_info()
138 lens->nr = rds_trans_stats_info_copy(iter, avail) + in rds_stats_info()
Dib_ring.c99 u32 ret = 0, avail; in rds_ib_ring_alloc() local
101 avail = ring->w_nr - __rds_ib_ring_used(ring); in rds_ib_ring_alloc()
104 ring->w_alloc_ptr, avail); in rds_ib_ring_alloc()
106 if (val && avail) { in rds_ib_ring_alloc()
107 ret = min(val, avail); in rds_ib_ring_alloc()
Diw_ring.c99 u32 ret = 0, avail; in rds_iw_ring_alloc() local
101 avail = ring->w_nr - __rds_iw_ring_used(ring); in rds_iw_ring_alloc()
104 ring->w_alloc_ptr, avail); in rds_iw_ring_alloc()
106 if (val && avail) { in rds_iw_ring_alloc()
107 ret = min(val, avail); in rds_iw_ring_alloc()
Dtransport.c111 unsigned int avail) in rds_trans_stats_info_copy() argument
128 part = trans->stats_info_copy(iter, avail); in rds_trans_stats_info_copy()
129 avail -= min(avail, part); in rds_trans_stats_info_copy()
/linux-3.4.99/crypto/
Dmd5.c66 const u32 avail = sizeof(mctx->block) - (mctx->byte_count & 0x3f); in md5_update() local
70 if (avail > len) { in md5_update()
71 memcpy((char *)mctx->block + (sizeof(mctx->block) - avail), in md5_update()
76 memcpy((char *)mctx->block + (sizeof(mctx->block) - avail), in md5_update()
77 data, avail); in md5_update()
80 data += avail; in md5_update()
81 len -= avail; in md5_update()
/linux-3.4.99/sound/core/
Drawmidi.c84 return runtime->avail >= runtime->avail_min; in snd_rawmidi_ready()
91 return runtime->avail >= runtime->avail_min && in snd_rawmidi_ready_append()
92 (!substream->append || runtime->avail >= count); in snd_rawmidi_ready_append()
117 runtime->avail = 0; in snd_rawmidi_runtime_create()
119 runtime->avail = runtime->buffer_size; in snd_rawmidi_runtime_create()
164 runtime->avail = runtime->buffer_size; in snd_rawmidi_drop_output()
178 (runtime->avail >= runtime->buffer_size), in snd_rawmidi_drain_output()
182 if (runtime->avail < runtime->buffer_size && !timeout) { in snd_rawmidi_drain_output()
183 … "rawmidi drain error (avail = %li, buffer_size = %li)\n", (long)runtime->avail, (long)runtime->bu… in snd_rawmidi_drain_output()
207 runtime->avail = 0; in snd_rawmidi_drain_input()
[all …]
Dcompress_offload.c162 struct snd_compr_avail *avail) in snd_compr_calc_avail() argument
166 snd_compr_update_tstamp(stream, &avail->tstamp); in snd_compr_calc_avail()
200 avail->avail = avail_calc; in snd_compr_calc_avail()
206 struct snd_compr_avail avail; in snd_compr_get_avail() local
208 return snd_compr_calc_avail(stream, &avail); in snd_compr_get_avail()
215 size_t avail; in snd_compr_ioctl_avail() local
217 avail = snd_compr_calc_avail(stream, &ioctl_avail); in snd_compr_ioctl_avail()
218 ioctl_avail.avail = avail; in snd_compr_ioctl_avail()
259 size_t avail; in snd_compr_write() local
274 avail = snd_compr_get_avail(stream); in snd_compr_write()
[all …]
/linux-3.4.99/drivers/infiniband/hw/qib/
Dqib_fs.c148 size_t avail; in dev_counters_read() local
151 avail = dd->f_read_cntrs(dd, *ppos, NULL, &counters); in dev_counters_read()
152 return simple_read_from_buffer(buf, count, ppos, counters, avail); in dev_counters_read()
160 size_t avail; in dev_names_read() local
163 avail = dd->f_read_cntrs(dd, *ppos, &names, NULL); in dev_names_read()
164 return simple_read_from_buffer(buf, count, ppos, names, avail); in dev_names_read()
182 size_t avail; in portnames_read() local
185 avail = dd->f_read_portcntrs(dd, *ppos, 0, &names, NULL); in portnames_read()
186 return simple_read_from_buffer(buf, count, ppos, names, avail); in portnames_read()
194 size_t avail; in portcntrs_1_read() local
[all …]
/linux-3.4.99/drivers/media/dvb/ngene/
Dngene-dvb.c73 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()
/linux-3.4.99/drivers/virtio/
Dvirtio_ring.c206 unsigned int i, avail, uninitialized_var(prev); in virtqueue_add_buf() local
279 avail = (vq->vring.avail->idx & (vq->vring.num-1)); in virtqueue_add_buf()
280 vq->vring.avail->ring[avail] = head; in virtqueue_add_buf()
285 vq->vring.avail->idx++; in virtqueue_add_buf()
322 old = vq->vring.avail->idx - vq->num_added; in virtqueue_kick_prepare()
323 new = vq->vring.avail->idx; in virtqueue_kick_prepare()
466 if (!(vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT)) { in virtqueue_get_buf()
493 vq->vring.avail->flags |= VRING_AVAIL_F_NO_INTERRUPT; in virtqueue_disable_cb()
521 vq->vring.avail->flags &= ~VRING_AVAIL_F_NO_INTERRUPT; in virtqueue_enable_cb_prepare()
589 vq->vring.avail->flags &= ~VRING_AVAIL_F_NO_INTERRUPT; in virtqueue_enable_cb_delayed()
[all …]
/linux-3.4.99/include/linux/
Dvirtio_ring.h98 struct vring_avail *avail; member
129 #define vring_used_event(vr) ((vr)->avail->ring[(vr)->num])
137 vr->avail = p + num*sizeof(struct vring_desc); in vring_init()
138 vr->used = (void *)(((unsigned long)&vr->avail->ring[num] + sizeof(__u16) in vring_init()
/linux-3.4.99/lib/
Dgenalloc.c188 atomic_set(&chunk->avail, size); in gen_pool_add_virt()
278 if (size > atomic_read(&chunk->avail)) in gen_pool_alloc()
297 atomic_sub(size, &chunk->avail); in gen_pool_alloc()
334 atomic_add(size, &chunk->avail); in gen_pool_free()
375 size_t avail = 0; in gen_pool_avail() local
379 avail += atomic_read(&chunk->avail); in gen_pool_avail()
381 return avail; in gen_pool_avail()
/linux-3.4.99/drivers/misc/
Dcs5535-mfgpt.c36 DECLARE_BITMAP(avail, MFGPT_MAX_TIMERS);
172 t = find_first_bit(mfgpt->avail, max); in cs5535_mfgpt_alloc_timer()
177 if (!test_bit(timer_nr, mfgpt->avail)) in cs5535_mfgpt_alloc_timer()
183 __clear_bit(timer_nr, mfgpt->avail); in cs5535_mfgpt_alloc_timer()
193 __set_bit(timer_nr, mfgpt->avail); in cs5535_mfgpt_alloc_timer()
220 __set_bit(timer->nr, timer->chip->avail); in cs5535_mfgpt_free_timer()
283 __set_bit(i, mfgpt->avail); in scan_timers()
/linux-3.4.99/drivers/block/
Dps3vram.c449 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 …]
/linux-3.4.99/kernel/
Daudit.c1240 int len, avail; in audit_log_vformat() local
1249 avail = skb_tailroom(skb); in audit_log_vformat()
1250 if (avail == 0) { in audit_log_vformat()
1251 avail = audit_expand(ab, AUDIT_BUFSIZ); in audit_log_vformat()
1252 if (!avail) in audit_log_vformat()
1256 len = vsnprintf(skb_tail_pointer(skb), avail, fmt, args); in audit_log_vformat()
1257 if (len >= avail) { in audit_log_vformat()
1261 avail = audit_expand(ab, in audit_log_vformat()
1262 max_t(unsigned, AUDIT_BUFSIZ, 1+len-avail)); in audit_log_vformat()
1263 if (!avail) in audit_log_vformat()
[all …]
/linux-3.4.99/arch/ia64/kernel/
Dpalinfo.c533 static char * feature_set_info(char *page, u64 avail, u64 status, u64 control, in feature_set_info() argument
541 for(i=0; i < 64; i++, avail >>=1, status >>=1, control >>=1) { in feature_set_info()
545 if (!(avail & 0x1)) /* Print only bits that are available */ in feature_set_info()
551 avail & 0x1 ? (status & 0x1 ? in feature_set_info()
553 avail & 0x1 ? (control & 0x1 ? in feature_set_info()
559 avail & 0x1 ? (status & 0x1 ? in feature_set_info()
561 avail & 0x1 ? (control & 0x1 ? in feature_set_info()
572 u64 avail=1, status=1, control=1, feature_set=0; in processor_info() local
576 ret = ia64_pal_proc_get_features(&avail, &status, &control, in processor_info()
586 p = feature_set_info(p, avail, status, control, feature_set); in processor_info()
[all …]
/linux-3.4.99/arch/cris/include/arch-v32/arch/hwregs/iop/
Diop_fifo_in_extra_defs.h115 unsigned int avail : 1; member
127 unsigned int avail : 1; member
139 unsigned int avail : 1; member
150 unsigned int avail : 1; member
/linux-3.4.99/drivers/staging/media/go7007/
Dsnd-go7007.c56 int avail; member
88 gosnd->avail += frames; in parse_audio_stream_data()
101 if (gosnd->avail < runtime->period_size) { in parse_audio_stream_data()
105 gosnd->avail -= runtime->period_size; in parse_audio_stream_data()
184 gosnd->hw_ptr = gosnd->w_idx = gosnd->avail = 0; in go7007_snd_pcm_trigger()
249 gosnd->hw_ptr = gosnd->w_idx = gosnd->avail = 0; in go7007_snd_init()

1234567