| /linux/tools/testing/selftests/arm64/mte/ |
| H A D | check_buffer_fill.c | 16 static int sizes[] = { variable 35 item = ARRAY_SIZE(sizes); in check_buffer_by_byte() 38 ptr = (char *)mte_allocate_memory(sizes[i], mem_type, 0, true); in check_buffer_by_byte() 39 if (check_allocated_memory(ptr, sizes[i], mem_type, true) != KSFT_PASS) in check_buffer_by_byte() 41 mte_initialize_current_context(mode, (uintptr_t)ptr, sizes[i]); in check_buffer_by_byte() 43 for (j = 0; j < sizes[i]; j++) in check_buffer_by_byte() 48 for (j = 0; j < sizes[i] && !err; j++) { in check_buffer_by_byte() 52 mte_free_memory((void *)ptr, sizes[i], mem_type, true); in check_buffer_by_byte() 72 item = ARRAY_SIZE(sizes); in check_buffer_underflow_by_byte() 74 ptr = (char *)mte_allocate_memory_tag_range(sizes[i], mem_type, 0, in check_buffer_underflow_by_byte() [all …]
|
| H A D | check_child_memory.c | 24 static int sizes[] = { variable 88 int item = ARRAY_SIZE(sizes); in check_child_memory_mapping() 90 item = ARRAY_SIZE(sizes); in check_child_memory_mapping() 93 ptr = (char *)mte_allocate_memory_tag_range(sizes[run], mem_type, mapping, in check_child_memory_mapping() 95 if (check_allocated_memory_range(ptr, sizes[run], mem_type, in check_child_memory_mapping() 98 result = check_child_tag_inheritance(ptr, sizes[run], mode); in check_child_memory_mapping() 99 mte_free_memory_tag_range((void *)ptr, sizes[run], mem_type, UNDERFLOW, OVERFLOW); in check_child_memory_mapping() 110 int total = ARRAY_SIZE(sizes); in check_child_file_mapping() 118 map_size = sizes[run] + OVERFLOW + UNDERFLOW; in check_child_file_mapping() 125 mte_initialize_current_context(mode, (uintptr_t)ptr, sizes[run]); in check_child_file_mapping() [all …]
|
| H A D | check_mmap_options.c | 58 static int sizes[] = { variable 118 int item = ARRAY_SIZE(sizes); in check_anonymous_memory_mapping() 125 map_size = sizes[run] + OVERFLOW + UNDERFLOW; in check_anonymous_memory_mapping() 131 mte_initialize_current_context(mode, (uintptr_t)ptr, sizes[run]); in check_anonymous_memory_mapping() 133 ptr = mte_insert_tags((void *)ptr, sizes[run]); in check_anonymous_memory_mapping() 139 result = check_mte_memory(ptr, sizes[run], mode, tag_check, atag_check, tag_op); in check_anonymous_memory_mapping() 140 mte_clear_tags((void *)ptr, sizes[run]); in check_anonymous_memory_mapping() 153 int total = ARRAY_SIZE(sizes); in check_file_memory_mapping() 165 map_size = sizes[run] + UNDERFLOW + OVERFLOW; in check_file_memory_mapping() 172 mte_initialize_current_context(mode, (uintptr_t)ptr, sizes[run]); in check_file_memory_mapping() [all …]
|
| H A D | check_user_mem.c | 43 int sizes[] = {1, 2, 3, 8, 16, 32, 4096, page_sz}; in check_usermem_access_fault() local 82 for (i = 0; i < ARRAY_SIZE(sizes); i++) { in check_usermem_access_fault() 83 size = sizes[i]; in check_usermem_access_fault()
|
| /linux/drivers/gpu/drm/msm/ |
| H A D | msm_fbdev.c | 89 struct drm_fb_helper_surface_size *sizes) in msm_fbdev_driver_fbdev_probe() argument 104 DBG("create fbdev: %dx%d@%d (%dx%d)", sizes->surface_width, in msm_fbdev_driver_fbdev_probe() 105 sizes->surface_height, sizes->surface_bpp, in msm_fbdev_driver_fbdev_probe() 106 sizes->fb_width, sizes->fb_height); in msm_fbdev_driver_fbdev_probe() 108 fourcc = drm_mode_legacy_fb_format(sizes->surface_bpp, sizes->surface_depth); in msm_fbdev_driver_fbdev_probe() 111 pitch = drm_format_info_min_pitch(format, 0, ALIGN(sizes->surface_width, 32)); in msm_fbdev_driver_fbdev_probe() 112 size = ALIGN(pitch * sizes->surface_height, PAGE_SIZE); in msm_fbdev_driver_fbdev_probe() 133 buffer = drm_client_buffer_create(client, sizes->surface_width, sizes->surface_height, in msm_fbdev_driver_fbdev_probe() 160 drm_fb_helper_fill_info(fbi, helper, sizes); in msm_fbdev_driver_fbdev_probe()
|
| /linux/tools/testing/selftests/bpf/libarena/selftests/ |
| H A D | test_asan_buddy.bpf.c | 154 size_t sizes[] = { in asan_test_buddy_oob() local 166 for (i = zero; i < sizeof(sizes) / sizeof(sizes[0]) && can_loop; i++) { in asan_test_buddy_oob() 168 ret = asan_test_buddy_oob_single(sizes[i]); in asan_test_buddy_oob() 171 __LINE__, sizes[i]); in asan_test_buddy_oob() 194 size_t sizes[] = { 16, 32, 64, 128, 256, 512, 1024, 16384 }; in asan_test_buddy_uaf() local 204 for (i = zero; i < sizeof(sizes) / sizeof(sizes[0]) && can_loop; i++) { in asan_test_buddy_uaf() 206 ret = asan_test_buddy_uaf_single(sizes[i]); in asan_test_buddy_uaf() 209 __LINE__, sizes[i]); in asan_test_buddy_uaf()
|
| /linux/drivers/gpu/drm/ |
| H A D | drm_fbdev_dma.c | 200 struct drm_fb_helper_surface_size *sizes) in drm_fbdev_dma_driver_fbdev_probe_tail() argument 215 info->screen_size = sizes->surface_height * fb->pitches[0]; in drm_fbdev_dma_driver_fbdev_probe_tail() 227 struct drm_fb_helper_surface_size *sizes) in drm_fbdev_dma_driver_fbdev_probe_tail_shadowed() argument 268 struct drm_fb_helper_surface_size *sizes) in drm_fbdev_dma_driver_fbdev_probe() argument 280 sizes->surface_width, sizes->surface_height, in drm_fbdev_dma_driver_fbdev_probe() 281 sizes->surface_bpp); in drm_fbdev_dma_driver_fbdev_probe() 283 format = drm_driver_legacy_fb_format(dev, sizes->surface_bpp, in drm_fbdev_dma_driver_fbdev_probe() 284 sizes->surface_depth); in drm_fbdev_dma_driver_fbdev_probe() 285 buffer = drm_client_buffer_create_dumb(client, sizes->surface_width, in drm_fbdev_dma_driver_fbdev_probe() 286 sizes->surface_height, format); in drm_fbdev_dma_driver_fbdev_probe() [all …]
|
| H A D | drm_fbdev_shmem.c | 134 struct drm_fb_helper_surface_size *sizes) in drm_fbdev_shmem_driver_fbdev_probe() argument 147 sizes->surface_width, sizes->surface_height, in drm_fbdev_shmem_driver_fbdev_probe() 148 sizes->surface_bpp); in drm_fbdev_shmem_driver_fbdev_probe() 150 format = drm_driver_legacy_fb_format(dev, sizes->surface_bpp, sizes->surface_depth); in drm_fbdev_shmem_driver_fbdev_probe() 151 buffer = drm_client_buffer_create_dumb(client, sizes->surface_width, in drm_fbdev_shmem_driver_fbdev_probe() 152 sizes->surface_height, format); in drm_fbdev_shmem_driver_fbdev_probe() 171 drm_fb_helper_fill_info(info, fb_helper, sizes); in drm_fbdev_shmem_driver_fbdev_probe() 179 info->screen_size = sizes->surface_height * fb->pitches[0]; in drm_fbdev_shmem_driver_fbdev_probe()
|
| H A D | drm_fbdev_ttm.c | 173 struct drm_fb_helper_surface_size *sizes) in drm_fbdev_ttm_driver_fbdev_probe() argument 185 sizes->surface_width, sizes->surface_height, in drm_fbdev_ttm_driver_fbdev_probe() 186 sizes->surface_bpp); in drm_fbdev_ttm_driver_fbdev_probe() 188 format = drm_driver_legacy_fb_format(dev, sizes->surface_bpp, in drm_fbdev_ttm_driver_fbdev_probe() 189 sizes->surface_depth); in drm_fbdev_ttm_driver_fbdev_probe() 190 buffer = drm_client_buffer_create_dumb(client, sizes->surface_width, in drm_fbdev_ttm_driver_fbdev_probe() 191 sizes->surface_height, format); in drm_fbdev_ttm_driver_fbdev_probe() 206 drm_fb_helper_fill_info(info, fb_helper, sizes); in drm_fbdev_ttm_driver_fbdev_probe()
|
| /linux/tools/testing/selftests/mm/ |
| H A D | uffd-wp-mremap.c | 33 static int detect_thp_sizes(size_t sizes[], int max) in detect_thp_sizes() 51 sizes[count++] = kb * 1024; in mmap_aligned() 259 unsigned long *sizes; 269 .sizes = &pagesize, 276 .sizes = &pagesize, 283 .sizes = &pagesize, 290 .sizes = &pagesize, 299 .sizes = thpsizes, 306 .sizes = thpsizes, 313 .sizes 22 detect_thp_sizes(size_t sizes[],int max) detect_thp_sizes() argument 248 size_t *sizes; global() member [all...] |
| /linux/drivers/gpu/drm/armada/ |
| H A D | armada_fbdev.c | 44 struct drm_fb_helper_surface_size *sizes) in armada_fbdev_driver_fbdev_probe() argument 55 mode.width = sizes->surface_width; in armada_fbdev_driver_fbdev_probe() 56 mode.height = sizes->surface_height; in armada_fbdev_driver_fbdev_probe() 57 mode.pitches[0] = armada_pitch(mode.width, sizes->surface_bpp); in armada_fbdev_driver_fbdev_probe() 58 mode.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in armada_fbdev_driver_fbdev_probe() 59 sizes->surface_depth); in armada_fbdev_driver_fbdev_probe() 102 drm_fb_helper_fill_info(info, fbh, sizes); in armada_fbdev_driver_fbdev_probe()
|
| /linux/Documentation/userspace-api/media/v4l/ |
| H A D | vidioc-subdev-enum-frame-size.rst | 13 VIDIOC_SUBDEV_ENUM_FRAME_SIZE - Enumerate media bus frame sizes 34 This ioctl allows applications to access the enumeration of frame sizes 47 Therefore, to enumerate frame sizes allowed on the specified pad 54 A successful call will return with minimum and maximum frame sizes filled in. 59 Sub-devices that only support discrete frame sizes (such as most 60 sensors) will return one or more frame sizes with identical minimum and 63 Not all possible sizes in given [minimum, maximum] ranges need to be 70 Available frame sizes may depend on the current 'try' formats at other 111 - Frame sizes to be enumerated, from enum
|
| H A D | vidioc-enum-framesizes.rst | 13 VIDIOC_ENUM_FRAMESIZES - Enumerate frame sizes 36 This ioctl allows applications to enumerate all frame sizes (i. e. width 44 depend on the type of frame sizes the device supports. Here are the 70 it make sense to increase the index value to receive more frame sizes. 74 The order in which the frame sizes are returned has no special 76 format sizes. 145 - IN: Pixel format for which the frame sizes are enumerated.
|
| /linux/drivers/pci/ |
| H A D | rebar.c | 140 u64 sizes = pci_rebar_get_possible_sizes(pdev, bar); in pci_rebar_size_supported() local 145 return BIT(size) & sizes; in pci_rebar_size_supported() 161 u64 sizes; in pci_rebar_get_max_size() local 163 sizes = pci_rebar_get_possible_sizes(pdev, bar); in pci_rebar_get_max_size() 164 if (!sizes) in pci_rebar_get_max_size() 167 return __fls(sizes); in pci_rebar_get_max_size()
|
| /linux/samples/seccomp/ |
| H A D | user-trap.c | 295 struct seccomp_notif_sizes sizes; in main() local 297 if (seccomp(SECCOMP_GET_NOTIF_SIZES, 0, &sizes) < 0) { in main() 302 req = malloc(sizes.seccomp_notif); in main() 306 resp = malloc(sizes.seccomp_notif_resp); in main() 309 memset(resp, 0, sizes.seccomp_notif_resp); in main() 312 memset(req, 0, sizes.seccomp_notif); in main()
|
| /linux/Documentation/devicetree/bindings/usb/ |
| H A D | gr-udc.txt | 21 - epobufsizes : Array of buffer sizes for OUT endpoints when they differ 24 each OUT endpoint of the core. Fewer entries overrides the default sizes 27 - epibufsizes : Array of buffer sizes for IN endpoints when they differ 30 each IN endpoint of the core. Fewer entries overrides the default sizes
|
| /linux/drivers/gpu/drm/i915/gt/ |
| H A D | selftest_migrate.c | 14 static const unsigned int sizes[] = { variable 496 for (i = 0; i < ARRAY_SIZE(sizes); i++) { in live_migrate_copy() 499 err = migrate_copy(migrate, sizes[i], &prng); in live_migrate_copy() 501 err = global_copy(migrate, sizes[i], &prng); in live_migrate_copy() 518 for (i = 0; i < ARRAY_SIZE(sizes); i++) { in live_migrate_clear() 521 err = migrate_clear(migrate, sizes[i], &prng); in live_migrate_clear() 523 err = global_clear(migrate, sizes[i], &prng); in live_migrate_clear() 894 static const unsigned long sizes[] = { in perf_clear_blt() local 902 for (i = 0; i < ARRAY_SIZE(sizes); i++) { in perf_clear_blt() 906 dst = create_init_lmem_internal(gt, sizes[i], true); in perf_clear_blt() [all …]
|
| /linux/lib/ |
| H A D | sg_split.c | 21 off_t skip, const size_t *sizes, in sg_calculate_split() argument 26 size_t size = sizes[0], len; in sg_calculate_split() 53 size = *(++sizes); in sg_calculate_split() 67 size = *(++sizes); in sg_calculate_split()
|
| /linux/mm/ |
| H A D | zsmalloc.c | 1168 size_t sizes[2]; in zs_obj_read_begin() local 1171 sizes[0] = PAGE_SIZE - off; in zs_obj_read_begin() 1172 sizes[1] = mem_len - sizes[0]; in zs_obj_read_begin() 1176 off, sizes[0]); in zs_obj_read_begin() 1178 memcpy_from_page(addr + sizes[0], in zs_obj_read_begin() 1180 0, sizes[1]); in zs_obj_read_begin() 1244 size_t sizes[2]; in zs_obj_read_sg_begin() local 1247 sizes[0] = PAGE_SIZE - off; in zs_obj_read_sg_begin() 1248 sizes[1] = mem_len - sizes[0]; in zs_obj_read_sg_begin() 1251 sg_set_page(sg, zpdesc_page(zpdesc), sizes[0], off); in zs_obj_read_sg_begin() [all …]
|
| /linux/drivers/media/platform/via/ |
| H A D | via-camera.c | 596 unsigned int *num_planes, unsigned int sizes[], in viacam_vb2_queue_setup() argument 603 return sizes[0] < size ? -EINVAL : 0; in viacam_vb2_queue_setup() 606 sizes[0] = size; in viacam_vb2_queue_setup() 933 struct v4l2_frmsizeenum *sizes) in viacam_enum_framesizes() argument 937 if (sizes->index != 0) in viacam_enum_framesizes() 940 if (sizes->pixel_format == via_formats[i].pixelformat) in viacam_enum_framesizes() 944 sizes->type = V4L2_FRMSIZE_TYPE_CONTINUOUS; in viacam_enum_framesizes() 945 sizes->stepwise.min_width = QCIF_WIDTH; in viacam_enum_framesizes() 946 sizes->stepwise.min_height = QCIF_HEIGHT; in viacam_enum_framesizes() 947 sizes->stepwise.max_width = VGA_WIDTH; in viacam_enum_framesizes() [all …]
|
| /linux/drivers/tty/ |
| H A D | mips_ejtag_fdc.c | 217 unsigned int *sizes, in mips_ejtag_fdc_encode() argument 225 const u8 *end = ptr + *(sizes++); in mips_ejtag_fdc_encode() 421 unsigned int sizes[2] = { 0 }; in mips_ejtag_fdc_put_chan() local 429 sizes[0] = min_t(unsigned int, in mips_ejtag_fdc_put_chan() 433 sizes[1] = dport->xmit_cnt - sizes[0]; in mips_ejtag_fdc_put_chan() 434 word = mips_ejtag_fdc_encode(ptrs, sizes, 1 + !!sizes[1]); in mips_ejtag_fdc_put_chan() 438 min_t(int, word.bytes, sizes[0]), ptrs[0], in mips_ejtag_fdc_put_chan() 439 max_t(int, 0, word.bytes - sizes[0]), ptrs[1]); in mips_ejtag_fdc_put_chan() 465 if (sizes[0] && word.bytes) { in mips_ejtag_fdc_put_chan()
|
| /linux/arch/sh/kernel/cpu/sh4/ |
| H A D | probe.c | 20 static unsigned long sizes[16] = { in cpu_probe() local 203 size = sizes[(cvr >> 20) & 0xf]; in cpu_probe() 211 size = sizes[(cvr >> 16) & 0xf]; in cpu_probe()
|
| /linux/drivers/firmware/cirrus/test/ |
| H A D | cs_dsp_mock_wmfw.c | 36 struct wmfw_adsp2_sizes sizes; member 412 hdr->sizes.pm = cpu_to_le32(cs_dsp_mock_size_of_region(dsp, WMFW_ADSP2_PM)); in cs_dsp_init_adsp2_halo_wmfw() 413 hdr->sizes.xm = cpu_to_le32(cs_dsp_mock_size_of_region(dsp, WMFW_ADSP2_XM)); in cs_dsp_init_adsp2_halo_wmfw() 414 hdr->sizes.ym = cpu_to_le32(cs_dsp_mock_size_of_region(dsp, WMFW_ADSP2_YM)); in cs_dsp_init_adsp2_halo_wmfw() 418 hdr->sizes.zm = cpu_to_le32(cs_dsp_mock_size_of_region(dsp, WMFW_ADSP2_ZM)); in cs_dsp_init_adsp2_halo_wmfw()
|
| /linux/drivers/net/wireless/intel/iwlwifi/mld/ |
| H A D | notif.c | 50 .sizes = iwl_notif_struct_sizes_##_name, \ 90 .sizes = iwl_notif_struct_sizes_##_name, \ 506 if (handler->sizes[i].ver != notif_ver) in iwl_mld_notif_is_valid() 509 if (IWL_FW_CHECK(mld, size < handler->sizes[i].size, in iwl_mld_notif_is_valid() 511 handler->cmd_id, size, handler->sizes[i].size)) in iwl_mld_notif_is_valid() 519 handler->sizes[handler->n_sizes - 1].ver); in iwl_mld_notif_is_valid()
|
| /linux/Documentation/admin-guide/mm/ |
| H A D | transhuge.rst | 12 that supports the automatic promotion and demotion of page sizes and 67 or mTHP sizes, if the system is configured to do so. 120 where <size> is the hugepage size being addressed, the available sizes 149 hugepage sizes have enabled="never". If enabling multiple hugepage 150 sizes, the kernel will select the most appropriate enabled size for a 226 all THP sizes are disabled (when both the per-size anon control and the 271 sizes. 301 hugepage of various sizes (PMD-sized or mTHP). Each may happen independently, 377 ``thp_anon=`` may be specified multiple times to configure all THP sizes as 378 required. If ``thp_anon=`` is specified at least once, any anon THP sizes [all …]
|