| /linux-6.15/drivers/firmware/cirrus/test/ |
| H A D | cs_dsp_test_wmfw.c | 46 int mem_type; member 168 param->mem_type); in wmfw_write_multiple_oneblock_payloads() 187 param->mem_type, in wmfw_write_multiple_oneblock_payloads() 235 param->mem_type); in wmfw_write_multiple_oneblock_payloads_reverse() 254 param->mem_type, in wmfw_write_multiple_oneblock_payloads_reverse() 311 param->mem_type); in wmfw_write_multiple_payloads_sparse_unordered() 331 param->mem_type, in wmfw_write_multiple_payloads_sparse_unordered() 464 int mem_type; in wmfw_write_multiple_unpacked_mem() member 505 payload_defs[i].mem_type, in wmfw_write_multiple_unpacked_mem() 561 int mem_type; in wmfw_write_multiple_packed_unpacked_mem() member [all …]
|
| H A D | cs_dsp_test_control_rw.c | 169 def.mem_type = param->mem_type; in cs_dsp_ctl_write_running() 240 def.mem_type = param->mem_type; in cs_dsp_ctl_read_volatile_running() 307 def.mem_type = param->mem_type; in cs_dsp_ctl_read_volatile_not_started() 357 def.mem_type = param->mem_type; in cs_dsp_ctl_read_volatile_stopped() 411 def.mem_type = param->mem_type; in cs_dsp_ctl_read_volatile_stopped_powered_down() 468 def.mem_type = param->mem_type; in cs_dsp_ctl_read_volatile_not_current_loaded_fw() 526 def.mem_type = param->mem_type; in cs_dsp_ctl_read_volatile_not_current_running_fw() 586 def.mem_type = param->mem_type; in cs_dsp_ctl_write_volatile_not_started() 643 def.mem_type = param->mem_type; in cs_dsp_ctl_write_volatile_stopped() 704 def.mem_type = param->mem_type; in cs_dsp_ctl_write_volatile_stopped_powered_down() [all …]
|
| H A D | cs_dsp_test_bin.c | 69 int mem_type; member 129 param->mem_type); in bin_patch_one_word() 134 param->mem_type, in bin_patch_one_word() 178 param->mem_type); in bin_patch_one_multiword() 183 param->mem_type, in bin_patch_one_multiword() 234 param->mem_type, in bin_patch_multi_oneword() 291 param->mem_type, in bin_patch_multi_oneword_unordered() 352 param->mem_type, in bin_patch_multi_oneword_sparse_unordered() 634 param->mem_type, in bin_patch_1_packed() 694 param->mem_type, in bin_patch_1_packed_1_single_trailing() [all …]
|
| H A D | cs_dsp_test_control_cache.c | 227 def.mem_type = param->mem_type; in cs_dsp_ctl_cache_init() 277 def.mem_type = param->mem_type; in cs_dsp_ctl_cache_init_write_only() 890 def.mem_type = param->mem_type; in cs_dsp_ctl_cache_read_not_started() 951 def.mem_type = param->mem_type; in cs_dsp_ctl_cache_read_stopped() 1017 def.mem_type = param->mem_type; in cs_dsp_ctl_cache_read_powered_down() 1080 def.mem_type = param->mem_type; in cs_dsp_ctl_cache_read_stopped_powered_down() 1148 def.mem_type = param->mem_type; in cs_dsp_ctl_cache_read_not_current_loaded_fw() 1216 def.mem_type = param->mem_type; in cs_dsp_ctl_cache_read_not_current_running_fw() 1288 def.mem_type = param->mem_type; in cs_dsp_ctl_cache_read_running() 1373 def.mem_type = param->mem_type; in cs_dsp_ctl_cache_read_running_zero_flags() [all …]
|
| H A D | cs_dsp_mock_mem_maps.c | 92 unsigned int cs_dsp_mock_size_of_region(const struct cs_dsp *dsp, int mem_type) in cs_dsp_mock_size_of_region() argument 107 if (dsp->mem[i].type == mem_type) in cs_dsp_mock_size_of_region() 130 if (region[i].type == mem_type) in cs_dsp_mock_base_addr_for_mem() 134 KUNIT_FAIL(priv->test, "Unexpected region %d\n", mem_type); in cs_dsp_mock_base_addr_for_mem() 178 switch (mem_type) { in cs_dsp_mock_reg_block_length_bytes() 190 switch (mem_type) { in cs_dsp_mock_reg_block_length_bytes() 227 return cs_dsp_mock_reg_block_length_bytes(priv, mem_type) / in cs_dsp_mock_reg_block_length_registers() 245 switch (mem_type) { in cs_dsp_mock_reg_block_length_dsp_words() 257 switch (mem_type) { in cs_dsp_mock_reg_block_length_dsp_words() 398 int mem_type) in cs_dsp_mock_xm_header_get_alg_base_in_words() argument [all …]
|
| /linux-6.15/tools/testing/selftests/arm64/mte/ |
| H A D | check_buffer_fill.c | 28 static int check_buffer_by_byte(int mem_type, int mode) in check_buffer_by_byte() argument 38 ptr = (char *)mte_allocate_memory(sizes[i], mem_type, 0, true); in check_buffer_by_byte() 52 mte_free_memory((void *)ptr, sizes[i], mem_type, true); in check_buffer_by_byte() 76 if (check_allocated_memory_range(ptr, sizes[i], mem_type, in check_buffer_underflow_by_byte() 172 if (check_allocated_memory_range(ptr, sizes[i], mem_type, in check_buffer_overflow_by_byte() 276 mte_free_memory((void *)src, size, mem_type, false); in check_buffer_by_block_iterate() 288 mte_free_memory((void *)dst, size, mem_type, false); in check_buffer_by_block_iterate() 299 mte_free_memory((void *)src, size, mem_type, true); in check_buffer_by_block_iterate() 326 mte_free_memory((void *)src, size, mem_type, in check_buffer_by_block_iterate() 328 mte_free_memory((void *)dst, size, mem_type, in check_buffer_by_block_iterate() [all …]
|
| H A D | check_tags_inclusion.c | 49 static int check_single_included_tags(int mem_type, int mode) in check_single_included_tags() argument 56 mem_type, false) != KSFT_PASS) in check_single_included_tags() 77 mte_free_memory_tag_range(ptr, BUFFER_SIZE, mem_type, 0, MT_GRANULE_SIZE); in check_single_included_tags() 81 static int check_multiple_included_tags(int mem_type, int mode) in check_multiple_included_tags() argument 89 mem_type, false) != KSFT_PASS) in check_multiple_included_tags() 113 static int check_all_included_tags(int mem_type, int mode) in check_all_included_tags() argument 120 mem_type, false) != KSFT_PASS) in check_all_included_tags() 139 static int check_none_included_tags(int mem_type, int mode) in check_none_included_tags() argument 144 ptr = mte_allocate_memory(BUFFER_SIZE, mem_type, 0, false); in check_none_included_tags() 157 mte_free_memory((void *)ptr, BUFFER_SIZE, mem_type, true); in check_none_included_tags() [all …]
|
| H A D | mte_common_util.c | 131 switch (mem_type) { in __mte_allocate_memory_range() 143 if (mem_type == USE_MMAP) in __mte_allocate_memory_range() 156 if (mem_type == USE_MPROTECT) { in __mte_allocate_memory_range() 171 return __mte_allocate_memory_range(size, mem_type, mapping, range_before, in mte_allocate_memory_tag_range() 185 if (mem_type != USE_MPROTECT && mem_type != USE_MMAP) { in mte_allocate_file_memory() 212 if (mem_type != USE_MPROTECT && mem_type != USE_MMAP) { in mte_allocate_file_memory_tag_range() 232 static void __mte_free_memory_range(void *ptr, size_t size, int mem_type, in __mte_free_memory_range() argument 235 switch (mem_type) { in __mte_free_memory_range() 251 void mte_free_memory_tag_range(void *ptr, size_t size, int mem_type, in mte_free_memory_tag_range() argument 257 void mte_free_memory(void *ptr, size_t size, int mem_type, bool tags) in mte_free_memory() argument [all …]
|
| H A D | mte_common_util.h | 45 void *mte_allocate_memory(size_t size, int mem_type, int mapping, bool tags); 46 void *mte_allocate_memory_tag_range(size_t size, int mem_type, int mapping, 48 void *mte_allocate_file_memory(size_t size, int mem_type, int mapping, 50 void *mte_allocate_file_memory_tag_range(size_t size, int mem_type, int mapping, 52 void mte_free_memory(void *ptr, size_t size, int mem_type, bool tags); 53 void mte_free_memory_tag_range(void *ptr, size_t size, int mem_type, 96 int mem_type, bool tags) in check_allocated_memory() argument 105 mte_free_memory((void *)ptr, size, mem_type, false); in check_allocated_memory() 112 static inline int check_allocated_memory_range(void *ptr, size_t size, int mem_type, in check_allocated_memory_range() argument 122 mte_free_memory_tag_range((void *)ptr, size, mem_type, range_before, in check_allocated_memory_range()
|
| H A D | check_mmap_options.c | 69 map_ptr = (char *)mte_allocate_memory(map_size, mem_type, mapping, false); in check_anonymous_memory_mapping() 70 if (check_allocated_memory(map_ptr, map_size, mem_type, false) != KSFT_PASS) in check_anonymous_memory_mapping() 84 mte_free_memory((void *)map_ptr, map_size, mem_type, false); in check_anonymous_memory_mapping() 106 if (check_allocated_memory(map_ptr, map_size, mem_type, false) != KSFT_PASS) { in check_file_memory_mapping() 130 static int check_clear_prot_mte_flag(int mem_type, int mode, int mapping) in check_clear_prot_mte_flag() argument 140 ptr = (char *)mte_allocate_memory_tag_range(sizes[run], mem_type, mapping, in check_clear_prot_mte_flag() 142 if (check_allocated_memory_range(ptr, sizes[run], mem_type, in check_clear_prot_mte_flag() 148 mte_free_memory_tag_range((void *)ptr, sizes[run], mem_type, in check_clear_prot_mte_flag() 161 ptr = (char *)mte_allocate_file_memory_tag_range(sizes[run], mem_type, mapping, in check_clear_prot_mte_flag() 163 if (check_allocated_memory_range(ptr, sizes[run], mem_type, in check_clear_prot_mte_flag() [all …]
|
| H A D | check_hugetlb_options.c | 155 map_ptr = (char *)mte_allocate_memory(map_size, mem_type, mapping, false); in check_hugetlb_memory_mapping() 156 if (check_allocated_memory(map_ptr, map_size, mem_type, false) != KSFT_PASS) in check_hugetlb_memory_mapping() 169 mte_free_memory((void *)map_ptr, map_size, mem_type, false); in check_hugetlb_memory_mapping() 176 static int check_clear_prot_mte_flag(int mem_type, int mode, int mapping) in check_clear_prot_mte_flag() argument 185 map_ptr = (char *)mte_allocate_memory_tag_range(map_size, mem_type, mapping, in check_clear_prot_mte_flag() 187 if (check_allocated_memory_range(map_ptr, map_size, mem_type, in check_clear_prot_mte_flag() 192 mte_free_memory_tag_range((void *)map_ptr, map_size, mem_type, in check_clear_prot_mte_flag() 198 mte_free_memory_tag_range((void *)map_ptr, map_size, mem_type, 0, 0); in check_clear_prot_mte_flag() 214 ptr = (char *)mte_allocate_memory_tag_range(map_size, mem_type, mapping, in check_child_hugetlb_memory_mapping() 216 if (check_allocated_memory_range(ptr, map_size, mem_type, in check_child_hugetlb_memory_mapping() [all …]
|
| /linux-6.15/drivers/gpu/drm/ttm/tests/ |
| H A D | ttm_resource_test.c | 14 u32 mem_type; member 50 u32 mem_type, u32 flags) in ttm_init_test_mocks() argument 63 u32 mem_type) in ttm_init_test_manager() argument 83 .mem_type = TTM_PL_SYSTEM, 87 .mem_type = TTM_PL_VRAM, 91 .mem_type = TTM_PRIV_DUMMY_REG, 95 .mem_type = TTM_PL_SYSTEM, 136 KUNIT_ASSERT_EQ(test, res->mem_type, place->mem_type); in ttm_resource_init_basic() 271 u32 mem_type = TTM_PL_SYSTEM; in ttm_sys_man_alloc_basic() local 283 KUNIT_ASSERT_EQ(test, res->mem_type, mem_type); in ttm_sys_man_alloc_basic() [all …]
|
| H A D | ttm_bo_validate_test.c | 23 u32 mem_type; member 158 u32 mem_type = TTM_PL_VRAM; in ttm_bo_init_reserved_mock_man() local 366 .mem_type = TTM_PL_VRAM, 667 KUNIT_EXPECT_EQ(test, bo->resource->mem_type, mem_type); in ttm_bo_validate_move_fence_signaled() 800 KUNIT_EXPECT_EQ(test, bo_big->resource->mem_type, mem_type); in ttm_bo_validate_swapout() 856 KUNIT_EXPECT_EQ(test, bos[1].resource->mem_type, mem_type); in ttm_bo_validate_happy_evict() 963 KUNIT_EXPECT_EQ(test, bo->resource->mem_type, mem_type); in ttm_bo_validate_allowed_only_evict() 964 KUNIT_EXPECT_EQ(test, bo_pinned->resource->mem_type, mem_type); in ttm_bo_validate_allowed_only_evict() 1020 KUNIT_EXPECT_EQ(test, bo_small->resource->mem_type, mem_type); in ttm_bo_validate_deleted_evict() 1074 KUNIT_EXPECT_EQ(test, bo_init->resource->mem_type, mem_type); in ttm_bo_validate_busy_domain_evict() [all …]
|
| H A D | ttm_mock_manager.c | 93 int ttm_mock_manager_init(struct ttm_device *bdev, u32 mem_type, u32 size) in ttm_mock_manager_init() argument 118 ttm_set_driver_manager(bdev, mem_type, base); in ttm_mock_manager_init() 125 void ttm_mock_manager_fini(struct ttm_device *bdev, u32 mem_type) in ttm_mock_manager_fini() argument 131 man = ttm_manager_type(bdev, mem_type); in ttm_mock_manager_fini() 144 ttm_set_driver_manager(bdev, mem_type, NULL); in ttm_mock_manager_fini() 200 ttm_set_driver_manager(bdev, mem_type, man); in ttm_bad_manager_init() 211 ttm_bad_manager_init(bdev, mem_type, size); in ttm_busy_manager_init() 212 man = ttm_manager_type(bdev, mem_type); in ttm_busy_manager_init() 220 void ttm_bad_manager_fini(struct ttm_device *bdev, uint32_t mem_type) in ttm_bad_manager_fini() argument 224 man = ttm_manager_type(bdev, mem_type); in ttm_bad_manager_fini() [all …]
|
| H A D | ttm_kunit_helpers.c | 12 .mem_type = TTM_PL_SYSTEM, 19 .mem_type = TTM_PL_MOCK1, 26 .mem_type = TTM_PL_MOCK2, 73 new_mem->mem_type == TTM_PL_SYSTEM) { in mock_move() 74 hop->mem_type = TTM_PL_TT; in mock_move() 81 if ((old_mem->mem_type == TTM_PL_SYSTEM && in mock_move() 82 new_mem->mem_type == TTM_PL_TT) || in mock_move() 83 (old_mem->mem_type == TTM_PL_TT && in mock_move() 84 new_mem->mem_type == TTM_PL_SYSTEM)) { in mock_move() 95 switch (bo->resource->mem_type) { in mock_evict_flags() [all …]
|
| H A D | ttm_mock_manager.h | 24 int ttm_mock_manager_init(struct ttm_device *bdev, u32 mem_type, u32 size); 25 int ttm_bad_manager_init(struct ttm_device *bdev, u32 mem_type, u32 size); 26 int ttm_busy_manager_init(struct ttm_device *bdev, u32 mem_type, u32 size); 27 void ttm_mock_manager_fini(struct ttm_device *bdev, u32 mem_type); 28 void ttm_bad_manager_fini(struct ttm_device *bdev, u32 mem_type);
|
| /linux-6.15/drivers/gpu/drm/xe/ |
| H A D | xe_drm_client.c | 171 u32 mem_type = bo->ttm.resource->mem_type; in bo_meminfo() local 176 stats[mem_type].shared += sz; in bo_meminfo() 178 stats[mem_type].private += sz; in bo_meminfo() 181 stats[mem_type].resident += sz; in bo_meminfo() 185 stats[mem_type].active += sz; in bo_meminfo() 186 else if (mem_type == XE_PL_SYSTEM) in bo_meminfo() 187 stats[mem_type].purgeable += sz; in bo_meminfo() 202 u32 mem_type; in show_meminfo() local 255 for (mem_type = XE_PL_SYSTEM; mem_type < TTM_NUM_MEM_TYPES; ++mem_type) { in show_meminfo() 256 if (!xe_mem_type_to_name[mem_type]) in show_meminfo() [all …]
|
| H A D | xe_bo.c | 49 .mem_type = XE_PL_SYSTEM, 62 .mem_type = XE_PL_TT, 80 return mem_type >= XE_PL_VRAM0 && mem_type != XE_PL_STOLEN; in mem_type_is_vram() 159 xe_assert(xe, mem_type == XE_PL_STOLEN || mem_type_is_vram(mem_type)); in mem_type_to_migrate() 160 tile = &xe->tiles[mem_type == XE_PL_STOLEN ? 0 : (mem_type - XE_PL_VRAM0)]; in mem_type_to_migrate() 184 .mem_type = XE_PL_TT, in try_add_system() 202 struct ttm_place place = { .mem_type = mem_type }; in add_vram() 1050 struct ttm_place place = {.mem_type = bo->resource->mem_type}; in xe_bo_shrink() 2690 if (bo->placements[cur_place].mem_type == mem_type) in xe_bo_can_migrate() 2700 place->mem_type = mem_type; in xe_place_from_ttm_type() [all …]
|
| H A D | xe_res_cursor.h | 55 u32 mem_type; member 76 mgr = ttm_manager_type(res->bo->bdev, res->mem_type); in xe_res_get_buddy() 101 cur->mem_type = res->mem_type; in xe_res_first() 103 switch (cur->mem_type) { in xe_res_first() 147 cur->mem_type = XE_PL_TT; in xe_res_first() 218 cur->mem_type = XE_PL_TT; in xe_res_first_sg() 249 cur->mem_type = XE_PL_TT; in xe_res_first_dma() 290 switch (cur->mem_type) { in xe_res_next() 345 switch (cur->mem_type) { in xe_res_is_vram()
|
| /linux-6.15/drivers/gpu/drm/nouveau/nvkm/falcon/ |
| H A D | base.c | 47 switch (*mem_type) { in nvkm_falcon_dma() 57 enum nvkm_falcon_mem mem_type, u32 mem_base, int len, bool sec) in nvkm_falcon_dma_wr() argument 59 const struct nvkm_falcon_func_dma *dma = nvkm_falcon_dma(falcon, &mem_type, &mem_base); in nvkm_falcon_dma_wr() 60 const char *type = nvkm_falcon_mem(mem_type); in nvkm_falcon_dma_wr() 69 if (mem_type == DMEM) { in nvkm_falcon_dma_wr() 79 ret = dma->init(falcon, dma_addr, dmalen, mem_type, sec, &cmd); in nvkm_falcon_dma_wr() 123 switch (*mem_type) { in nvkm_falcon_pio() 144 const char *type = nvkm_falcon_mem(mem_type); in nvkm_falcon_pio_rd() 176 enum nvkm_falcon_mem mem_type, u32 mem_base, int len, u16 tag, bool sec) in nvkm_falcon_pio_wr() argument 179 const char *type = nvkm_falcon_mem(mem_type); in nvkm_falcon_pio_wr() [all …]
|
| /linux-6.15/drivers/gpu/drm/loongson/ |
| H A D | lsdc_ttm.c | 17 switch (mem_type) { in lsdc_mem_type_to_str() 59 lbo->placements[c].mem_type = TTM_PL_VRAM; in lsdc_bo_set_placement() 64 lbo->placements[c].mem_type = TTM_PL_TT; in lsdc_bo_set_placement() 145 switch (resource->mem_type) { in lsdc_bo_evict_flags() 193 if (old_mem->mem_type == TTM_PL_SYSTEM && in lsdc_bo_move() 194 new_mem->mem_type == TTM_PL_TT) { in lsdc_bo_move() 201 if (old_mem->mem_type == TTM_PL_TT && in lsdc_bo_move() 202 new_mem->mem_type == TTM_PL_SYSTEM) { in lsdc_bo_move() 212 lsdc_mem_type_to_str(old_mem->mem_type), in lsdc_bo_move() 213 lsdc_mem_type_to_str(new_mem->mem_type), in lsdc_bo_move() [all …]
|
| /linux-6.15/include/linux/firmware/cirrus/ |
| H A D | cs_dsp_test_utils.h | 62 u16 mem_type; member 95 unsigned int cs_dsp_mock_size_of_region(const struct cs_dsp *dsp, int mem_type); 96 unsigned int cs_dsp_mock_base_addr_for_mem(struct cs_dsp_test *priv, int mem_type); 98 unsigned int cs_dsp_mock_reg_block_length_bytes(struct cs_dsp_test *priv, int mem_type); 99 unsigned int cs_dsp_mock_reg_block_length_registers(struct cs_dsp_test *priv, int mem_type); 100 unsigned int cs_dsp_mock_reg_block_length_dsp_words(struct cs_dsp_test *priv, int mem_type); 106 int mem_type);
|
| /linux-6.15/drivers/gpu/drm/vmwgfx/ |
| H A D | vmwgfx_ttm_buffer.c | 35 .mem_type = TTM_PL_VRAM, 42 .mem_type = TTM_PL_SYSTEM, 291 vmw_be->mem_type = bo_mem->mem_type; in vmw_ttm_bind() 293 switch (bo_mem->mem_type) { in vmw_ttm_bind() 329 switch (vmw_be->mem_type) { in vmw_ttm_unbind() 442 switch (mem->mem_type) { in vmw_ttm_io_mem_reserve() 491 static bool vmw_memtype_is_system(uint32_t mem_type) in vmw_memtype_is_system() argument 493 return mem_type == TTM_PL_SYSTEM || mem_type == VMW_PL_SYSTEM; in vmw_memtype_is_system() 506 new_man = ttm_manager_type(bo->bdev, new_mem->mem_type); in vmw_move() 508 old_man = ttm_manager_type(bo->bdev, bo->resource->mem_type); in vmw_move() [all …]
|
| H A D | vmwgfx_bo.c | 216 if (bo->resource->mem_type == TTM_PL_VRAM && in vmw_bo_pin_in_start_of_vram() 318 pl.mem_type = bo->resource->mem_type; in vmw_bo_pin_reserved() 729 if (mem->mem_type == TTM_PL_VRAM || bo->resource->mem_type == TTM_PL_VRAM) in vmw_bo_move_notify() 737 if (mem->mem_type != VMW_PL_MOB && bo->resource->mem_type == VMW_PL_MOB) in vmw_bo_move_notify() 762 pl[n].mem_type = VMW_PL_MOB; in set_placement_list() 770 pl[n].mem_type = VMW_PL_GMR; in set_placement_list() 778 pl[n].mem_type = TTM_PL_VRAM; in set_placement_list() 786 pl[n].mem_type = VMW_PL_SYSTEM; in set_placement_list() 794 pl[n].mem_type = TTM_PL_SYSTEM; in set_placement_list() 804 pl[n].mem_type = TTM_PL_SYSTEM; in set_placement_list() [all …]
|
| /linux-6.15/arch/mips/loongson64/ |
| H A D | init.c | 51 u32 i, mem_type; in szmem() local 64 mem_type = loongson_memmap->map[i].mem_type; in szmem() 75 switch (mem_type) { in szmem() 80 (u32)node_id, mem_type, &mem_start, &mem_size); in szmem() 90 (u32)node_id, mem_type, &mem_start, &mem_size); in szmem() 97 (u32)node_id, mem_type, &mem_start, &mem_size); in szmem()
|