Home
last modified time | relevance | path

Searched full:mem (Results 1 – 25 of 2246) sorted by relevance

12345678910>>...90

/linux/arch/powerpc/mm/book3s64/
H A Diommu_api.c60 struct mm_iommu_table_group_mem_t *mem, *mem2; in mm_iommu_do_alloc() local
73 mem = kzalloc_obj(*mem); in mm_iommu_do_alloc()
74 if (!mem) { in mm_iommu_do_alloc()
80 mem->pageshift = __ffs(dev_hpa | (entries << PAGE_SHIFT)); in mm_iommu_do_alloc()
81 mem->dev_hpa = dev_hpa; in mm_iommu_do_alloc()
84 mem->dev_hpa = MM_IOMMU_TABLE_INVALID_HPA; in mm_iommu_do_alloc()
91 mem->pageshift = __ffs(ua | (entries << PAGE_SHIFT)); in mm_iommu_do_alloc()
92 mem->hpas = vzalloc(array_size(entries, sizeof(mem->hpas[0]))); in mm_iommu_do_alloc()
93 if (!mem->hpas) { in mm_iommu_do_alloc()
94 kfree(mem); in mm_iommu_do_alloc()
[all …]
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/
H A Dmem.c23 #include "mem.h"
35 struct page **mem; member
57 struct nvkm_mem *mem = nvkm_mem(memory); in nvkm_mem_addr() local
58 if (mem->pages == 1 && mem->mem) in nvkm_mem_addr()
59 return mem->dma[0]; in nvkm_mem_addr()
73 struct nvkm_mem *mem = nvkm_mem(memory); in nvkm_mem_map_dma() local
75 .memory = &mem->memory, in nvkm_mem_map_dma()
77 .dma = mem->dma, in nvkm_mem_map_dma()
85 struct nvkm_mem *mem = nvkm_mem(memory); in nvkm_mem_dtor() local
86 if (mem->mem) { in nvkm_mem_dtor()
[all …]
/linux/drivers/gpu/drm/i915/
H A Dintel_memory_region.c37 static int __iopagetest(struct intel_memory_region *mem, in __iopagetest() argument
52 dev_err(mem->i915->drm.dev, in __iopagetest()
54 &mem->region, &mem->io.start, &offset, caller, in __iopagetest()
62 static int iopagetest(struct intel_memory_region *mem, in iopagetest() argument
71 va = ioremap_wc(mem->io.start + offset, PAGE_SIZE); in iopagetest()
73 dev_err(mem->i915->drm.dev, in iopagetest()
75 &mem->io.start, &offset, caller); in iopagetest()
80 err = __iopagetest(mem, va, PAGE_SIZE, val[i], offset, caller); in iopagetest()
84 err = __iopagetest(mem, va, PAGE_SIZE, ~val[i], offset, caller); in iopagetest()
99 static int iomemtest(struct intel_memory_region *mem, in iomemtest() argument
[all …]
/linux/drivers/gpu/drm/nouveau/
H A Dnouveau_mem.c37 nouveau_mem_map(struct nouveau_mem *mem, in nouveau_mem_map() argument
53 args.nv50.kind = mem->kind; in nouveau_mem_map()
54 args.nv50.comp = mem->comp; in nouveau_mem_map()
61 if (mem->mem.type & NVIF_MEM_VRAM) in nouveau_mem_map()
67 args.gf100.kind = mem->kind; in nouveau_mem_map()
75 return nvif_vmm_map(vmm, vma->addr, mem->mem.size, &args, argc, &mem->mem, 0); in nouveau_mem_map()
79 nouveau_mem_fini(struct nouveau_mem *mem) in nouveau_mem_fini() argument
81 nvif_vmm_put(&mem->drm->client.vmm.vmm, &mem->vma[1]); in nouveau_mem_fini()
82 nvif_vmm_put(&mem->drm->client.vmm.vmm, &mem->vma[0]); in nouveau_mem_fini()
83 mutex_lock(&mem->drm->client_mutex); in nouveau_mem_fini()
[all …]
H A Dnouveau_vmm.c31 if (vma->mem) { in nouveau_vma_unmap()
33 vma->mem = NULL; in nouveau_vma_unmap()
38 nouveau_vma_map(struct nouveau_vma *vma, struct nouveau_mem *mem) in nouveau_vma_map() argument
41 int ret = nouveau_mem_map(mem, &vma->vmm->vmm, &tmp); in nouveau_vma_map()
44 vma->mem = mem; in nouveau_vma_map()
80 struct nouveau_mem *mem = nouveau_mem(nvbo->bo.resource); in nouveau_vma_new() local
95 vma->mem = NULL; in nouveau_vma_new()
100 mem->mem.page == nvbo->page) { in nouveau_vma_new()
101 ret = nvif_vmm_get(&vmm->vmm, LAZY, false, mem->mem.page, 0, in nouveau_vma_new()
102 mem->mem.size, &tmp); in nouveau_vma_new()
[all …]
/linux/drivers/pci/endpoint/
H A Dpci-epc-mem.c17 * @mem: address space of the endpoint controller
20 * Reimplement get_order() for mem->page_size since the generic get_order
23 static int pci_epc_mem_get_order(struct pci_epc_mem *mem, size_t size) in pci_epc_mem_get_order() argument
26 unsigned int page_shift = ilog2(mem->window.page_size); in pci_epc_mem_get_order()
51 struct pci_epc_mem *mem = NULL; in pci_epc_multi_mem_init() local
77 mem = kzalloc_obj(*mem); in pci_epc_multi_mem_init()
78 if (!mem) { in pci_epc_multi_mem_init()
87 kfree(mem); in pci_epc_multi_mem_init()
92 mem->window.phys_base = windows[i].phys_base; in pci_epc_multi_mem_init()
93 mem->window.size = windows[i].size; in pci_epc_multi_mem_init()
[all …]
/linux/tools/perf/
H A Dbuiltin-mem.c17 #include "util/mem-events.h"
52 struct perf_mem *mem = (struct perf_mem *)opt->value; in parse_record_events() local
57 pr_err("failed: there is no PMU that supports perf mem\n"); in parse_record_events()
68 mem->operation = 0; in parse_record_events()
72 static int __cmd_record(int argc, const char **argv, struct perf_mem *mem, in __cmd_record() argument
83 "perf mem record [<options>] [<command>]", in __cmd_record()
84 "perf mem record [<options>] -- <command> [<options>]", in __cmd_record()
105 if (mem->cpu_list) in __cmd_record()
121 (mem->operation & MEM_OPERATION_LOAD) && in __cmd_record()
122 (mem in __cmd_record()
186 struct perf_mem *mem = container_of(tool, struct perf_mem, tool); dump_raw_samples() local
264 report_raw_events(struct perf_mem * mem) report_raw_events() argument
329 get_sort_order(struct perf_mem * mem) get_sort_order() argument
364 __cmd_report(int argc,const char ** argv,struct perf_mem * mem,const struct option * options) __cmd_report() argument
475 struct perf_mem mem = { cmd_mem() local
[all...]
/linux/kernel/dma/
H A Dcoherent.c32 struct dma_coherent_mem *mem) in dma_get_device_base()
34 if (mem->use_dev_dma_pfn_offset) in dma_get_device_base()
35 return phys_to_dma(dev, PFN_PHYS(mem->pfn_base)); in dma_get_device_base()
36 return mem->device_base; in dma_get_device_base()
78 static void _dma_release_coherent_memory(struct dma_coherent_mem *mem) in _dma_release_coherent_memory()
80 if (!mem) in _dma_release_coherent_memory()
83 memunmap(mem->virt_base); in _dma_release_coherent_memory()
84 bitmap_free(mem->bitmap); in _dma_release_coherent_memory()
85 kfree(mem); in _dma_release_coherent_memory()
89 struct dma_coherent_mem *mem) in dma_assign_coherent_memory()
31 dma_get_device_base(struct device * dev,struct dma_coherent_mem * mem) dma_get_device_base() argument
77 _dma_release_coherent_memory(struct dma_coherent_mem * mem) _dma_release_coherent_memory() argument
88 dma_assign_coherent_memory(struct device * dev,struct dma_coherent_mem * mem) dma_assign_coherent_memory() argument
120 struct dma_coherent_mem *mem; dma_declare_coherent_memory() local
142 __dma_alloc_from_coherent(struct device * dev,struct dma_coherent_mem * mem,ssize_t size,dma_addr_t * dma_handle) __dma_alloc_from_coherent() argument
190 struct dma_coherent_mem *mem = dev_get_coherent_memory(dev); dma_alloc_from_dev_coherent() local
199 __dma_release_from_coherent(struct dma_coherent_mem * mem,int order,void * vaddr) __dma_release_from_coherent() argument
229 struct dma_coherent_mem *mem = dev_get_coherent_memory(dev); dma_release_from_dev_coherent() local
234 __dma_mmap_from_coherent(struct dma_coherent_mem * mem,struct vm_area_struct * vma,void * vaddr,size_t size,int * ret) __dma_mmap_from_coherent() argument
275 struct dma_coherent_mem *mem = dev_get_coherent_memory(dev); dma_mmap_from_dev_coherent() local
314 struct dma_coherent_mem *mem; dma_init_global_coherent() local
340 struct dma_coherent_mem *mem = rmem->priv; rmem_dma_device_init() local
[all...]
H A Dswiotlb.c188 static void inc_used_and_hiwater_real(struct io_tlb_mem *mem, in inc_used_and_hiwater_real() argument
193 new_used = atomic_long_add_return(nslots, &mem->total_used); in inc_used_and_hiwater_real()
194 old_hiwater = atomic_long_read(&mem->used_hiwater); in inc_used_and_hiwater_real()
198 } while (!atomic_long_try_cmpxchg(&mem->used_hiwater, in inc_used_and_hiwater_real()
202 static void dec_used_real(struct io_tlb_mem *mem, unsigned int nslots) in dec_used_real() argument
204 atomic_long_sub(nslots, &mem->total_used); in dec_used_real()
207 static void inc_used_and_hiwater_nop(struct io_tlb_mem *mem, in inc_used_and_hiwater_nop() argument
211 static void dec_used_nop(struct io_tlb_mem *mem, unsigned int nslots) in dec_used_nop() argument
218 static __always_inline void inc_used_and_hiwater(struct io_tlb_mem *mem, in inc_used_and_hiwater() argument
221 static_call(swiotlb_inc_used)(mem, nslot in inc_used_and_hiwater()
224 dec_used(struct io_tlb_mem * mem,unsigned int nslots) dec_used() argument
234 inc_used_and_hiwater(struct io_tlb_mem * mem,unsigned int nslots) inc_used_and_hiwater() argument
239 dec_used(struct io_tlb_mem * mem,unsigned int nslots) dec_used() argument
312 struct io_tlb_pool *mem = &io_tlb_default_mem.defpool; swiotlb_print_info() local
358 struct io_tlb_pool *mem = &io_tlb_default_mem.defpool; swiotlb_update_mem_attributes() local
386 swiotlb_init_io_tlb_pool(struct io_tlb_pool * mem,phys_addr_t start,void * vaddr,unsigned long nslabs,bool late_alloc,unsigned int nareas) swiotlb_init_io_tlb_pool() argument
423 add_mem_pool(struct io_tlb_mem * mem,struct io_tlb_pool * pool) add_mem_pool() argument
474 struct io_tlb_pool *mem = &io_tlb_default_mem.defpool; swiotlb_init_remap() local
549 struct io_tlb_pool *mem = &io_tlb_default_mem.defpool; swiotlb_init_late() local
656 struct io_tlb_pool *mem = &io_tlb_default_mem.defpool; swiotlb_exit() local
754 swiotlb_alloc_tlb(struct device * dev,struct io_tlb_mem * mem,size_t bytes,u64 phys_limit,gfp_t gfp,void ** vaddr) swiotlb_alloc_tlb() argument
833 swiotlb_alloc_pool(struct device * dev,struct io_tlb_mem * mem,unsigned long minslabs,unsigned long nslabs,unsigned int nareas,u64 phys_limit,gfp_t gfp) swiotlb_alloc_pool() argument
890 struct io_tlb_mem *mem = swiotlb_dyn_alloc() local
936 struct io_tlb_mem *mem = dev->dma_io_tlb_mem; __swiotlb_find_pool() local
1017 swiotlb_bounce(struct device * dev,phys_addr_t tlb_addr,size_t size,enum dma_data_direction dir,struct io_tlb_pool * mem) swiotlb_bounce() argument
1113 wrap_area_index(struct io_tlb_pool * mem,unsigned int index) wrap_area_index() argument
1122 inc_transient_used(struct io_tlb_mem * mem,unsigned int nslots) inc_transient_used() argument
1127 dec_transient_used(struct io_tlb_mem * mem,unsigned int nslots) dec_transient_used() argument
1133 inc_transient_used(struct io_tlb_mem * mem,unsigned int nslots) inc_transient_used() argument
1136 dec_transient_used(struct io_tlb_mem * mem,unsigned int nslots) dec_transient_used() argument
1288 struct io_tlb_mem *mem = dev->dma_io_tlb_mem; swiotlb_search_area() local
1335 struct io_tlb_mem *mem = dev->dma_io_tlb_mem; swiotlb_find_slots() local
1417 struct io_tlb_mem *mem = dev->dma_io_tlb_mem; swiotlb_find_slots() local
1473 mem_used(struct io_tlb_mem * mem) mem_used() argument
1534 struct io_tlb_mem *mem = dev->dma_io_tlb_mem; swiotlb_tbl_map_single() local
1629 swiotlb_release_slots(struct device * dev,phys_addr_t tlb_addr,struct io_tlb_pool * mem) swiotlb_release_slots() argument
1821 struct io_tlb_mem *mem = dev->dma_io_tlb_mem; is_swiotlb_active() local
1855 mem_transient_used(struct io_tlb_mem * mem) mem_transient_used() argument
1862 struct io_tlb_mem *mem = data; io_tlb_transient_used_get() local
1874 struct io_tlb_mem *mem = data; io_tlb_used_get() local
1882 struct io_tlb_mem *mem = data; io_tlb_hiwater_get() local
1890 struct io_tlb_mem *mem = data; io_tlb_hiwater_set() local
1904 swiotlb_create_debugfs_files(struct io_tlb_mem * mem,const char * dirname) swiotlb_create_debugfs_files() argument
1932 swiotlb_create_debugfs_files(struct io_tlb_mem * mem,const char * dirname) swiotlb_create_debugfs_files() argument
1943 struct io_tlb_mem *mem = dev->dma_io_tlb_mem; swiotlb_alloc() local
1994 struct io_tlb_mem *mem = rmem->priv; rmem_swiotlb_device_init() local
[all...]
/linux/tools/testing/selftests/mm/
H A Dpagemap_ioctl.c165 char *mem; in gethugetlb_mem()
172 mem = shmat(*shmid, 0, 0); in gethugetlb_mem()
173 if (mem == (char *)-1) { in gethugetlb_mem()
178 mem = mmap(NULL, size, PROT_READ | PROT_WRITE, in gethugetlb_mem()
180 if (mem == MAP_FAILED) in gethugetlb_mem()
184 return mem; in gethugetlb_mem()
191 char *mem, *vec; in userfaultfd_tests()
194 mem = mmap(NULL, mem_size, PROT_NONE, MAP_PRIVATE | MAP_ANON, -1, 0); in userfaultfd_tests()
195 if (mem == MAP_FAILED) in userfaultfd_tests()
198 wp_init(mem, mem_siz in userfaultfd_tests()
167 char *mem; gethugetlb_mem() local
192 char *mem, *vec; userfaultfd_tests() local
249 char *mem, *m[2]; sanity_tests_sd() local
685 base_tests(char * prefix,char * mem,unsigned long long mem_size,int skip) base_tests() argument
1075 unpopulated_written_test(const char * name,char * mem,long size,bool use_thp) unpopulated_written_test() argument
1119 char *mem; unpopulated_scan_test() local
1138 char *area, *mem; unpopulated_thp_scan_test() local
1163 char *mem, *fmem; sanity_tests() local
1333 char *mem, *mem2; mprotect_tests() local
1414 get_dirty_pages_reset(char * mem,unsigned int count,int reset,int page_size) get_dirty_pages_reset() argument
1450 thread_proc(void * mem) thread_proc() argument
1495 char *mem; transact_test() local
1588 char *mmap_mem, *mem; zeropfn_tests() local
1647 char *mem, *map, *fmem; main() local
[all...]
H A Dmkdirty.c41 static void do_test_write_sigsegv(char *mem) in do_test_write_sigsegv() argument
43 char orig = *mem; in do_test_write_sigsegv()
53 *mem = orig + 1; in do_test_write_sigsegv()
58 ksft_test_result(ret == 1 && *mem == orig, in do_test_write_sigsegv()
65 char *mem, *mmap_mem; in mmap_thp_range() local
73 mem = (char *)(((uintptr_t)mmap_mem + thpsize) & ~(thpsize - 1)); in mmap_thp_range()
75 if (madvise(mem, thpsize, MADV_HUGEPAGE)) { in mmap_thp_range()
83 return mem; in mmap_thp_range()
89 char *mem; in test_ptrace_write() local
94 mem = mmap(NULL, pagesize, PROT_READ, MAP_PRIVATE|MAP_ANON, -1, 0); in test_ptrace_write()
[all …]
H A Dcow.c118 static int child_memcmp_fn(char *mem, size_t size,
125 memcpy(old, mem, size); in child_memcmp_fn()
133 return memcmp(old, mem, size); in child_memcmp_fn()
136 static int child_vmsplice_memcmp_fn(char *mem, size_t size,
140 .iov_base = mem, in child_vmsplice_memcmp_fn()
152 memcpy(old, mem, size); in child_vmsplice_memcmp_fn()
165 if (munmap(mem, size) < 0) in child_vmsplice_memcmp_fn()
183 typedef int (*child_fn)(char *mem, size_t size, struct comm_pipes *comm_pipes);
185 static void do_test_cow_in_parent(char *mem, size_t size, bool do_mprotect,
204 _exit(fn(mem, siz in do_test_cow_in_parent()
119 child_memcmp_fn(char * mem,size_t size,struct comm_pipes * comm_pipes) child_memcmp_fn() argument
137 child_vmsplice_memcmp_fn(char * mem,size_t size,struct comm_pipes * comm_pipes) child_vmsplice_memcmp_fn() argument
186 do_test_cow_in_parent(char * mem,size_t size,bool do_mprotect,child_fn fn,bool xfail) do_test_cow_in_parent() argument
263 test_cow_in_parent(char * mem,size_t size,bool is_hugetlb) test_cow_in_parent() argument
268 test_cow_in_parent_mprotect(char * mem,size_t size,bool is_hugetlb) test_cow_in_parent_mprotect() argument
273 test_vmsplice_in_child(char * mem,size_t size,bool is_hugetlb) test_vmsplice_in_child() argument
279 test_vmsplice_in_child_mprotect(char * mem,size_t size,bool is_hugetlb) test_vmsplice_in_child_mprotect() argument
286 do_test_vmsplice_in_parent(char * mem,size_t size,bool before_fork,bool xfail) do_test_vmsplice_in_parent() argument
400 test_vmsplice_before_fork(char * mem,size_t size,bool is_hugetlb) test_vmsplice_before_fork() argument
405 test_vmsplice_after_fork(char * mem,size_t size,bool is_hugetlb) test_vmsplice_after_fork() argument
411 do_test_iouring(char * mem,size_t size,bool use_fork) do_test_iouring() argument
583 test_iouring_ro(char * mem,size_t size,bool is_hugetlb) test_iouring_ro() argument
588 test_iouring_fork(char * mem,size_t size,bool is_hugetlb) test_iouring_fork() argument
602 do_test_ro_pin(char * mem,size_t size,enum ro_pin_test test,bool fast) do_test_ro_pin() argument
744 test_ro_pin_on_shared(char * mem,size_t size,bool is_hugetlb) test_ro_pin_on_shared() argument
749 test_ro_fast_pin_on_shared(char * mem,size_t size,bool is_hugetlb) test_ro_fast_pin_on_shared() argument
754 test_ro_pin_on_ro_previously_shared(char * mem,size_t size,bool is_hugetlb) test_ro_pin_on_ro_previously_shared() argument
760 test_ro_fast_pin_on_ro_previously_shared(char * mem,size_t size,bool is_hugetlb) test_ro_fast_pin_on_ro_previously_shared() argument
766 test_ro_pin_on_ro_exclusive(char * mem,size_t size,bool is_hugetlb) test_ro_pin_on_ro_exclusive() argument
772 test_ro_fast_pin_on_ro_exclusive(char * mem,size_t size,bool is_hugetlb) test_ro_fast_pin_on_ro_exclusive() argument
782 char *mem; do_run_with_base_page() local
843 char *mem, *mmap_mem, *tmp, *mremap_mem = MAP_FAILED; do_run_with_thp() local
1055 char *mem, *dummy; run_with_hugetlb() local
1276 do_test_anon_thp_collapse(char * mem,size_t size,enum anon_thp_collapse_test test) do_test_anon_thp_collapse() argument
1420 test_anon_thp_collapse_unshared(char * mem,size_t size,bool is_hugetlb) test_anon_thp_collapse_unshared() argument
1427 test_anon_thp_collapse_fully_shared(char * mem,size_t size,bool is_hugetlb) test_anon_thp_collapse_fully_shared() argument
1434 test_anon_thp_collapse_lower_shared(char * mem,size_t size,bool is_hugetlb) test_anon_thp_collapse_lower_shared() argument
1441 test_anon_thp_collapse_upper_shared(char * mem,size_t size,bool is_hugetlb) test_anon_thp_collapse_upper_shared() argument
1512 test_cow(char * mem,const char * smem,size_t size) test_cow() argument
1532 test_ro_pin(char * mem,const char * smem,size_t size) test_ro_pin() argument
1537 test_ro_fast_pin(char * mem,const char * smem,size_t size) test_ro_fast_pin() argument
1544 char *mem, *smem; run_with_zeropage() local
1578 char *mem, *smem, *mmap_mem, *mmap_smem; run_with_huge_zeropage() local
1649 char *mem, *smem; run_with_memfd() local
1699 char *mem, *smem; run_with_tmpfile() local
1764 char *mem, *smem; run_with_memfd_hugetlb() local
[all...]
H A Duffd-wp-mremap.c61 char *mmap_mem, *mem; in mmap_aligned()
67 mem = (char *)(((uintptr_t)mmap_mem + size - 1) & ~(size - 1)); in alloc_one_folio()
68 munmap(mmap_mem, mem - mmap_mem); in alloc_one_folio() local
69 munmap(mem + size, mmap_mem + mmap_size - mem - size); in alloc_one_folio()
71 return mem; in alloc_one_folio()
79 char *mem, *addr; in alloc_one_folio()
102 mem = mmap_aligned(size, prot, flags); in alloc_one_folio()
109 mem = mmap(NULL, size, prot, flags, -1, 0); in alloc_one_folio()
112 if (mem in alloc_one_folio()
50 char *mmap_mem, *mem; mmap_aligned() local
129 check_uffd_wp_state(void * mem,size_t size,bool expect) check_uffd_wp_state() argument
161 void *mem = NULL; test_one_folio() local
[all...]
/linux/drivers/gpu/drm/amd/amdgpu/
H A Damdgpu_amdkfd_gpuvm.c74 struct kgd_mem *mem)
78 list_for_each_entry(entry, &mem->attachments, list) in kfd_mem_is_attached() argument
111 uint64_t mem;
117 mem = si.totalram - si.totalhigh; in amdgpu_amdkfd_gpuvm_init_mem_limits()
118 mem *= si.mem_unit; in amdgpu_amdkfd_gpuvm_init_mem_limits()
121 kfd_mem_limit.max_system_mem_limit = mem - (mem >> 6); in amdgpu_amdkfd_gpuvm_init_mem_limits()
262 "adev reference can't be null when alloc mem flags vram is set"); in amdgpu_amdkfd_reserve_mem_limit()
337 * @mem: BO of peer device that is being DMA mapped. Provides parameters in create_dmamap_sg_bo()
343 struct kgd_mem *mem, struc in create_dmamap_sg_bo()
115 uint64_t mem; amdgpu_amdkfd_gpuvm_init_mem_limits() local
332 create_dmamap_sg_bo(struct amdgpu_device * adev,struct kgd_mem * mem,struct amdgpu_bo ** bo_out) create_dmamap_sg_bo() argument
514 get_pte_flags(struct amdgpu_device * adev,struct amdgpu_vm * vm,struct kgd_mem * mem) get_pte_flags() argument
560 kfd_mem_dmamap_userptr(struct kgd_mem * mem,struct kfd_mem_attachment * attachment) kfd_mem_dmamap_userptr() argument
647 kfd_mem_dmamap_sg_bo(struct kgd_mem * mem,struct kfd_mem_attachment * attachment) kfd_mem_dmamap_sg_bo() argument
702 kfd_mem_dmamap_attachment(struct kgd_mem * mem,struct kfd_mem_attachment * attachment) kfd_mem_dmamap_attachment() argument
721 kfd_mem_dmaunmap_userptr(struct kgd_mem * mem,struct kfd_mem_attachment * attachment) kfd_mem_dmaunmap_userptr() argument
770 kfd_mem_dmaunmap_sg_bo(struct kgd_mem * mem,struct kfd_mem_attachment * attachment) kfd_mem_dmaunmap_sg_bo() argument
798 kfd_mem_dmaunmap_attachment(struct kgd_mem * mem,struct kfd_mem_attachment * attachment) kfd_mem_dmaunmap_attachment() argument
818 kfd_mem_export_dmabuf(struct kgd_mem * mem) kfd_mem_export_dmabuf() argument
838 kfd_mem_attach_dmabuf(struct amdgpu_device * adev,struct kgd_mem * mem,struct amdgpu_bo ** bo) kfd_mem_attach_dmabuf() argument
871 kfd_mem_attach(struct amdgpu_device * adev,struct kgd_mem * mem,struct amdgpu_vm * vm,bool is_aql) kfd_mem_attach() argument
1028 add_kgd_mem_to_kfd_bo_list(struct kgd_mem * mem,struct amdkfd_process_info * process_info,bool userptr) add_kgd_mem_to_kfd_bo_list() argument
1041 remove_kgd_mem_from_kfd_bo_list(struct kgd_mem * mem,struct amdkfd_process_info * process_info) remove_kgd_mem_from_kfd_bo_list() argument
1061 init_user_pages(struct kgd_mem * mem,uint64_t user_addr,bool criu_resume) init_user_pages() argument
1165 reserve_bo_and_vm(struct kgd_mem * mem,struct amdgpu_vm * vm,struct bo_vm_reservation_context * ctx) reserve_bo_and_vm() argument
1206 reserve_bo_and_cond_vms(struct kgd_mem * mem,struct amdgpu_vm * vm,enum bo_vm_match map_type,struct bo_vm_reservation_context * ctx) reserve_bo_and_cond_vms() argument
1269 unmap_bo_from_gpuvm(struct kgd_mem * mem,struct kfd_mem_attachment * entry,struct amdgpu_sync * sync) unmap_bo_from_gpuvm() argument
1295 update_gpuvm_pte(struct kgd_mem * mem,struct kfd_mem_attachment * entry,struct amdgpu_sync * sync) update_gpuvm_pte() argument
1317 map_bo_to_gpuvm(struct kgd_mem * mem,struct kfd_mem_attachment * entry,struct amdgpu_sync * sync,bool no_update_pte) map_bo_to_gpuvm() argument
1711 amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu(struct amdgpu_device * adev,uint64_t va,uint64_t size,void * drm_priv,struct kgd_mem ** mem,uint64_t * offset,uint32_t flags,bool criu_resume) amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu() argument
1910 amdgpu_amdkfd_gpuvm_free_memory_of_gpu(struct amdgpu_device * adev,struct kgd_mem * mem,void * drm_priv,uint64_t * size) amdgpu_amdkfd_gpuvm_free_memory_of_gpu() argument
2026 amdgpu_amdkfd_gpuvm_map_memory_to_gpu(struct amdgpu_device * adev,struct kgd_mem * mem,void * drm_priv) amdgpu_amdkfd_gpuvm_map_memory_to_gpu() argument
2131 amdgpu_amdkfd_gpuvm_dmaunmap_mem(struct kgd_mem * mem,void * drm_priv) amdgpu_amdkfd_gpuvm_dmaunmap_mem() argument
2163 amdgpu_amdkfd_gpuvm_unmap_memory_from_gpu(struct amdgpu_device * adev,struct kgd_mem * mem,void * drm_priv) amdgpu_amdkfd_gpuvm_unmap_memory_from_gpu() argument
2217 amdgpu_amdkfd_gpuvm_sync_memory(struct amdgpu_device * adev,struct kgd_mem * mem,bool intr) amdgpu_amdkfd_gpuvm_sync_memory() argument
2297 amdgpu_amdkfd_gpuvm_map_bo_to_kernel(struct kgd_mem * mem,void ** kptr,u64 * size,u32 domain) amdgpu_amdkfd_gpuvm_map_bo_to_kernel() argument
2362 amdgpu_amdkfd_gpuvm_unmap_bo_from_kernel(struct kgd_mem * mem) amdgpu_amdkfd_gpuvm_unmap_bo_from_kernel() argument
2373 amdgpu_amdkfd_gpuvm_get_vm_fault_info(struct amdgpu_device * adev,struct kfd_vm_fault_info * mem) amdgpu_amdkfd_gpuvm_get_vm_fault_info() argument
2386 import_obj_create(struct amdgpu_device * adev,struct dma_buf * dma_buf,struct drm_gem_object * obj,uint64_t va,void * drm_priv,struct kgd_mem ** mem,uint64_t * size,uint64_t * mmap_offset) import_obj_create() argument
2457 amdgpu_amdkfd_gpuvm_import_dmabuf_fd(struct amdgpu_device * adev,int fd,uint64_t va,void * drm_priv,struct kgd_mem ** mem,uint64_t * size,uint64_t * mmap_offset) amdgpu_amdkfd_gpuvm_import_dmabuf_fd() argument
2490 amdgpu_amdkfd_gpuvm_export_dmabuf(struct kgd_mem * mem,struct dma_buf ** dma_buf) amdgpu_amdkfd_gpuvm_export_dmabuf() argument
2518 amdgpu_amdkfd_evict_userptr(struct mmu_interval_notifier * mni,unsigned long cur_seq,struct kgd_mem * mem) amdgpu_amdkfd_evict_userptr() argument
2560 struct kgd_mem *mem, *tmp_mem; update_invalid_user_pages() local
2686 struct kgd_mem *mem, *tmp_mem; validate_invalid_user_pages() local
2779 struct kgd_mem *mem, *tmp_mem; confirm_valid_user_pages_locked() local
2938 struct kgd_mem *mem; amdgpu_amdkfd_gpuvm_restore_process_bos() local
3145 amdgpu_amdkfd_add_gws_to_process(void * info,void * gws,struct kgd_mem ** mem) amdgpu_amdkfd_add_gws_to_process() argument
3209 amdgpu_amdkfd_remove_gws_from_process(void * info,void * mem) amdgpu_amdkfd_remove_gws_from_process() argument
3257 amdgpu_amdkfd_bo_mapped_to_dev(void * drm_priv,struct kgd_mem * mem) amdgpu_amdkfd_bo_mapped_to_dev() argument
[all...]
/linux/mm/
H A Dcma_debug.c69 static void cma_add_to_cma_mem_list(struct cma *cma, struct cma_mem *mem) in cma_add_to_cma_mem_list() argument
72 hlist_add_head(&mem->node, &cma->mem_head); in cma_add_to_cma_mem_list()
78 struct cma_mem *mem = NULL; in cma_get_entry_from_list() local
82 mem = hlist_entry(cma->mem_head.first, struct cma_mem, node); in cma_get_entry_from_list()
83 hlist_del_init(&mem->node); in cma_get_entry_from_list()
87 return mem; in cma_get_entry_from_list()
92 struct cma_mem *mem = NULL; in cma_free_mem() local
95 mem = cma_get_entry_from_list(cma); in cma_free_mem()
96 if (mem == NULL) in cma_free_mem()
99 if (mem->n <= count) { in cma_free_mem()
[all …]
/linux/tools/testing/selftests/kvm/
H A Dguest_memfd_test.c44 void *mem; in test_mmap_cow() local
46 mem = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); in test_mmap_cow()
47 TEST_ASSERT(mem == MAP_FAILED, "Copy-on-write not allowed by guest_memfd."); in test_mmap_cow()
53 char *mem; in test_mmap_supported() local
57 mem = kvm_mmap(total_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd); in test_mmap_supported()
59 memset(mem, val, total_size); in test_mmap_supported()
61 TEST_ASSERT_EQ(READ_ONCE(mem[i]), val); in test_mmap_supported()
68 TEST_ASSERT_EQ(READ_ONCE(mem[i]), 0x00); in test_mmap_supported()
70 TEST_ASSERT_EQ(READ_ONCE(mem[i]), val); in test_mmap_supported()
72 memset(mem, va in test_mmap_supported()
85 char *mem; test_mbind() local
129 char *mem; test_numa_allocation() local
179 char *mem; test_collapse() local
235 char *mem; test_fault_sigbus() local
261 char *mem; test_mmap_not_supported() local
473 guest_code(u8 * mem,u64 size) guest_code() argument
497 u8 *mem; test_guest_memfd_guest() local
[all...]
/linux/drivers/media/platform/mediatek/vcodec/common/
H A Dmtk_vcodec_util.c48 int mtk_vcodec_mem_alloc(void *priv, struct mtk_vcodec_mem *mem) in mtk_vcodec_mem_alloc() argument
66 mem->va = dma_alloc_attrs(&plat_dev->dev, mem->size, &mem->dma_addr, in mtk_vcodec_mem_alloc()
68 if (!mem->va) { in mtk_vcodec_mem_alloc()
70 __func__, mem->size); in mtk_vcodec_mem_alloc()
74 mtk_v4l2_debug(plat_dev, 3, "[%d] - va = %p dma = 0x%lx size = 0x%zx", id, mem->va, in mtk_vcodec_mem_alloc()
75 (unsigned long)mem->dma_addr, mem->size); in mtk_vcodec_mem_alloc()
81 void mtk_vcodec_mem_free(void *priv, struct mtk_vcodec_mem *mem) in mtk_vcodec_mem_free() argument
99 if (!mem->va) { in mtk_vcodec_mem_free()
101 if (mem->size) in mtk_vcodec_mem_free()
102 mtk_v4l2_err(plat_dev, "Failed to free %zu bytes", mem->size); in mtk_vcodec_mem_free()
[all …]
/linux/drivers/gpu/drm/nouveau/nvif/
H A Dmem.c22 #include <nvif/mem.h>
29 struct nvif_mem *mem) in nvif_mem_ctor_map() argument
31 int ret = nvif_mem_ctor(mmu, name, mmu->mem, NVIF_MEM_MAPPABLE | type, in nvif_mem_ctor_map()
32 0, size, NULL, 0, mem); in nvif_mem_ctor_map()
34 ret = nvif_object_map(&mem->object, NULL, 0); in nvif_mem_ctor_map()
36 nvif_mem_dtor(mem); in nvif_mem_ctor_map()
42 nvif_mem_dtor(struct nvif_mem *mem) in nvif_mem_dtor() argument
44 nvif_object_dtor(&mem->object); in nvif_mem_dtor()
50 struct nvif_mem *mem) in nvif_mem_ctor_type() argument
56 mem->object.client = NULL; in nvif_mem_ctor_type()
[all …]
/linux/drivers/gpu/drm/ttm/
H A Dttm_agp_backend.c47 struct agp_memory *mem; member
55 struct agp_memory *mem; in ttm_agp_bind() local
59 if (agp_be->mem) in ttm_agp_bind()
62 mem = agp_allocate_memory(agp_be->bridge, ttm->num_pages, AGP_USER_MEMORY); in ttm_agp_bind()
63 if (unlikely(mem == NULL)) in ttm_agp_bind()
66 mem->page_count = 0; in ttm_agp_bind()
73 mem->pages[mem->page_count++] = page; in ttm_agp_bind()
75 agp_be->mem = mem; in ttm_agp_bind()
77 mem->is_flushed = 1; in ttm_agp_bind()
78 mem->type = (cached) ? AGP_USER_CACHED_MEMORY : AGP_USER_MEMORY; in ttm_agp_bind()
[all …]
/linux/drivers/firmware/efi/
H A Dcper.c301 int cper_mem_err_location(struct cper_mem_err_compact *mem, char *msg) in cper_mem_err_location() argument
310 if (mem->validation_bits & CPER_MEM_VALID_NODE) in cper_mem_err_location()
311 n += scnprintf(msg + n, len - n, "node:%d ", mem->node); in cper_mem_err_location()
312 if (mem->validation_bits & CPER_MEM_VALID_CARD) in cper_mem_err_location()
313 n += scnprintf(msg + n, len - n, "card:%d ", mem->card); in cper_mem_err_location()
314 if (mem->validation_bits & CPER_MEM_VALID_MODULE) in cper_mem_err_location()
315 n += scnprintf(msg + n, len - n, "module:%d ", mem->module); in cper_mem_err_location()
316 if (mem->validation_bits & CPER_MEM_VALID_RANK_NUMBER) in cper_mem_err_location()
317 n += scnprintf(msg + n, len - n, "rank:%d ", mem->rank); in cper_mem_err_location()
318 if (mem in cper_mem_err_location()
356 cper_dimm_err_location(struct cper_mem_err_compact * mem,char * msg) cper_dimm_err_location() argument
377 cper_mem_err_pack(const struct cper_sec_mem_err * mem,struct cper_mem_err_compact * cmem) cper_mem_err_pack() argument
414 cper_print_mem(const char * pfx,const struct cper_sec_mem_err * mem,int len) cper_print_mem() argument
[all...]
/linux/drivers/net/ethernet/amd/
H A Dsun3lance.c107 #define PKTBUF_ADDR(head) (void *)((unsigned long)(MEM) | (head)->base)
153 struct lance_memory *mem; member
163 #define MEM lp->mem macro
344 MEM = dvma_malloc_align(sizeof(struct lance_memory), 0x10000); in lance_probe()
345 if (!MEM) { in lance_probe()
362 dvma_free((void *)MEM); in lance_probe()
369 printk("%s: SUN3 Lance at io %#lx, mem %#lx, irq %d, hwaddr ", in lance_probe()
372 (unsigned long)MEM, in lance_probe()
379 MEM->init.hwaddr[0] = dev->dev_addr[1]; in lance_probe()
380 MEM->init.hwaddr[1] = dev->dev_addr[0]; in lance_probe()
[all …]
/linux/drivers/uio/
H A Duio_mf624.c35 void __iomem *INTCSR_reg = info->mem[0].internal_addr + INTCSR; in mf624_disable_interrupt()
63 void __iomem *INTCSR_reg = info->mem[0].internal_addr + INTCSR; in mf624_enable_interrupt()
90 void __iomem *INTCSR_reg = info->mem[0].internal_addr + INTCSR; in mf624_irq_handler()
117 static int mf624_setup_mem(struct pci_dev *dev, int bar, struct uio_mem *mem, const char *name) in mf624_setup_mem() argument
122 mem->name = name; in mf624_setup_mem()
123 mem->addr = start & PAGE_MASK; in mf624_setup_mem()
124 mem->offs = start & ~PAGE_MASK; in mf624_setup_mem()
125 if (!mem->addr) in mf624_setup_mem()
127 mem->size = ((start & ~PAGE_MASK) + len + PAGE_SIZE - 1) & PAGE_MASK; in mf624_setup_mem()
128 mem in mf624_setup_mem()
[all...]
/linux/tools/perf/arch/x86/util/
H A Dmem-events.c4 #include "util/mem-events.h"
5 #include "mem-events.h"
13 E("ldlat-loads", "%s/mem-loads,ldlat=%u/P", "mem-loads", true, 0),
14 E("ldlat-stores", "%s/mem-stores/P", "mem-stores", false, 0),
19 E("ldlat-loads", "{%s/mem-loads-aux/,%s/mem-loads,ldlat=%u/}:P", "mem-loads", true, MEM_LOADS_AUX),
20 E("ldlat-stores", "%s/mem
[all...]
/linux/drivers/char/hw_random/
H A Dintel-rng.c155 static inline u8 hwstatus_get(void __iomem *mem) in hwstatus_get() argument
157 return readb(mem + INTEL_RNG_HW_STATUS); in hwstatus_get()
160 static inline u8 hwstatus_set(void __iomem *mem, in hwstatus_set() argument
163 writeb(hw_status, mem + INTEL_RNG_HW_STATUS); in hwstatus_set()
164 return hwstatus_get(mem); in hwstatus_set()
169 void __iomem *mem = (void __iomem *)rng->priv; in intel_rng_data_present() local
173 data = !!(readb(mem + INTEL_RNG_STATUS) & in intel_rng_data_present()
184 void __iomem *mem = (void __iomem *)rng->priv; in intel_rng_data_read() local
186 *data = readb(mem + INTEL_RNG_DATA); in intel_rng_data_read()
193 void __iomem *mem in intel_rng_init() local
212 void __iomem *mem = (void __iomem *)rng->priv; intel_rng_cleanup() local
233 void __iomem *mem; global() member
333 void __iomem *mem; intel_rng_mod_init() local
408 void __iomem *mem = (void __iomem *)intel_rng.priv; intel_rng_mod_exit() local
[all...]
/linux/drivers/net/ipa/
H A Dipa_qmi.c285 const struct ipa_mem *mem; in init_modem_driver_req() local
298 mem = ipa_mem_find(ipa, IPA_MEM_MODEM_HEADER); in init_modem_driver_req()
299 if (mem->size) { in init_modem_driver_req()
301 req.hdr_tbl_info.start = ipa->mem_offset + mem->offset; in init_modem_driver_req()
302 req.hdr_tbl_info.end = req.hdr_tbl_info.start + mem->size - 1; in init_modem_driver_req()
305 mem = ipa_mem_find(ipa, IPA_MEM_V4_ROUTE); in init_modem_driver_req()
307 req.v4_route_tbl_info.start = ipa->mem_offset + mem->offset; in init_modem_driver_req()
310 mem = ipa_mem_find(ipa, IPA_MEM_V6_ROUTE); in init_modem_driver_req()
312 req.v6_route_tbl_info.start = ipa->mem_offset + mem->offset; in init_modem_driver_req()
315 mem = ipa_mem_find(ipa, IPA_MEM_V4_FILTER); in init_modem_driver_req()
[all …]

12345678910>>...90