/openbmc/linux/arch/x86/kernel/ |
H A D | resource.c | 28 static void remove_e820_regions(struct resource *avail) in remove_e820_regions() argument 33 struct resource orig = *avail; in remove_e820_regions() 43 resource_clip(avail, e820_start, e820_end); in remove_e820_regions() 44 if (orig.start != avail->start || orig.end != avail->end) { in remove_e820_regions() 47 if (avail->end > avail->start) in remove_e820_regions() 54 &avail->start, &avail->end); in remove_e820_regions() 55 orig = *avail; in remove_e820_regions() 60 void arch_remove_reservations(struct resource *avail) in arch_remove_reservations() argument 67 if (avail->flags & IORESOURCE_MEM) { in arch_remove_reservations() 68 resource_clip(avail, BIOS_ROM_BASE, BIOS_ROM_END); in arch_remove_reservations() [all …]
|
/openbmc/linux/drivers/iio/potentiometer/ |
H A D | mcp4531.c | 38 int avail[3]; member 78 [MCP453x_502] = { .wipers = 1, .avail = { 0, 1, 128 }, .kohms = 5, }, 79 [MCP453x_103] = { .wipers = 1, .avail = { 0, 1, 128 }, .kohms = 10, }, 80 [MCP453x_503] = { .wipers = 1, .avail = { 0, 1, 128 }, .kohms = 50, }, 81 [MCP453x_104] = { .wipers = 1, .avail = { 0, 1, 128 }, .kohms = 100, }, 82 [MCP454x_502] = { .wipers = 1, .avail = { 0, 1, 128 }, .kohms = 5, }, 83 [MCP454x_103] = { .wipers = 1, .avail = { 0, 1, 128 }, .kohms = 10, }, 157 *val2 = data->cfg->avail[2]; in mcp4531_read_raw() 173 *length = ARRAY_SIZE(data->cfg->avail); in mcp4531_read_avail() 174 *vals = data->cfg->avail; in mcp4531_read_avail() [all …]
|
H A D | tpl0102.c | 18 int avail[3]; member 31 [CAT5140_503] = { .wipers = 1, .avail = { 0, 1, 255 }, .kohms = 50, }, 32 [CAT5140_104] = { .wipers = 1, .avail = { 0, 1, 255 }, .kohms = 100, }, 34 [TPL0102_104] = { .wipers = 2, .avail = { 0, 1, 255 }, .kohms = 100 }, 35 [TPL0401_103] = { .wipers = 1, .avail = { 0, 1, 127 }, .kohms = 10, }, 77 *val2 = data->cfg->avail[2] + 1; in tpl0102_read_raw() 93 *length = ARRAY_SIZE(data->cfg->avail); in tpl0102_read_avail() 94 *vals = data->cfg->avail; in tpl0102_read_avail() 111 if (val > data->cfg->avail[2] || val < 0) in tpl0102_write_raw()
|
H A D | ds1803.c | 36 int avail[3]; member 103 .avail = { 0, 1, 255 }, 111 .avail = { 0, 1, 255 }, 119 .avail = { 0, 1, 255 }, 127 .avail = { 0, 1, 127 }, 152 *val2 = data->cfg->avail[2]; /* Max wiper position */ in ds1803_read_raw() 165 int max_pos = data->cfg->avail[2]; in ds1803_write_raw() 191 *vals = data->cfg->avail; in ds1803_read_avail() 192 *length = ARRAY_SIZE(data->cfg->avail); in ds1803_read_avail()
|
/openbmc/linux/drivers/xen/xenbus/ |
H A D | xenbus_comms.c | 130 if (avail == 0) in xb_write() 132 if (avail > len) in xb_write() 133 avail = len; in xb_write() 136 data += avail; in xb_write() 137 len -= avail; in xb_write() 138 bytes += avail; in xb_write() 180 if (avail == 0) in xb_read() 183 avail = len; in xb_read() 189 data += avail; in xb_read() 190 len -= avail; in xb_read() [all …]
|
/openbmc/qemu/hw/char/ |
H A D | sclpconsole.c | 60 if (avail == 0) { in DECLARE_INSTANCE_CHECKER() 63 return avail; in DECLARE_INSTANCE_CHECKER() 105 int avail) in get_console_data() argument 111 avail--; in get_console_data() 113 if (avail >= cons->iov_sclp_rest) { in get_console_data() 126 *size = avail + 1; in get_console_data() 127 cons->iov_sclp_rest -= avail; in get_console_data() 128 cons->iov_sclp += avail; in get_console_data() 140 int avail; in read_event_data() local 151 avail = *slen - sizeof(ASCIIConsoleData); in read_event_data() [all …]
|
/openbmc/linux/tools/virtio/ringtest/ |
H A D | virtio_ring_0_9.c | 103 unsigned avail; in add_inbuf() local 135 avail = guest.avail_idx++; in add_inbuf() 136 ring.avail->ring[avail & (ring_size - 1)] = in add_inbuf() 137 (head | (avail & ~(ring_size - 1))) ^ 0x8000; in add_inbuf() 142 avail = (ring_size - 1) & (guest.avail_idx++); in add_inbuf() 143 ring.avail->ring[avail] = head; in add_inbuf() 148 ring.avail->idx = guest.avail_idx; in add_inbuf() 266 return head == ring.avail->idx; in avail_empty() 277 head = ring.avail->ring[used_idx & (ring_size - 1)]; in use_buf() 286 if (used_idx == ring.avail->idx) in use_buf() [all …]
|
/openbmc/u-boot/cmd/ |
H A D | trace.c | 33 size_t buff_size, avail, buff_ptr, used; in create_func_list() local 41 avail = buff_size - buff_ptr; in create_func_list() 42 err = trace_list_functions(buff + buff_ptr, avail, &needed); in create_func_list() 45 used = min(avail, (size_t)needed); in create_func_list() 57 size_t buff_size, avail, buff_ptr, used; in create_call_list() local 65 avail = buff_size - buff_ptr; in create_call_list() 66 err = trace_list_calls(buff + buff_ptr, avail, &needed); in create_call_list() 69 used = min(avail, (size_t)needed); in create_call_list()
|
/openbmc/linux/sound/soc/sof/ |
H A D | ipc4-mtrace.c | 196 u32 avail; in sof_ipc4_mtrace_dfs_read() local 208 avail = 0; in sof_ipc4_mtrace_dfs_read() 209 if (copy_to_user(buffer, &avail, sizeof(avail))) in sof_ipc4_mtrace_dfs_read() 231 if (!avail) in sof_ipc4_mtrace_dfs_read() 235 avail = log_buffer_size; in sof_ipc4_mtrace_dfs_read() 238 if (avail > count - sizeof(avail)) in sof_ipc4_mtrace_dfs_read() 239 avail = count - sizeof(avail); in sof_ipc4_mtrace_dfs_read() 252 avail - write_ptr); in sof_ipc4_mtrace_dfs_read() 261 ret = copy_to_user(buffer, &avail, sizeof(avail)); in sof_ipc4_mtrace_dfs_read() 266 ret = copy_to_user(buffer + sizeof(avail), log_buffer, avail); in sof_ipc4_mtrace_dfs_read() [all …]
|
/openbmc/linux/drivers/s390/cio/ |
H A D | airq.c | 157 iv->avail = kmalloc(size, GFP_KERNEL); in airq_iv_create() 158 if (!iv->avail) in airq_iv_create() 160 memset(iv->avail, 0xff, size); in airq_iv_create() 187 kfree(iv->avail); in airq_iv_create() 211 kfree(iv->avail); in airq_iv_release() 229 if (!iv->avail || num == 0) in airq_iv_alloc() 232 bit = find_first_bit_inv(iv->avail, iv->bits); in airq_iv_alloc() 235 if (!test_bit_inv(bit + i, iv->avail)) in airq_iv_alloc() 240 clear_bit_inv(bit + i, iv->avail); in airq_iv_alloc() 264 if (!iv->avail || num == 0) in airq_iv_free() [all …]
|
/openbmc/linux/sound/core/ |
H A D | compress_offload.c | 184 memset(avail, 0, sizeof(*avail)); in snd_compr_calc_avail() 208 avail->avail = stream->runtime->total_bytes_available - in snd_compr_calc_avail() 211 avail->avail = stream->runtime->buffer_size - avail->avail; in snd_compr_calc_avail() 213 pr_debug("ret avail as %lld\n", avail->avail); in snd_compr_calc_avail() 214 return avail->avail; in snd_compr_calc_avail() 228 size_t avail; in snd_compr_ioctl_avail() local 231 ioctl_avail.avail = avail; in snd_compr_ioctl_avail() 284 size_t avail; in snd_compr_write() local 307 avail = count; in snd_compr_write() 335 size_t avail; in snd_compr_read() local [all …]
|
H A D | rawmidi.c | 177 runtime->avail = 0; in snd_rawmidi_runtime_create() 818 status->avail = runtime->avail; in snd_rawmidi_output_status() 831 status->avail = runtime->avail; in snd_rawmidi_input_status() 871 .avail = status64.avail, in snd_rawmidi_ioctl_status32() 1200 runtime->avail++; in snd_rawmidi_receive() 1218 runtime->avail += count1; in snd_rawmidi_receive() 1265 count1 = runtime->avail; in snd_rawmidi_kernel_read1() 1337 if (!runtime->avail) { in snd_rawmidi_read() 1486 runtime->avail += count; in __snd_rawmidi_transmit_ack() 1792 avail = runtime->avail; in snd_rawmidi_proc_info_read() [all …]
|
/openbmc/linux/net/rds/ |
H A D | stats.c | 120 unsigned int avail; in rds_stats_info() local 122 avail = len / sizeof(struct rds_info_counter); in rds_stats_info() 124 if (avail < ARRAY_SIZE(rds_stat_names)) { in rds_stats_info() 125 avail = 0; in rds_stats_info() 138 avail -= ARRAY_SIZE(rds_stat_names); in rds_stats_info() 142 lens->nr = rds_trans_stats_info_copy(iter, avail) + in rds_stats_info()
|
H A D | ib_ring.c | 99 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()
|
/openbmc/linux/drivers/infiniband/hw/qib/ |
H A D | qib_fs.c | 148 size_t avail; in dev_counters_read() local 151 avail = dd->f_read_cntrs(dd, *ppos, NULL, &counters); 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() 194 size_t avail; in portcntrs_1_read() local 197 avail = dd->f_read_portcntrs(dd, *ppos, 0, NULL, &counters); in portcntrs_1_read() 206 size_t avail; in portcntrs_2_read() local [all …]
|
/openbmc/linux/arch/mips/cavium-octeon/crypto/ |
H A D | octeon-md5.c | 85 const u32 avail = sizeof(mctx->block) - (mctx->byte_count & 0x3f); in octeon_md5_update() local 91 if (avail > len) { in octeon_md5_update() 92 memcpy((char *)mctx->block + (sizeof(mctx->block) - avail), in octeon_md5_update() 97 memcpy((char *)mctx->block + (sizeof(mctx->block) - avail), data, in octeon_md5_update() 98 avail); in octeon_md5_update() 104 data += avail; in octeon_md5_update() 105 len -= avail; in octeon_md5_update()
|
/openbmc/qemu/ui/ |
H A D | input-barrier.c | 345 int avail, len; in writecmd() local 348 avail = MAX_HELLO_LENGTH; in writecmd() 352 avail -= sizeof(int); in writecmd() 365 write_string(p, ib->name, avail); in writecmd() 371 write_cmd(p, barrierCmdDInfo, avail); in writecmd() 372 write_short(p, ib->x_origin, avail); in writecmd() 373 write_short(p, ib->y_origin, avail); in writecmd() 374 write_short(p, ib->width, avail); in writecmd() 375 write_short(p, ib->height, avail); in writecmd() 461 avail = sizeof(len); in writecmd() [all …]
|
/openbmc/linux/drivers/pci/msi/ |
H A D | legacy.c | 54 int avail = 0; in pci_msi_setup_check_result() local 61 avail++; in pci_msi_setup_check_result() 63 return avail ? avail : ret; in pci_msi_setup_check_result()
|
/openbmc/linux/arch/ia64/kernel/ |
H A D | palinfo.c | 536 avail & 0x1 ? (status & 0x1 ? in feature_set_info() 538 avail & 0x1 ? (control & 0x1 ? in feature_set_info() 544 avail & 0x1 ? (status & 0x1 ? in feature_set_info() 546 avail & 0x1 ? (control & 0x1 ? in feature_set_info() 554 u64 avail=1, status=1, control=1, feature_set=0; in processor_info() local 558 ret = ia64_pal_proc_get_features(&avail, &status, &control, in processor_info() 568 feature_set_info(m, avail, status, control, feature_set); in processor_info() 605 u64 avail, status, control; in bus_info() local 612 avail = av.pal_bus_features_val; in bus_info() 620 avail & 0x1 ? "" : "NotImpl", in bus_info() [all …]
|
/openbmc/linux/drivers/crypto/marvell/octeontx2/ |
H A D | otx2_cptpf_ucode.c | 511 avail->se_cnt += val; in update_engines_avail_count() 515 avail->ie_cnt += val; in update_engines_avail_count() 519 avail->ae_cnt += val; in update_engines_avail_count() 539 engs->offset = avail->max_se_cnt; in update_engines_offset() 543 engs->offset = avail->max_se_cnt + avail->max_ie_cnt; in update_engines_offset() 621 avail_cnt = grp->g->avail.se_cnt; in check_engines_availability() 625 avail_cnt = grp->g->avail.ie_cnt; in check_engines_availability() 1369 eng_grps->avail.se_cnt = eng_grps->avail.max_se_cnt; in otx2_cpt_init_eng_grps() 1370 eng_grps->avail.ie_cnt = eng_grps->avail.max_ie_cnt; in otx2_cpt_init_eng_grps() 1371 eng_grps->avail.ae_cnt = eng_grps->avail.max_ae_cnt; in otx2_cpt_init_eng_grps() [all …]
|
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/ |
H A D | uar.c | 211 unsigned int *avail; in alloc_bfreg() local 237 avail = &up->fp_avail; in alloc_bfreg() 240 avail = &up->reg_avail; in alloc_bfreg() 244 (*avail)--; in alloc_bfreg() 245 if (!(*avail)) in alloc_bfreg() 296 unsigned int *avail; in mlx5_free_bfreg() local 312 avail = &up->fp_avail; in mlx5_free_bfreg() 315 avail = &up->reg_avail; in mlx5_free_bfreg() 319 (*avail)++; in mlx5_free_bfreg() 321 if (*avail == 1) in mlx5_free_bfreg()
|
/openbmc/linux/arch/powerpc/crypto/ |
H A D | md5-glue.c | 48 unsigned int avail = 64 - offset; in ppc_md5_update() local 53 if (avail > len) { in ppc_md5_update() 59 memcpy((char *)sctx->block + offset, src, avail); in ppc_md5_update() 61 len -= avail; in ppc_md5_update() 62 src += avail; in ppc_md5_update()
|
/openbmc/qemu/audio/ |
H A D | pwaudio.c | 89 int32_t avail; in playback_on_process() local 115 if (avail <= 0) { in playback_on_process() 125 n_bytes = avail; in playback_on_process() 227 int32_t avail; in qpw_read() local 242 len = avail; in qpw_read() 263 int32_t filled, avail; in qpw_buffer_get_free() local 269 avail = 0; in qpw_buffer_get_free() 278 return avail; in qpw_buffer_get_free() 288 int32_t filled, avail; in qpw_write() local 302 if (len > avail) { in qpw_write() [all …]
|
/openbmc/u-boot/drivers/virtio/ |
H A D | virtio_ring.c | 21 unsigned int i, n, avail, descs_used, uninitialized_var(prev); in virtqueue_add() local 80 avail = vq->avail_idx_shadow & (vq->vring.num - 1); in virtqueue_add() 81 vq->vring.avail->ring[avail] = cpu_to_virtio16(vq->vdev, head); in virtqueue_add() 89 vq->vring.avail->idx = cpu_to_virtio16(vq->vdev, vq->avail_idx_shadow); in virtqueue_add() 232 vq->vring.avail->flags = cpu_to_virtio16(vdev, in __vring_new_virtqueue() 308 ((char *)vq->vring.avail - (char *)vq->vring.desc); in virtqueue_get_avail_addr() 345 vq->vring.avail->flags, vq->vring.avail->idx); in virtqueue_dump() 348 i, vq->vring.avail->ring[i]); in virtqueue_dump()
|
/openbmc/qemu/include/standard-headers/linux/ |
H A D | virtio_ring.h | 161 vring_avail_t *avail; member 194 #define vring_used_event(vr) ((vr)->avail->ring[(vr)->num]) 202 vr->avail = (struct vring_avail *)((char *)p + num * sizeof(struct vring_desc)); in vring_init() 203 vr->used = (void *)(((uintptr_t)&vr->avail->ring[num] + sizeof(__virtio16) in vring_init()
|