Home
last modified time | relevance | path

Searched refs:mem_type (Results 1 – 25 of 179) sorted by relevance

12345678

/linux/tools/testing/selftests/arm64/mte/
H A Dcheck_buffer_fill.c28 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 Dcheck_tags_inclusion.c49 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 Dmte_common_util.c131 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 Dmte_common_util.h45 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 Dcheck_mmap_options.c69 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 Dcheck_child_memory.c84 static int check_child_memory_mapping(int mem_type, int mode, int mapping) in check_child_memory_mapping() argument
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()
99 mte_free_memory_tag_range((void *)ptr, sizes[run], mem_type, UNDERFLOW, OVERFLOW); in check_child_memory_mapping()
106 static int check_child_file_mapping(int mem_type, int mode, int mapping) in check_child_file_mapping() argument
119 map_ptr = (char *)mte_allocate_file_memory(map_size, mem_type, mapping, false, fd); in check_child_file_mapping()
120 if (check_allocated_memory(map_ptr, map_size, mem_type, false) != KSFT_PASS) { in check_child_file_mapping()
/linux/drivers/gpu/drm/xe/
H A Dxe_drm_client.c109 u32 mem_type; in bo_meminfo() local
112 mem_type = bo->placement.placement->mem_type; in bo_meminfo()
114 mem_type = XE_PL_TT; in bo_meminfo()
117 stats[mem_type].shared += sz; in bo_meminfo()
119 stats[mem_type].private += sz; in bo_meminfo()
122 stats[mem_type].resident += sz; in bo_meminfo()
126 stats[mem_type].active += sz; in bo_meminfo()
128 stats[mem_type].purgeable += sz; in bo_meminfo()
142 u32 mem_type; in show_meminfo() local
165 for (mem_type = XE_PL_SYSTEM; mem_type < TTM_NUM_MEM_TYPES; ++mem_type) { in show_meminfo()
[all …]
H A Dxe_bo.c43 .mem_type = XE_PL_SYSTEM,
56 .mem_type = XE_PL_TT,
62 .mem_type = XE_PL_SYSTEM,
74 return mem_type >= XE_PL_VRAM0 && mem_type != XE_PL_STOLEN; in mem_type_is_vram()
123 xe_assert(xe, mem_type == XE_PL_STOLEN || mem_type_is_vram(mem_type)); in mem_type_to_migrate()
124 tile = &xe->tiles[mem_type == XE_PL_STOLEN ? 0 : (mem_type - XE_PL_VRAM0)]; in mem_type_to_migrate()
145 .mem_type = XE_PL_TT, in try_add_system()
154 struct ttm_place place = { .mem_type = mem_type }; in add_vram()
2095 if (bo->placements[cur_place].mem_type == mem_type) in xe_bo_can_migrate()
2105 place->mem_type = mem_type; in xe_place_from_ttm_type()
[all …]
H A Dxe_res_cursor.h46 u32 mem_type; member
55 mgr = ttm_manager_type(res->bo->bdev, res->mem_type); in xe_res_get_buddy()
79 cur->mem_type = res->mem_type; in xe_res_first()
81 switch (cur->mem_type) { in xe_res_first()
125 cur->mem_type = XE_PL_TT; in xe_res_first()
167 cur->mem_type = XE_PL_TT; in xe_res_first_sg()
203 switch (cur->mem_type) { in xe_res_next()
H A Dxe_debugfs.c128 u32 mem_type; in xe_debugfs_register() local
138 for (mem_type = XE_PL_VRAM0; mem_type <= XE_PL_VRAM1; ++mem_type) { in xe_debugfs_register()
139 man = ttm_manager_type(bdev, mem_type); in xe_debugfs_register()
144 snprintf(name, sizeof(name), "vram%d_mm", mem_type - XE_PL_VRAM0); in xe_debugfs_register()
/linux/drivers/gpu/drm/ttm/tests/
H A Dttm_resource_test.c14 uint32_t mem_type; member
50 uint32_t mem_type, uint32_t flags) in ttm_init_test_mocks() argument
63 uint32_t 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 uint32_t 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 Dttm_bo_test.c240 uint32_t mem_type = TTM_PL_SYSTEM; in ttm_bo_unreserve_basic() local
243 place = ttm_place_kunit_init(test, mem_type, 0); in ttm_bo_unreserve_basic()
266 man = ttm_manager_type(priv->ttm_dev, mem_type); in ttm_bo_unreserve_basic()
281 uint32_t mem_type = TTM_PL_SYSTEM; in ttm_bo_unreserve_pinned() local
292 place = ttm_place_kunit_init(test, mem_type, 0); in ttm_bo_unreserve_pinned()
324 uint32_t mem_type = TTM_PL_SYSTEM; in ttm_bo_unreserve_bulk() local
330 place = ttm_place_kunit_init(test, mem_type, 0); in ttm_bo_unreserve_bulk()
361 pos = &lru_bulk_move.pos[mem_type][bo_priority]; in ttm_bo_unreserve_bulk()
375 uint32_t mem_type = TTM_PL_SYSTEM; in ttm_bo_put_basic() local
490 uint32_t mem_type = TTM_PL_SYSTEM; in ttm_bo_pin_unpin_resource() local
[all …]
/linux/drivers/gpu/drm/nouveau/nvkm/falcon/
H A Dbase.c47 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/drivers/gpu/drm/loongson/
H A Dlsdc_ttm.c17 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/drivers/gpu/drm/vmwgfx/
H A Dvmwgfx_bo.c192 if (bo->resource->mem_type == TTM_PL_VRAM && in vmw_bo_pin_in_start_of_vram()
295 pl.mem_type = bo->resource->mem_type; in vmw_bo_pin_reserved()
735 if (mem->mem_type == TTM_PL_VRAM || bo->resource->mem_type == TTM_PL_VRAM) in vmw_bo_move_notify()
743 if (mem->mem_type != VMW_PL_MOB && bo->resource->mem_type == VMW_PL_MOB) in vmw_bo_move_notify()
768 pl[n].mem_type = VMW_PL_MOB; in set_placement_list()
776 pl[n].mem_type = VMW_PL_GMR; in set_placement_list()
784 pl[n].mem_type = TTM_PL_VRAM; in set_placement_list()
792 pl[n].mem_type = VMW_PL_SYSTEM; in set_placement_list()
800 pl[n].mem_type = TTM_PL_SYSTEM; in set_placement_list()
810 pl[n].mem_type = TTM_PL_SYSTEM; in set_placement_list()
[all …]
H A Dvmwgfx_ttm_buffer.c35 .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 …]
/linux/arch/mips/loongson64/
H A Dinit.c51 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()
/linux/drivers/gpu/drm/amd/amdgpu/
H A Damdgpu_res_cursor.h41 uint32_t mem_type; member
67 cur->mem_type = res->mem_type; in amdgpu_res_first()
69 switch (cur->mem_type) { in amdgpu_res_first()
143 switch (cur->mem_type) { in amdgpu_res_next()
178 switch (cur->mem_type) { in amdgpu_res_cleared()
H A Damdgpu_ttm.c98 .mem_type = TTM_PL_SYSTEM, in amdgpu_evict_flags()
121 switch (bo->resource->mem_type) { in amdgpu_evict_flags()
250 if (mem->mem_type == TTM_PL_TT) { in amdgpu_ttm_map_buffer()
427 if (res->mem_type == TTM_PL_SYSTEM || res->mem_type == TTM_PL_TT || in amdgpu_res_cpu_visible()
428 res->mem_type == AMDGPU_PL_PREEMPT || res->mem_type == AMDGPU_PL_DOORBELL) in amdgpu_res_cpu_visible()
431 if (res->mem_type != TTM_PL_VRAM) in amdgpu_res_cpu_visible()
456 if (mem->mem_type == TTM_PL_VRAM && in amdgpu_res_copyable()
545 hop->mem_type = TTM_PL_TT; in amdgpu_bo_move()
586 switch (mem->mem_type) { in amdgpu_ttm_io_mem_reserve()
988 placements.mem_type = TTM_PL_TT; in amdgpu_ttm_alloc_gart()
[all …]
H A Damdgpu_object.c149 places[c].mem_type = TTM_PL_VRAM; in amdgpu_bo_placement_from_domain()
167 places[c].mem_type = AMDGPU_PL_DOORBELL; in amdgpu_bo_placement_from_domain()
175 places[c].mem_type = in amdgpu_bo_placement_from_domain()
191 places[c].mem_type = TTM_PL_SYSTEM; in amdgpu_bo_placement_from_domain()
199 places[c].mem_type = AMDGPU_PL_GDS; in amdgpu_bo_placement_from_domain()
207 places[c].mem_type = AMDGPU_PL_GWS; in amdgpu_bo_placement_from_domain()
215 places[c].mem_type = AMDGPU_PL_OA; in amdgpu_bo_placement_from_domain()
223 places[c].mem_type = TTM_PL_SYSTEM; in amdgpu_bo_placement_from_domain()
926 uint32_t mem_type = bo->tbo.resource->mem_type; in amdgpu_bo_pin_restricted() local
932 if ((mem_type == TTM_PL_VRAM) && in amdgpu_bo_pin_restricted()
[all …]
H A Damdgpu_atomfirmware.c306 u8 mem_type; in amdgpu_atomfirmware_get_vram_info() local
333 mem_type = igp_info->v11.memorytype; in amdgpu_atomfirmware_get_vram_info()
334 if (mem_type == LpDdr5MemType) in amdgpu_atomfirmware_get_vram_info()
354 mem_type = igp_info->v21.memorytype; in amdgpu_atomfirmware_get_vram_info()
355 if (mem_type == LpDdr5MemType) in amdgpu_atomfirmware_get_vram_info()
368 mem_type = igp_info->v23.memorytype; in amdgpu_atomfirmware_get_vram_info()
369 if (mem_type == LpDdr5MemType) in amdgpu_atomfirmware_get_vram_info()
397 mem_type = vram_info->v30.memory_type; in amdgpu_atomfirmware_get_vram_info()
420 mem_type = vram_module->v9.memory_type; in amdgpu_atomfirmware_get_vram_info()
441 mem_type = vram_module->v10.memory_type; in amdgpu_atomfirmware_get_vram_info()
[all …]
/linux/drivers/i2c/busses/
H A Di2c-amd-mp2.h64 enum mem_type { enum
86 enum mem_type mem_type : 1;
129 enum mem_type mem_type : 1;
/linux/drivers/gpu/drm/xe/tests/
H A Dxe_dma_buf.c33 u32 mem_type; in check_residency() local
39 mem_type = XE_PL_VRAM0; in check_residency()
42 mem_type = XE_PL_TT; in check_residency()
45 mem_type = XE_PL_TT; in check_residency()
49 mem_type = XE_PL_TT; in check_residency()
51 if (!xe_bo_is_mem_type(exported, mem_type)) { in check_residency()
100 KUNIT_EXPECT_TRUE(test, xe_bo_is_mem_type(exported, mem_type)); in check_residency()
/linux/drivers/gpu/drm/radeon/
H A Dradeon_ttm.c88 .mem_type = TTM_PL_SYSTEM, in radeon_evict_flags()
100 switch (bo->resource->mem_type) { in radeon_evict_flags()
149 switch (old_mem->mem_type) { in radeon_move_blit()
160 switch (new_mem->mem_type) { in radeon_move_blit()
197 if (new_mem->mem_type == TTM_PL_TT) { in radeon_bo_move()
213 if (old_mem->mem_type == TTM_PL_SYSTEM && in radeon_bo_move()
214 new_mem->mem_type == TTM_PL_TT) { in radeon_bo_move()
219 if (old_mem->mem_type == TTM_PL_TT && in radeon_bo_move()
220 new_mem->mem_type == TTM_PL_SYSTEM) { in radeon_bo_move()
234 hop->mem_type = TTM_PL_TT; in radeon_bo_move()
[all …]
/linux/drivers/gpu/drm/qxl/
H A Dqxl_ttm.c57 .mem_type = TTM_PL_SYSTEM, in qxl_evict_flags()
76 switch (mem->mem_type) { in qxl_ttm_io_mem_reserve()
132 if (bo->resource->mem_type == TTM_PL_PRIV && qbo->surface_id) in qxl_bo_move_notify()
145 if (new_mem->mem_type != TTM_PL_SYSTEM) { in qxl_bo_move()
146 hop->mem_type = TTM_PL_SYSTEM; in qxl_bo_move()
161 if (old_mem->mem_type == TTM_PL_SYSTEM && bo->ttm == NULL) { in qxl_bo_move()

12345678