| /Linux-v6.1/tools/testing/selftests/arm64/mte/ |
| 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() 39 if (check_allocated_memory(ptr, sizes[i], mem_type, true) != KSFT_PASS) in check_buffer_by_byte() 52 mte_free_memory((void *)ptr, sizes[i], mem_type, true); in check_buffer_by_byte() 63 static int check_buffer_underflow_by_byte(int mem_type, int mode, in check_buffer_underflow_by_byte() argument 74 ptr = (char *)mte_allocate_memory_tag_range(sizes[i], mem_type, 0, in check_buffer_underflow_by_byte() 76 if (check_allocated_memory_range(ptr, sizes[i], mem_type, in check_buffer_underflow_by_byte() 151 mte_free_memory_tag_range((void *)ptr, sizes[i], mem_type, underflow_range, 0); in check_buffer_underflow_by_byte() 158 static int check_buffer_overflow_by_byte(int mem_type, int mode, in check_buffer_overflow_by_byte() argument 170 ptr = (char *)mte_allocate_memory_tag_range(sizes[i], mem_type, 0, in check_buffer_overflow_by_byte() [all …]
|
| D | check_tags_inclusion.c | 49 static int check_single_included_tags(int mem_type, int mode) in check_single_included_tags() argument 54 ptr = mte_allocate_memory(BUFFER_SIZE + MT_GRANULE_SIZE, mem_type, 0, false); in check_single_included_tags() 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 87 ptr = mte_allocate_memory(BUFFER_SIZE + MT_GRANULE_SIZE, mem_type, 0, false); in check_multiple_included_tags() 89 mem_type, false) != KSFT_PASS) in check_multiple_included_tags() 109 mte_free_memory_tag_range(ptr, BUFFER_SIZE, mem_type, 0, MT_GRANULE_SIZE); in check_multiple_included_tags() 113 static int check_all_included_tags(int mem_type, int mode) in check_all_included_tags() argument 118 ptr = mte_allocate_memory(BUFFER_SIZE + MT_GRANULE_SIZE, mem_type, 0, false); in check_all_included_tags() [all …]
|
| D | mte_common_util.c | 123 static void *__mte_allocate_memory_range(size_t size, int mem_type, int mapping, in __mte_allocate_memory_range() argument 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() 168 void *mte_allocate_memory_tag_range(size_t size, int mem_type, int mapping, in mte_allocate_memory_tag_range() argument 171 return __mte_allocate_memory_range(size, mem_type, mapping, range_before, in mte_allocate_memory_tag_range() 175 void *mte_allocate_memory(size_t size, int mem_type, int mapping, bool tags) in mte_allocate_memory() argument 177 return __mte_allocate_memory_range(size, mem_type, mapping, 0, 0, tags, -1); in mte_allocate_memory() 180 void *mte_allocate_file_memory(size_t size, int mem_type, int mapping, bool tags, int fd) in mte_allocate_file_memory() argument 185 if (mem_type != USE_MPROTECT && mem_type != USE_MMAP) { in mte_allocate_file_memory() [all …]
|
| 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()
|
| D | check_mmap_options.c | 60 static int check_anonymous_memory_mapping(int mem_type, int mode, int mapping, int tag_check) in check_anonymous_memory_mapping() argument 70 map_ptr = (char *)mte_allocate_memory(map_size, mem_type, mapping, false); in check_anonymous_memory_mapping() 71 if (check_allocated_memory(map_ptr, map_size, mem_type, false) != KSFT_PASS) in check_anonymous_memory_mapping() 85 mte_free_memory((void *)map_ptr, map_size, mem_type, false); in check_anonymous_memory_mapping() 92 static int check_file_memory_mapping(int mem_type, int mode, int mapping, int tag_check) in check_file_memory_mapping() argument 106 map_ptr = (char *)mte_allocate_file_memory(map_size, mem_type, mapping, false, fd); in check_file_memory_mapping() 107 if (check_allocated_memory(map_ptr, map_size, mem_type, false) != KSFT_PASS) { in check_file_memory_mapping() 131 static int check_clear_prot_mte_flag(int mem_type, int mode, int mapping) in check_clear_prot_mte_flag() argument 141 ptr = (char *)mte_allocate_memory_tag_range(sizes[run], mem_type, mapping, in check_clear_prot_mte_flag() 143 if (check_allocated_memory_range(ptr, sizes[run], mem_type, in check_clear_prot_mte_flag() [all …]
|
| D | check_child_memory.c | 84 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()
|
| D | check_ksm_options.c | 98 static int check_madvise_options(int mem_type, int mode, int mapping) in check_madvise_options() argument 110 ptr = mte_allocate_memory(TEST_UNIT * page_sz, mem_type, mapping, true); in check_madvise_options() 111 if (check_allocated_memory(ptr, TEST_UNIT * page_sz, mem_type, false) != KSFT_PASS) in check_madvise_options() 127 mte_free_memory(ptr, TEST_UNIT * page_sz, mem_type, true); in check_madvise_options()
|
| /Linux-v6.1/drivers/gpu/drm/vmwgfx/ |
| D | vmwgfx_ttm_buffer.c | 35 .mem_type = TTM_PL_VRAM, 42 .mem_type = TTM_PL_SYSTEM, 49 .mem_type = VMW_PL_GMR, 56 .mem_type = VMW_PL_MOB, 71 .mem_type = TTM_PL_VRAM, 76 .mem_type = VMW_PL_GMR, 85 .mem_type = VMW_PL_GMR, 90 .mem_type = TTM_PL_VRAM, 98 .mem_type = VMW_PL_SYSTEM, 134 .mem_type = TTM_PL_SYSTEM, [all …]
|
| D | vmwgfx_bo.c | 213 if (bo->resource->mem_type == TTM_PL_VRAM && in vmw_bo_pin_in_start_of_vram() 279 if (bo->resource->mem_type == TTM_PL_VRAM) { in vmw_bo_get_guest_ptr() 302 uint32_t old_mem_type = bo->resource->mem_type; in vmw_bo_pin_reserved() 312 pl.mem_type = bo->resource->mem_type; in vmw_bo_pin_reserved() 321 BUG_ON(ret != 0 || bo->resource->mem_type != old_mem_type); in vmw_bo_pin_reserved() 864 if (mem->mem_type == TTM_PL_VRAM || bo->resource->mem_type == TTM_PL_VRAM) in vmw_bo_move_notify() 872 if (mem->mem_type != VMW_PL_MOB && bo->resource->mem_type == VMW_PL_MOB) in vmw_bo_move_notify()
|
| /Linux-v6.1/drivers/gpu/drm/amd/amdgpu/ |
| D | amdgpu_object.c | 137 places[c].mem_type = TTM_PL_VRAM; in amdgpu_bo_placement_from_domain() 153 places[c].mem_type = in amdgpu_bo_placement_from_domain() 163 places[c].mem_type = TTM_PL_SYSTEM; in amdgpu_bo_placement_from_domain() 171 places[c].mem_type = AMDGPU_PL_GDS; in amdgpu_bo_placement_from_domain() 179 places[c].mem_type = AMDGPU_PL_GWS; in amdgpu_bo_placement_from_domain() 187 places[c].mem_type = AMDGPU_PL_OA; in amdgpu_bo_placement_from_domain() 195 places[c].mem_type = TTM_PL_SYSTEM; in amdgpu_bo_placement_from_domain() 601 bo->tbo.resource->mem_type == TTM_PL_VRAM && in amdgpu_bo_create() 609 bo->tbo.resource->mem_type == TTM_PL_VRAM) { in amdgpu_bo_create() 901 uint32_t mem_type = bo->tbo.resource->mem_type; in amdgpu_bo_pin_restricted() local [all …]
|
| D | amdgpu_ttm.c | 99 .mem_type = TTM_PL_SYSTEM, in amdgpu_evict_flags() 126 switch (bo->resource->mem_type) { in amdgpu_evict_flags() 202 if (WARN_ON(mem->mem_type == AMDGPU_PL_PREEMPT)) in amdgpu_ttm_map_buffer() 207 *addr = amdgpu_ttm_domain_start(adev, mem->mem_type) + in amdgpu_ttm_map_buffer() 254 if (mem->mem_type == TTM_PL_TT) { in amdgpu_ttm_map_buffer() 391 if (old_mem->mem_type == TTM_PL_VRAM && in amdgpu_move_blit() 431 if (mem->mem_type == TTM_PL_SYSTEM || in amdgpu_mem_visible() 432 mem->mem_type == TTM_PL_TT) in amdgpu_mem_visible() 434 if (mem->mem_type != TTM_PL_VRAM) in amdgpu_mem_visible() 470 if (new_mem->mem_type == TTM_PL_TT || in amdgpu_bo_move() [all …]
|
| D | amdgpu_res_cursor.h | 41 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()
|
| D | amdgpu_atomfirmware.c | 240 u8 mem_type; in amdgpu_atomfirmware_get_vram_info() local 270 mem_type = igp_info->v11.memorytype; in amdgpu_atomfirmware_get_vram_info() 272 *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type); in amdgpu_atomfirmware_get_vram_info() 288 mem_type = igp_info->v21.memorytype; in amdgpu_atomfirmware_get_vram_info() 290 *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type); in amdgpu_atomfirmware_get_vram_info() 311 mem_type = vram_info->v30.memory_type; in amdgpu_atomfirmware_get_vram_info() 313 *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type); in amdgpu_atomfirmware_get_vram_info() 334 mem_type = vram_module->v9.memory_type; in amdgpu_atomfirmware_get_vram_info() 336 *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type); in amdgpu_atomfirmware_get_vram_info() 355 mem_type = vram_module->v10.memory_type; in amdgpu_atomfirmware_get_vram_info() [all …]
|
| /Linux-v6.1/drivers/i2c/busses/ |
| D | i2c-amd-mp2.h | 64 enum mem_type { enum 86 enum mem_type mem_type : 1; 129 enum mem_type mem_type : 1;
|
| /Linux-v6.1/arch/mips/loongson64/ |
| D | init.c | 51 u32 i, mem_type; in szmem() local 65 mem_type = loongson_memmap->map[i].mem_type; in szmem() 69 switch (mem_type) { in szmem() 77 (u32)node_id, mem_type, mem_start, mem_size); in szmem() 86 (u32)node_id, mem_type, mem_start, mem_size); in szmem()
|
| /Linux-v6.1/drivers/gpu/drm/radeon/ |
| D | radeon_ttm.c | 88 .mem_type = TTM_PL_SYSTEM, in radeon_evict_flags() 102 switch (bo->resource->mem_type) { in radeon_evict_flags() 120 if (rbo->placements[i].mem_type == TTM_PL_VRAM) { in radeon_evict_flags() 155 switch (old_mem->mem_type) { in radeon_move_blit() 163 DRM_ERROR("Unknown placement %d\n", old_mem->mem_type); in radeon_move_blit() 166 switch (new_mem->mem_type) { in radeon_move_blit() 174 DRM_ERROR("Unknown placement %d\n", old_mem->mem_type); in radeon_move_blit() 204 if (new_mem->mem_type == TTM_PL_TT) { in radeon_bo_move() 220 if (old_mem->mem_type == TTM_PL_SYSTEM && bo->ttm == NULL) { in radeon_bo_move() 224 if (old_mem->mem_type == TTM_PL_SYSTEM && in radeon_bo_move() [all …]
|
| /Linux-v6.1/drivers/gpu/drm/ttm/ |
| D | ttm_bo.c | 52 int i, mem_type; in ttm_bo_mem_space_debug() local 58 mem_type = placement->placement[i].mem_type; in ttm_bo_mem_space_debug() 60 i, placement->placement[i].flags, mem_type); in ttm_bo_mem_space_debug() 61 man = ttm_manager_type(bo->bdev, mem_type); in ttm_bo_mem_space_debug() 125 ttm_manager_type(bdev, bo->resource->mem_type)->use_tt; in ttm_bo_handle_move_mem() 126 new_use_tt = ttm_manager_type(bdev, mem->mem_type)->use_tt; in ttm_bo_handle_move_mem() 142 if (mem->mem_type != TTM_PL_SYSTEM) { in ttm_bo_handle_move_mem() 525 if (bo->resource->mem_type == TTM_PL_SYSTEM) in ttm_bo_eviction_valuable() 566 if (ret && place && (bo->resource->mem_type != place->mem_type || in ttm_bo_evict_swapout_allowable() 760 man = ttm_manager_type(bdev, place->mem_type); in ttm_bo_mem_force_space() [all …]
|
| D | ttm_resource.c | 80 return &bulk->pos[res->mem_type][res->bo->priority]; in ttm_lru_bulk_move_pos() 160 man = ttm_manager_type(bdev, res->mem_type); in ttm_resource_move_to_lru_tail() 181 res->mem_type = place->mem_type; in ttm_resource_init() 189 man = ttm_manager_type(bo->bdev, place->mem_type); in ttm_resource_init() 227 ttm_manager_type(bo->bdev, place->mem_type); in ttm_resource_alloc() 250 man = ttm_manager_type(bo->bdev, (*res)->mem_type); in ttm_resource_free() 279 man = ttm_manager_type(bdev, res->mem_type); in ttm_resource_intersects() 308 man = ttm_manager_type(bdev, res->mem_type); in ttm_resource_compatible() 332 if ((res->mem_type == heap->mem_type) && in ttm_resource_places_compat()
|
| /Linux-v6.1/arch/arm/include/asm/mach/ |
| D | map.h | 53 struct mem_type; 54 extern const struct mem_type *get_mem_type(unsigned int type); 59 const struct mem_type *mtype);
|
| /Linux-v6.1/include/drm/ttm/ |
| D | ttm_device.h | 281 ttm_manager_type(struct ttm_device *bdev, int mem_type) in ttm_manager_type() argument 283 BUILD_BUG_ON(__builtin_constant_p(mem_type) in ttm_manager_type() 284 && mem_type >= TTM_NUM_MEM_TYPES); in ttm_manager_type() 285 return bdev->man_drv[mem_type]; in ttm_manager_type()
|
| /Linux-v6.1/drivers/gpu/drm/qxl/ |
| D | qxl_object.c | 71 qbo->placements[c].mem_type = TTM_PL_VRAM; in qxl_ttm_placement_from_domain() 75 qbo->placements[c].mem_type = TTM_PL_PRIV; in qxl_ttm_placement_from_domain() 77 qbo->placements[c].mem_type = TTM_PL_VRAM; in qxl_ttm_placement_from_domain() 81 qbo->placements[c].mem_type = TTM_PL_SYSTEM; in qxl_ttm_placement_from_domain() 85 qbo->placements[c].mem_type = TTM_PL_SYSTEM; in qxl_ttm_placement_from_domain() 215 if (bo->tbo.resource->mem_type == TTM_PL_VRAM) in qxl_bo_kmap_atomic_page() 217 else if (bo->tbo.resource->mem_type == TTM_PL_PRIV) in qxl_bo_kmap_atomic_page() 269 if ((bo->tbo.resource->mem_type != TTM_PL_VRAM) && in qxl_bo_kunmap_atomic_page() 270 (bo->tbo.resource->mem_type != TTM_PL_PRIV)) in qxl_bo_kunmap_atomic_page()
|
| /Linux-v6.1/arch/loongarch/kernel/ |
| D | mem.c | 15 u32 mem_type; in memblock_init() local 21 mem_type = md->type; in memblock_init() 26 switch (mem_type) { in memblock_init()
|
| /Linux-v6.1/drivers/gpu/drm/nouveau/ |
| D | nouveau_bo.c | 355 pl[*n].mem_type = TTM_PL_VRAM; in set_placement_list() 360 pl[*n].mem_type = TTM_PL_TT; in set_placement_list() 365 pl[*n].mem_type = TTM_PL_SYSTEM; in set_placement_list() 444 switch (bo->resource->mem_type) { in nouveau_bo_pin() 458 bo->resource->mem_type, domain); in nouveau_bo_pin() 479 switch (bo->resource->mem_type) { in nouveau_bo_pin() 510 switch (bo->resource->mem_type) { in nouveau_bo_unpin() 749 switch (bo->resource->mem_type) { in nouveau_bo_evict_flags() 928 if (mem && new_reg->mem_type != TTM_PL_SYSTEM && in nouveau_bo_move_ntfy() 955 if (new_reg->mem_type != TTM_PL_VRAM) in nouveau_bo_vm_bind() [all …]
|
| /Linux-v6.1/arch/arm/mach-omap2/ |
| D | sram.h | 11 u32 mem_type); 33 u32 mem_type); 46 u32 mem_type);
|
| /Linux-v6.1/include/trace/events/ |
| D | xdp.h | 329 __field(u32, mem_type) 336 __entry->mem_type = xa->mem.type; 342 __print_symbolic(__entry->mem_type, __MEM_TYPE_SYM_TAB), 357 __field(u32, mem_type) 366 __entry->mem_type = xa->mem.type; 375 __print_symbolic(__entry->mem_type, __MEM_TYPE_SYM_TAB), 391 __field(u32, mem_type) 397 __entry->mem_type = mem->type; 402 __print_symbolic(__entry->mem_type, __MEM_TYPE_SYM_TAB),
|