Home
last modified time | relevance | path

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

123456

/Linux-v5.15/tools/testing/selftests/arm64/mte/
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()
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 …]
Dcheck_tags_inclusion.c43 static int check_single_included_tags(int mem_type, int mode) in check_single_included_tags() argument
48 ptr = (char *)mte_allocate_memory(BUFFER_SIZE + MT_GRANULE_SIZE, mem_type, 0, false); in check_single_included_tags()
50 mem_type, false) != KSFT_PASS) in check_single_included_tags()
69 mte_free_memory_tag_range((void *)ptr, BUFFER_SIZE, mem_type, 0, MT_GRANULE_SIZE); in check_single_included_tags()
73 static int check_multiple_included_tags(int mem_type, int mode) in check_multiple_included_tags() argument
79 ptr = (char *)mte_allocate_memory(BUFFER_SIZE + MT_GRANULE_SIZE, mem_type, 0, false); in check_multiple_included_tags()
81 mem_type, false) != KSFT_PASS) in check_multiple_included_tags()
101 mte_free_memory_tag_range((void *)ptr, BUFFER_SIZE, mem_type, 0, MT_GRANULE_SIZE); in check_multiple_included_tags()
105 static int check_all_included_tags(int mem_type, int mode) in check_all_included_tags() argument
110 ptr = (char *)mte_allocate_memory(BUFFER_SIZE + MT_GRANULE_SIZE, mem_type, 0, false); in check_all_included_tags()
[all …]
Dmte_common_util.c119 static void *__mte_allocate_memory_range(size_t size, int mem_type, int mapping, in __mte_allocate_memory_range() argument
127 if (mem_type != USE_MALLOC && mem_type != USE_MMAP && in __mte_allocate_memory_range()
128 mem_type != USE_MPROTECT) { in __mte_allocate_memory_range()
132 if (mem_type == USE_MALLOC) in __mte_allocate_memory_range()
136 if (mem_type == USE_MMAP) in __mte_allocate_memory_range()
149 if (mem_type == USE_MPROTECT) { in __mte_allocate_memory_range()
161 void *mte_allocate_memory_tag_range(size_t size, int mem_type, int mapping, in mte_allocate_memory_tag_range() argument
164 return __mte_allocate_memory_range(size, mem_type, mapping, range_before, in mte_allocate_memory_tag_range()
168 void *mte_allocate_memory(size_t size, int mem_type, int mapping, bool tags) in mte_allocate_memory() argument
170 return __mte_allocate_memory_range(size, mem_type, mapping, 0, 0, tags, -1); in mte_allocate_memory()
[all …]
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,
85 int mem_type, bool tags) in check_allocated_memory() argument
94 mte_free_memory((void *)ptr, size, mem_type, false); in check_allocated_memory()
101 static inline int check_allocated_memory_range(void *ptr, size_t size, int mem_type, in check_allocated_memory_range() argument
111 mte_free_memory_tag_range((void *)ptr, size, mem_type, range_before, in check_allocated_memory_range()
Dcheck_mmap_options.c60 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 …]
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()
Dcheck_user_mem.c22 static int check_usermem_access_fault(int mem_type, int mode, int mapping) in check_usermem_access_fault() argument
39 ptr = mte_allocate_memory(len, mem_type, mapping, true); in check_usermem_access_fault()
40 if (check_allocated_memory(ptr, len, mem_type, true) != KSFT_PASS) { in check_usermem_access_fault()
79 mte_free_memory((void *)ptr, len, mem_type, true); in check_usermem_access_fault()
Dcheck_ksm_options.c98 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-v5.15/drivers/gpu/drm/vmwgfx/
Dvmwgfx_ttm_buffer.c35 .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,
120 .mem_type = TTM_PL_SYSTEM,
125 .mem_type = TTM_PL_VRAM,
[all …]
/Linux-v5.15/drivers/gpu/drm/amd/amdgpu/
Damdgpu_ttm.c94 .mem_type = TTM_PL_SYSTEM, in amdgpu_evict_flags()
130 switch (bo->resource->mem_type) { in amdgpu_evict_flags()
206 BUG_ON(mem->mem_type == AMDGPU_PL_PREEMPT); in amdgpu_ttm_map_buffer()
210 *addr = amdgpu_ttm_domain_start(adev, mem->mem_type) + in amdgpu_ttm_map_buffer()
245 if (mem->mem_type == TTM_PL_TT) { in amdgpu_ttm_map_buffer()
400 if (old_mem->mem_type == TTM_PL_VRAM && in amdgpu_move_blit()
440 if (mem->mem_type == TTM_PL_SYSTEM || in amdgpu_mem_visible()
441 mem->mem_type == TTM_PL_TT) in amdgpu_mem_visible()
443 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 …]
Damdgpu_object.c136 places[c].mem_type = TTM_PL_VRAM; in amdgpu_bo_placement_from_domain()
152 places[c].mem_type = in amdgpu_bo_placement_from_domain()
162 places[c].mem_type = TTM_PL_SYSTEM; in amdgpu_bo_placement_from_domain()
170 places[c].mem_type = AMDGPU_PL_GDS; in amdgpu_bo_placement_from_domain()
178 places[c].mem_type = AMDGPU_PL_GWS; in amdgpu_bo_placement_from_domain()
186 places[c].mem_type = AMDGPU_PL_OA; in amdgpu_bo_placement_from_domain()
194 places[c].mem_type = TTM_PL_SYSTEM; in amdgpu_bo_placement_from_domain()
596 bo->tbo.resource->mem_type == TTM_PL_VRAM && in amdgpu_bo_create()
604 bo->tbo.resource->mem_type == TTM_PL_VRAM) { in amdgpu_bo_create()
924 uint32_t mem_type = bo->tbo.resource->mem_type; in amdgpu_bo_pin_restricted() local
[all …]
Damdgpu_atomfirmware.c234 u8 mem_type; in amdgpu_atomfirmware_get_vram_info() local
264 mem_type = igp_info->v11.memorytype; in amdgpu_atomfirmware_get_vram_info()
266 *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type); in amdgpu_atomfirmware_get_vram_info()
282 mem_type = igp_info->v21.memorytype; in amdgpu_atomfirmware_get_vram_info()
284 *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type); in amdgpu_atomfirmware_get_vram_info()
307 mem_type = vram_module->v9.memory_type; in amdgpu_atomfirmware_get_vram_info()
309 *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type); in amdgpu_atomfirmware_get_vram_info()
327 mem_type = vram_module->v10.memory_type; in amdgpu_atomfirmware_get_vram_info()
329 *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type); in amdgpu_atomfirmware_get_vram_info()
347 mem_type = vram_module->v11.memory_type; in amdgpu_atomfirmware_get_vram_info()
[all …]
/Linux-v5.15/drivers/i2c/busses/
Di2c-amd-mp2.h64 enum mem_type { enum
86 enum mem_type mem_type : 1;
129 enum mem_type mem_type : 1;
/Linux-v5.15/arch/mips/loongson64/
Dinit.c51 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()
84 (u32)node_id, mem_type, mem_start, mem_size); in szmem()
/Linux-v5.15/drivers/gpu/drm/radeon/
Dradeon_ttm.c88 .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 old_type = old_mem->mem_type; in radeon_bo_move()
223 if (old_mem->mem_type == TTM_PL_SYSTEM && bo->ttm == NULL) { in radeon_bo_move()
[all …]
Dradeon_object.c53 unsigned int mem_type, int sign) in radeon_update_memory_usage() argument
57 switch (mem_type) { in radeon_update_memory_usage()
111 rbo->placements[c].mem_type = TTM_PL_VRAM; in radeon_ttm_placement_from_domain()
116 rbo->placements[c].mem_type = TTM_PL_VRAM; in radeon_ttm_placement_from_domain()
122 rbo->placements[c].mem_type = TTM_PL_TT; in radeon_ttm_placement_from_domain()
128 rbo->placements[c].mem_type = TTM_PL_SYSTEM; in radeon_ttm_placement_from_domain()
133 rbo->placements[c].mem_type = TTM_PL_SYSTEM; in radeon_ttm_placement_from_domain()
142 (rbo->placements[i].mem_type == TTM_PL_VRAM) && in radeon_ttm_placement_from_domain()
327 if ((bo->placements[i].mem_type == TTM_PL_VRAM) && in radeon_bo_pin_restricted()
360 if (bo->tbo.resource->mem_type == TTM_PL_VRAM) in radeon_bo_unpin()
[all …]
/Linux-v5.15/arch/arm/include/asm/mach/
Dmap.h52 struct mem_type;
53 extern const struct mem_type *get_mem_type(unsigned int type);
58 const struct mem_type *mtype);
/Linux-v5.15/drivers/gpu/drm/ttm/
Dttm_bo.c58 int i, mem_type; in ttm_bo_mem_space_debug() local
64 mem_type = placement->placement[i].mem_type; in ttm_bo_mem_space_debug()
66 i, placement->placement[i].flags, mem_type); in ttm_bo_mem_space_debug()
67 man = ttm_manager_type(bo->bdev, mem_type); in ttm_bo_mem_space_debug()
108 man = ttm_manager_type(bdev, mem->mem_type); in ttm_bo_move_to_lru_tail()
115 switch (bo->resource->mem_type) { in ttm_bo_move_to_lru_tail()
173 old_man = ttm_manager_type(bdev, bo->resource->mem_type); in ttm_bo_handle_move_mem()
174 new_man = ttm_manager_type(bdev, mem->mem_type); in ttm_bo_handle_move_mem()
190 if (mem->mem_type != TTM_PL_SYSTEM) { in ttm_bo_handle_move_mem()
208 new_man = ttm_manager_type(bdev, bo->resource->mem_type); in ttm_bo_handle_move_mem()
[all …]
/Linux-v5.15/drivers/gpu/drm/qxl/
Dqxl_object.c71 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-v5.15/drivers/gpu/drm/nouveau/
Dnouveau_bo.c353 pl[*n].mem_type = TTM_PL_VRAM; in set_placement_list()
358 pl[*n].mem_type = TTM_PL_TT; in set_placement_list()
363 pl[*n].mem_type = TTM_PL_SYSTEM; in set_placement_list()
442 switch (bo->resource->mem_type) { in nouveau_bo_pin()
456 bo->resource->mem_type, domain); in nouveau_bo_pin()
477 switch (bo->resource->mem_type) { in nouveau_bo_pin()
508 switch (bo->resource->mem_type) { in nouveau_bo_unpin()
747 switch (bo->resource->mem_type) { in nouveau_bo_evict_flags()
917 if (mem && new_reg->mem_type != TTM_PL_SYSTEM && in nouveau_bo_move_ntfy()
944 if (new_reg->mem_type != TTM_PL_VRAM) in nouveau_bo_vm_bind()
[all …]
/Linux-v5.15/arch/arm/mach-omap2/
Dsram.h12 u32 mem_type);
30 u32 mem_type);
43 u32 mem_type);
/Linux-v5.15/include/trace/events/
Dxdp.h329 __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),
/Linux-v5.15/Documentation/devicetree/bindings/reserved-memory/
Dramoops.txt49 - unbuffered: deprecated, use mem_type instead. If present, and mem_type is
50 not specified, it is equivalent to mem_type = 1 and uses unbuffered mappings
51 to map the reserved region (defaults to buffered mappings mem_type = 0). If
52 both are specified -- "mem_type" overrides "unbuffered".
/Linux-v5.15/drivers/i2c/
Di2c-smbus.c320 u8 common_mem_type = 0x0, mem_type; in i2c_register_spd() local
333 mem_type = dmi_memdev_type(handle); in i2c_register_spd()
334 if (mem_type <= 0x02) /* Invalid, Other, Unknown */ in i2c_register_spd()
339 common_mem_type = mem_type; in i2c_register_spd()
342 if (mem_type != common_mem_type) { in i2c_register_spd()
/Linux-v5.15/drivers/gpu/drm/i915/
Dintel_region_ttm.c85 int mem_type = intel_region_to_ttm_type(mem); in intel_region_ttm_init() local
88 ret = i915_ttm_buddy_man_init(bdev, mem_type, false, in intel_region_ttm_init()
94 mem->region_private = ttm_manager_type(bdev, mem_type); in intel_region_ttm_init()

123456