Home
last modified time | relevance | path

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

123456

/kernel/linux/linux-5.10/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
38 ptr = mte_allocate_memory(len, mem_type, mapping, true); in check_usermem_access_fault()
39 if (check_allocated_memory(ptr, len, mem_type, true) != KSFT_PASS) { in check_usermem_access_fault()
78 mte_free_memory((void *)ptr, len, mem_type, true); in check_usermem_access_fault()
Dcheck_ksm_options.c95 static int check_madvise_options(int mem_type, int mode, int mapping) in check_madvise_options() argument
107 ptr = mte_allocate_memory(TEST_UNIT * page_sz, mem_type, mapping, true); in check_madvise_options()
108 if (check_allocated_memory(ptr, TEST_UNIT * page_sz, mem_type, false) != KSFT_PASS) in check_madvise_options()
124 mte_free_memory(ptr, TEST_UNIT * page_sz, mem_type, true); in check_madvise_options()
/kernel/linux/build/test/moduletest/runtest/bin/mem_debug_t/testcases/bin/
Dmem_debug05.sh62 local mem_type=$1
65 …local total_process_time=$(cat log.txt | grep -A5 $mem_type | grep total_process | awk '{print $2}…
66 local drain_pages_time=$(cat log.txt | grep -A5 $mem_type | grep drain_pages | awk '{print $2}')
67 local shrink_file_time=$(cat log.txt | grep -A5 $mem_type | grep shrink_file | awk '{print $2}')
68 local shrink_anon_time=$(cat log.txt | grep -A5 $mem_type | grep shrink_anon | awk '{print $2}')
69 local shrink_slab_time=$(cat log.txt | grep -A5 $mem_type | grep shrink_slab | awk '{print $2}')
75 tst_res TPASS "total_process_time in $mem_type isn't less than sum of subprocess."
77 tst_res TFAIL "total_process_time in $mem_type is less than sum of subprocess."
80 …local total_process_freed=$(cat log.txt | grep -A5 $mem_type | grep total_process | awk '{print $3…
81 … local shrink_file_freed=$(cat log.txt | grep -A5 $mem_type | grep shrink_file | awk '{print $3}')
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/vmwgfx/
Dvmwgfx_ttm_buffer.c36 .mem_type = TTM_PL_VRAM,
43 .mem_type = TTM_PL_VRAM,
50 .mem_type = TTM_PL_SYSTEM,
57 .mem_type = TTM_PL_SYSTEM,
64 .mem_type = VMW_PL_GMR,
71 .mem_type = VMW_PL_GMR,
78 .mem_type = VMW_PL_MOB,
85 .mem_type = VMW_PL_MOB,
100 .mem_type = TTM_PL_VRAM,
105 .mem_type = VMW_PL_GMR,
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/radeon/
Dradeon_object.c54 unsigned mem_type, int sign) in radeon_update_memory_usage() argument
59 switch (mem_type) { in radeon_update_memory_usage()
81 radeon_update_memory_usage(bo, bo->tbo.mem.mem_type, -1); in radeon_ttm_bo_destroy()
115 rbo->placements[c].mem_type = TTM_PL_VRAM; in radeon_ttm_placement_from_domain()
121 rbo->placements[c].mem_type = TTM_PL_VRAM; in radeon_ttm_placement_from_domain()
129 rbo->placements[c].mem_type = TTM_PL_TT; in radeon_ttm_placement_from_domain()
135 rbo->placements[c].mem_type = TTM_PL_TT; in radeon_ttm_placement_from_domain()
140 rbo->placements[c].mem_type = TTM_PL_TT; in radeon_ttm_placement_from_domain()
148 rbo->placements[c].mem_type = TTM_PL_SYSTEM; in radeon_ttm_placement_from_domain()
154 rbo->placements[c].mem_type = TTM_PL_SYSTEM; in radeon_ttm_placement_from_domain()
[all …]
Dradeon_ttm.c91 .mem_type = TTM_PL_SYSTEM, in radeon_evict_flags()
105 switch (bo->mem.mem_type) { in radeon_evict_flags()
123 if (rbo->placements[i].mem_type == TTM_PL_VRAM) { in radeon_evict_flags()
169 switch (old_mem->mem_type) { in radeon_move_blit()
177 DRM_ERROR("Unknown placement %d\n", old_mem->mem_type); in radeon_move_blit()
180 switch (new_mem->mem_type) { in radeon_move_blit()
188 DRM_ERROR("Unknown placement %d\n", old_mem->mem_type); in radeon_move_blit()
228 placements.mem_type = TTM_PL_TT; in radeon_move_vram_ram()
279 placements.mem_type = TTM_PL_TT; in radeon_move_ram_vram()
317 if (old_mem->mem_type == TTM_PL_SYSTEM && bo->ttm == NULL) { in radeon_bo_move()
[all …]
Dradeon_object.h40 static inline unsigned radeon_mem_type_to_domain(u32 mem_type) in radeon_mem_type_to_domain() argument
42 switch (mem_type) { in radeon_mem_type_to_domain()
98 switch (bo->tbo.mem.mem_type) { in radeon_bo_gpu_offset()
136 extern int radeon_bo_wait(struct radeon_bo *bo, u32 *mem_type,
/kernel/linux/linux-5.10/drivers/i2c/busses/
Di2c-amd-mp2.h64 enum mem_type { enum
86 enum mem_type mem_type : 1; member
129 enum mem_type mem_type : 1; member
/kernel/linux/linux-5.10/arch/mips/loongson64/
Dnuma.c103 u32 i, mem_type; in szmem() local
113 mem_type = loongson_memmap->map[i].mem_type; in szmem()
117 switch (mem_type) { in szmem()
124 (u32)node_id, mem_type, mem_start, mem_size); in szmem()
136 (u32)node_id, mem_type, mem_start, mem_size); in szmem()
144 (u32)node_id, mem_type, mem_start, mem_size); in szmem()
/kernel/linux/linux-5.10/drivers/gpu/drm/ttm/
Dttm_bo.c72 int i, mem_type; in ttm_bo_mem_space_debug() local
78 mem_type = placement->placement[i].mem_type; in ttm_bo_mem_space_debug()
80 i, placement->placement[i].flags, mem_type); in ttm_bo_mem_space_debug()
81 man = ttm_manager_type(bo->bdev, mem_type); in ttm_bo_mem_space_debug()
124 man = ttm_manager_type(bdev, mem->mem_type); in ttm_bo_add_mem_to_lru()
169 switch (bo->mem.mem_type) { in ttm_bo_move_to_lru_tail()
240 struct ttm_resource_manager *old_man = ttm_manager_type(bdev, bo->mem.mem_type); in ttm_bo_handle_move_mem()
241 struct ttm_resource_manager *new_man = ttm_manager_type(bdev, mem->mem_type); in ttm_bo_handle_move_mem()
262 if (mem->mem_type != TTM_PL_SYSTEM) { in ttm_bo_handle_move_mem()
272 if (bo->mem.mem_type == TTM_PL_SYSTEM) { in ttm_bo_handle_move_mem()
[all …]
Dttm_bo_util.c61 if (old_mem->mem_type != TTM_PL_SYSTEM) { in ttm_bo_move_ttm()
72 old_mem->mem_type = TTM_PL_SYSTEM; in ttm_bo_move_ttm()
79 if (new_mem->mem_type != TTM_PL_SYSTEM) { in ttm_bo_move_ttm()
222 struct ttm_resource_manager *man = ttm_manager_type(bdev, new_mem->mem_type); in ttm_bo_move_memcpy()
273 if ((old_mem->mem_type == new_mem->mem_type) && in ttm_bo_move_memcpy()
587 struct ttm_resource_manager *from = ttm_manager_type(bdev, bo->mem.mem_type); in ttm_bo_move_pipeline_evict()
613 struct ttm_resource_manager *from = ttm_manager_type(bdev, bo->mem.mem_type); in ttm_bo_move_accel_cleanup()
614 struct ttm_resource_manager *man = ttm_manager_type(bdev, new_mem->mem_type); in ttm_bo_move_accel_cleanup()
649 bo->mem.mem_type = TTM_PL_SYSTEM; in ttm_bo_pipeline_gutting()
/kernel/linux/linux-5.10/drivers/gpu/drm/amd/amdgpu/
Damdgpu_object.c67 if (bo->tbo.mem.mem_type == TTM_PL_VRAM) { in amdgpu_bo_subtract_pin_size()
71 } else if (bo->tbo.mem.mem_type == TTM_PL_TT) { in amdgpu_bo_subtract_pin_size()
139 places[c].mem_type = TTM_PL_VRAM; in amdgpu_bo_placement_from_domain()
155 places[c].mem_type = TTM_PL_TT; in amdgpu_bo_placement_from_domain()
168 places[c].mem_type = TTM_PL_SYSTEM; in amdgpu_bo_placement_from_domain()
181 places[c].mem_type = AMDGPU_PL_GDS; in amdgpu_bo_placement_from_domain()
189 places[c].mem_type = AMDGPU_PL_GWS; in amdgpu_bo_placement_from_domain()
197 places[c].mem_type = AMDGPU_PL_OA; in amdgpu_bo_placement_from_domain()
205 places[c].mem_type = TTM_PL_SYSTEM; in amdgpu_bo_placement_from_domain()
595 bo->tbo.mem.mem_type == TTM_PL_VRAM && in amdgpu_bo_do_create()
[all …]
Damdgpu_atomfirmware.c189 u8 mem_type; in amdgpu_atomfirmware_get_vram_info() local
214 mem_type = igp_info->v11.memorytype; in amdgpu_atomfirmware_get_vram_info()
216 *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type); in amdgpu_atomfirmware_get_vram_info()
223 mem_type = igp_info->v12.memorytype; in amdgpu_atomfirmware_get_vram_info()
225 *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type); in amdgpu_atomfirmware_get_vram_info()
244 mem_type = vram_module->v9.memory_type; in amdgpu_atomfirmware_get_vram_info()
246 *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type); in amdgpu_atomfirmware_get_vram_info()
264 mem_type = vram_module->v10.memory_type; 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()
284 mem_type = vram_module->v11.memory_type; in amdgpu_atomfirmware_get_vram_info()
[all …]
Damdgpu_ttm.c94 .mem_type = TTM_PL_SYSTEM, in amdgpu_evict_flags()
115 switch (bo->mem.mem_type) { in amdgpu_evict_flags()
198 mem->mem_type); in amdgpu_mm_node_addr()
294 if (mem->mem_type == TTM_PL_TT) { in amdgpu_ttm_map_buffer()
487 if (old_mem->mem_type == TTM_PL_VRAM && in amdgpu_move_blit()
540 placements.mem_type = TTM_PL_TT; in amdgpu_move_vram_ram()
601 placements.mem_type = TTM_PL_TT; in amdgpu_move_ram_vram()
635 if (mem->mem_type == TTM_PL_SYSTEM || in amdgpu_mem_visible()
636 mem->mem_type == TTM_PL_TT) in amdgpu_mem_visible()
638 if (mem->mem_type != TTM_PL_VRAM) in amdgpu_mem_visible()
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/qxl/
Dqxl_object.h61 static inline int qxl_bo_wait(struct qxl_bo *bo, u32 *mem_type, in qxl_bo_wait() argument
76 if (mem_type) in qxl_bo_wait()
77 *mem_type = bo->tbo.mem.mem_type; in qxl_bo_wait()
Dqxl_object.c68 qbo->placements[c].mem_type = TTM_PL_VRAM; in qxl_ttm_placement_from_domain()
72 qbo->placements[c].mem_type = TTM_PL_PRIV; in qxl_ttm_placement_from_domain()
74 qbo->placements[c].mem_type = TTM_PL_VRAM; in qxl_ttm_placement_from_domain()
78 qbo->placements[c].mem_type = TTM_PL_SYSTEM; in qxl_ttm_placement_from_domain()
82 qbo->placements[c].mem_type = TTM_PL_SYSTEM; in qxl_ttm_placement_from_domain()
184 if (bo->tbo.mem.mem_type == TTM_PL_VRAM) in qxl_bo_kmap_atomic_page()
186 else if (bo->tbo.mem.mem_type == TTM_PL_PRIV) in qxl_bo_kmap_atomic_page()
221 if ((bo->tbo.mem.mem_type != TTM_PL_VRAM) && in qxl_bo_kunmap_atomic_page()
222 (bo->tbo.mem.mem_type != TTM_PL_PRIV)) in qxl_bo_kunmap_atomic_page()
/kernel/linux/linux-5.10/arch/arm/include/asm/mach/
Dmap.h53 struct mem_type;
54 extern const struct mem_type *get_mem_type(unsigned int type);
59 const struct mem_type *mtype);
/kernel/linux/linux-5.10/arch/arm/mach-omap2/
Dsram.h12 u32 mem_type);
30 u32 mem_type);
43 u32 mem_type);
/kernel/linux/linux-5.10/include/trace/events/
Dxdp.h317 __field(u32, mem_type)
324 __entry->mem_type = xa->mem.type;
330 __print_symbolic(__entry->mem_type, __MEM_TYPE_SYM_TAB),
345 __field(u32, mem_type)
354 __entry->mem_type = xa->mem.type;
363 __print_symbolic(__entry->mem_type, __MEM_TYPE_SYM_TAB),
379 __field(u32, mem_type)
385 __entry->mem_type = mem->type;
390 __print_symbolic(__entry->mem_type, __MEM_TYPE_SYM_TAB),

123456