/openbmc/linux/drivers/accel/habanalabs/common/ |
H A D | habanalabs_ioctl.c | 119 u32 size, max_size = args->return_size; in hw_events_info() local 123 if ((!max_size) || (!out)) in hw_events_info() 132 return copy_to_user(out, arr, min(max_size, size)) ? -EFAULT : 0; in hw_events_info() 137 u32 max_size = args->return_size; in events_info() local 141 if ((max_size < sizeof(u64)) || (!out)) in events_info() 156 u32 max_size = args->return_size; in dram_usage_info() local 161 if ((!max_size) || (!out)) in dram_usage_info() 173 min((size_t) max_size, sizeof(dram_usage))) ? -EFAULT : 0; in dram_usage_info() 179 u32 max_size = args->return_size; in hw_idle() local 182 if ((!max_size) || (!out)) in hw_idle() [all …]
|
/openbmc/qemu/hw/acpi/ |
H A D | utils.c | 32 uint64_t max_size; in acpi_add_rom_blob() local 36 max_size = 0x200000; in acpi_add_rom_blob() 38 max_size = 0x10000; in acpi_add_rom_blob() 40 max_size = 0x1000; in acpi_add_rom_blob() 44 g_assert(acpi_data_len(blob) <= max_size); in acpi_add_rom_blob() 46 return rom_add_blob(name, blob->data, acpi_data_len(blob), max_size, -1, in acpi_add_rom_blob()
|
/openbmc/linux/drivers/gpu/drm/vmwgfx/ |
H A D | vmwgfx_devcaps.c | 62 unsigned int max_size; in vmw_fill_compat_cap() local 67 max_size = (size - pair_offset) / sizeof(SVGA3dFifoCapPair); in vmw_fill_compat_cap() 69 if (max_size > SVGA3D_DEVCAP_MAX) in vmw_fill_compat_cap() 70 max_size = SVGA3D_DEVCAP_MAX; in vmw_fill_compat_cap() 73 (pair_offset + max_size * sizeof(SVGA3dFifoCapPair)) / sizeof(u32); in vmw_fill_compat_cap() 76 for (i = 0; i < max_size; ++i) { in vmw_fill_compat_cap()
|
/openbmc/linux/net/sched/ |
H A D | sch_tbf.c | 101 u32 max_size; member 155 qopt.replace_params.max_size = q->max_size; in tbf_offload_change() 252 if (qdisc_pkt_len(skb) > q->max_size) { in tbf_enqueue() 254 skb_gso_validate_mac_len(skb, q->max_size)) in tbf_enqueue() 367 u64 max_size; in tbf_change() local 399 max_size = nla_get_u32(tb[TCA_TBF_BURST]); in tbf_change() 400 buffer = psched_l2t_ns(&rate, max_size); in tbf_change() 402 max_size = min_t(u64, psched_ns_t2l(&rate, buffer), ~0U); in tbf_change() 418 max_size = min_t(u32, max_size, pburst); in tbf_change() 421 max_size = min_t(u64, max_size, psched_ns_t2l(&peak, mtu)); in tbf_change() [all …]
|
/openbmc/linux/drivers/acpi/ |
H A D | custom_method.c | 26 static u32 max_size; in cm_write() local 44 uncopied_bytes = max_size = table.length; in cm_write() 47 buf = kzalloc(max_size, GFP_KERNEL); in cm_write() 55 if ((*ppos > max_size) || in cm_write() 56 (*ppos + count > max_size) || in cm_write()
|
/openbmc/qemu/tests/functional/ |
H A D | test_linux_initrd.py | 47 max_size = 2 * (1024 ** 3) - 1 50 initrd.seek(max_size) 60 max_size + 1) 71 max_size = 2 * (1024 ** 3) + 1 74 initrd.seek(max_size)
|
/openbmc/linux/net/core/ |
H A D | selftests.c | 27 int max_size; member 72 if (attr->max_size && attr->max_size > size) in net_test_get_skb() 73 size = attr->max_size; in net_test_get_skb() 111 if (attr->max_size) in net_test_get_skb() 112 uhdr->len = htons(attr->max_size - in net_test_get_skb() 130 if (attr->max_size) in net_test_get_skb() 131 iplen = attr->max_size - sizeof(*ehdr); in net_test_get_skb() 149 if (attr->max_size && attr->max_size > skb->len) in net_test_get_skb() 150 skb_put(skb, attr->max_size - skb->len); in net_test_get_skb() 326 attr.max_size = ndev->mtu; in net_test_phy_loopback_udp_mtu()
|
/openbmc/linux/sound/soc/sof/ |
H A D | ipc4-control.c | 69 scontrol->max_size); in sof_ipc4_set_get_kcontrol_data() 396 if (scontrol->max_size > sizeof(ucontrol->value.bytes.data)) { in sof_ipc4_bytes_put() 399 scontrol->max_size); in sof_ipc4_bytes_put() 404 if (data->size > scontrol->max_size - sizeof(*data)) { in sof_ipc4_bytes_put() 407 data->size, scontrol->max_size - sizeof(*data)); in sof_ipc4_bytes_put() 429 if (scontrol->max_size > sizeof(ucontrol->value.bytes.data)) { in sof_ipc4_bytes_get() 431 scontrol->max_size); in sof_ipc4_bytes_get() 435 if (data->size > scontrol->max_size - sizeof(*data)) { in sof_ipc4_bytes_get() 438 data->size, scontrol->max_size - sizeof(*data)); in sof_ipc4_bytes_get() 479 if (header.length > scontrol->max_size) { in sof_ipc4_bytes_ext_put() [all …]
|
H A D | ipc3-control.c | 111 scontrol->max_size); in sof_ipc3_set_get_kcontrol_data() 311 if (scontrol->max_size > sizeof(ucontrol->value.bytes.data)) { in sof_ipc3_bytes_get() 313 scontrol->max_size); in sof_ipc3_bytes_get() 318 if (data->size > scontrol->max_size - sizeof(*data)) { in sof_ipc3_bytes_get() 321 data->size, scontrol->max_size - sizeof(*data)); in sof_ipc3_bytes_get() 341 if (scontrol->max_size > sizeof(ucontrol->value.bytes.data)) { in sof_ipc3_bytes_put() 343 scontrol->max_size); in sof_ipc3_bytes_put() 348 if (data->size > scontrol->max_size - sizeof(*data)) { in sof_ipc3_bytes_put() 350 data->size, scontrol->max_size - sizeof(*data)); in sof_ipc3_bytes_put() 392 if (header.length > scontrol->max_size) { in sof_ipc3_bytes_ext_put() [all …]
|
/openbmc/linux/drivers/platform/chrome/wilco_ec/ |
H A D | telemetry.c | 156 size_t max_size = offsetof(struct wilco_ec_telem_request, args); in check_telem_request() local 163 max_size += sizeof(rq->args.get_log); in check_telem_request() 166 max_size += sizeof(rq->args.get_version); in check_telem_request() 169 max_size += sizeof(rq->args.get_fan_info); in check_telem_request() 172 max_size += sizeof(rq->args.get_diag_info); in check_telem_request() 175 max_size += sizeof(rq->args.get_temp_info); in check_telem_request() 178 max_size += sizeof(rq->args.get_temp_read); in check_telem_request() 181 max_size += sizeof(rq->args.get_batt_ext_info); in check_telem_request() 187 max_size += sizeof(rq->args.get_batt_ppid_info); in check_telem_request() 193 return (size <= max_size) ? 0 : -EMSGSIZE; in check_telem_request()
|
/openbmc/qemu/block/ |
H A D | block-ram-registrar.c | 13 size_t max_size) in ram_block_added() argument 22 if (!blk_register_buf(r->blk, host, max_size, &err)) { in ram_block_added() 30 size_t max_size) in ram_block_removed() argument 33 blk_unregister_buf(r->blk, host, max_size); in ram_block_removed()
|
/openbmc/libpldm/src/transport/ |
H A D | socket.c | 45 ctx->max_size = (int)max_buf_size; in pldm_socket_sndbuf_init() 63 if (msg_len > ctx->max_size) { in pldm_socket_sndbuf_accomodate() 64 msg_len = ctx->max_size; in pldm_socket_sndbuf_accomodate() 66 if (ctx->size == ctx->max_size) { in pldm_socket_sndbuf_accomodate()
|
/openbmc/qemu/include/exec/ |
H A D | ramlist.h | 70 size_t max_size); 72 size_t max_size); 80 void ram_block_notify_add(void *host, size_t size, size_t max_size); 81 void ram_block_notify_remove(void *host, size_t size, size_t max_size);
|
/openbmc/linux/drivers/base/regmap/ |
H A D | regmap-spi.c | 115 size_t max_size = spi_max_transfer_size(spi); in regmap_get_spi_bus() local 119 if (max_size != SIZE_MAX) { in regmap_get_spi_bus() 126 if (max_size + reg_reserve_size > max_msg_size) in regmap_get_spi_bus() 127 max_size -= reg_reserve_size; in regmap_get_spi_bus() 130 bus->max_raw_read = max_size; in regmap_get_spi_bus() 131 bus->max_raw_write = max_size; in regmap_get_spi_bus()
|
/openbmc/linux/drivers/staging/media/atomisp/pci/ |
H A D | sh_css_version.c | 24 ia_css_get_version(char *version, int max_size) in ia_css_get_version() argument 33 if (max_size <= (int)strlen(css_version) + (int)strlen(sh_css_get_fw_version()) + 5) in ia_css_get_version() 35 strscpy(version, css_version, max_size); in ia_css_get_version()
|
/openbmc/qemu/chardev/ |
H A D | char-udp.c | 44 int max_size; member 64 while (s->max_size > 0 && s->bufptr < s->bufcnt) { in udp_chr_flush_buffer() 65 int n = MIN(s->max_size, s->bufcnt - s->bufptr); in udp_chr_flush_buffer() 68 s->max_size = qemu_chr_be_can_write(chr); in udp_chr_flush_buffer() 77 s->max_size = qemu_chr_be_can_write(chr); in udp_chr_read_poll() 84 return s->max_size; in udp_chr_read_poll() 93 if (s->max_size == 0) { in udp_chr_read()
|
/openbmc/linux/fs/btrfs/ |
H A D | lru_cache.c | 15 void btrfs_lru_cache_init(struct btrfs_lru_cache *cache, unsigned int max_size) in btrfs_lru_cache_init() argument 20 cache->max_size = max_size; in btrfs_lru_cache_init() 134 if (cache->max_size > 0 && cache->size == cache->max_size) { in btrfs_lru_cache_store()
|
/openbmc/linux/arch/powerpc/kernel/ |
H A D | secvar-sysfs.c | 137 int rc = secvar_ops->max_size(&varsize); in update_kobj_size() 229 u64 max_size; in secvar_sysfs_init() local 282 secvar_ops->max_size(&max_size); in secvar_sysfs_init() 283 if (max_size > PAGE_SIZE) in secvar_sysfs_init() 285 PAGE_SIZE, max_size); in secvar_sysfs_init()
|
/openbmc/linux/lib/ |
H A D | bucket_locks.c | 15 size_t max_size, unsigned int cpu_mult, gfp_t gfp, in __alloc_bucket_spinlocks() argument 28 size = min_t(unsigned int, nr_pcpus * cpu_mult, max_size); in __alloc_bucket_spinlocks() 30 size = max_size; in __alloc_bucket_spinlocks()
|
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/ |
H A D | rl.c | 122 for (i = 0; i < table->max_size; i++) { in find_rl_entry() 188 table->rl_entry = kcalloc(table->max_size, sizeof(struct mlx5_rl_entry), in mlx5_rl_table_get() 196 for (i = 0; i < table->max_size; i++) in mlx5_rl_table_get() 221 for (i = 0; i < table->max_size; i++) in mlx5_rl_table_free() 248 if (!table->max_size) in mlx5_rl_add_rate_raw() 266 table->max_size); in mlx5_rl_add_rate_raw() 370 table->max_size = 0; in mlx5_init_rl_table() 377 table->max_size = MLX5_CAP_QOS(dev, packet_pacing_rate_table_size) - 1; in mlx5_init_rl_table() 382 table->max_size, in mlx5_init_rl_table()
|
/openbmc/linux/fs/ext4/ |
H A D | symlink.c | 32 unsigned int max_size; in ext4_encrypted_get_link() local 40 max_size = sizeof(EXT4_I(inode)->i_data); in ext4_encrypted_get_link() 50 max_size = inode->i_sb->s_blocksize; in ext4_encrypted_get_link() 53 paddr = fscrypt_get_symlink(inode, caddr, max_size, done); in ext4_encrypted_get_link()
|
/openbmc/linux/arch/s390/appldata/ |
H A D | appldata_os.c | 165 int rc, max_size; in appldata_os_init() local 167 max_size = struct_size(appldata_os_data, os_cpu, num_possible_cpus()); in appldata_os_init() 168 if (max_size > APPLDATA_MAX_REC_SIZE) { in appldata_os_init() 170 "record size %i\n", max_size, APPLDATA_MAX_REC_SIZE); in appldata_os_init() 175 appldata_os_data = kzalloc(max_size, GFP_KERNEL | GFP_DMA); in appldata_os_init()
|
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/fpga/ |
H A D | sdk.c | 64 size_t max_size = MLX5_FPGA_ACCESS_REG_SIZE_MAX; in mlx5_fpga_mem_read_i2c() local 76 actual_size = min(max_size, (size - bytes_done)); in mlx5_fpga_mem_read_i2c() 96 size_t max_size = MLX5_FPGA_ACCESS_REG_SIZE_MAX; in mlx5_fpga_mem_write_i2c() local 108 actual_size = min(max_size, (size - bytes_done)); in mlx5_fpga_mem_write_i2c()
|
/openbmc/linux/include/media/ |
H A D | v4l2-rect.h | 45 const struct v4l2_rect *max_size) in v4l2_rect_set_max_size() argument 47 if (r->width > max_size->width) in v4l2_rect_set_max_size() 48 r->width = max_size->width; in v4l2_rect_set_max_size() 49 if (r->height > max_size->height) in v4l2_rect_set_max_size() 50 r->height = max_size->height; in v4l2_rect_set_max_size()
|
/openbmc/u-boot/arch/arm/mach-uniphier/ |
H A D | dram_init.c | 205 unsigned long max_size; in dram_init() local 228 max_size = (1ULL << 32) - dram_map[i].base; in dram_init() 230 if (dram_map[i].size > max_size) { in dram_init() 231 gd->ram_size += max_size; in dram_init()
|