Home
last modified time | relevance | path

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

12345678910>>...144

/openbmc/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(sizeof(*mem), GFP_KERNEL); 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 …]
/openbmc/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 …]
/openbmc/linux/drivers/staging/media/atomisp/pci/runtime/isp_param/src/
H A Disp_param.c27 enum ia_css_isp_memories mem, in ia_css_isp_param_set_mem_init() argument
30 mem_init->params[pclass][mem].address = address; in ia_css_isp_param_set_mem_init()
31 mem_init->params[pclass][mem].size = (uint32_t)size; in ia_css_isp_param_set_mem_init()
38 enum ia_css_isp_memories mem, in ia_css_isp_param_set_css_mem_init() argument
41 mem_init->params[pclass][mem].address = address; in ia_css_isp_param_set_css_mem_init()
42 mem_init->params[pclass][mem].size = (uint32_t)size; in ia_css_isp_param_set_css_mem_init()
49 enum ia_css_isp_memories mem, in ia_css_isp_param_set_isp_mem_init() argument
52 mem_init->params[pclass][mem].address = address; in ia_css_isp_param_set_isp_mem_init()
53 mem_init->params[pclass][mem].size = (uint32_t)size; in ia_css_isp_param_set_isp_mem_init()
61 enum ia_css_isp_memories mem) in ia_css_isp_param_get_mem_init() argument
[all …]
/openbmc/linux/drivers/gpu/drm/i915/
H A Dintel_memory_region.c36 static int __iopagetest(struct intel_memory_region *mem, in __iopagetest() argument
51 dev_err(mem->i915->drm.dev, in __iopagetest()
53 &mem->region, &mem->io_start, &offset, caller, in __iopagetest()
61 static int iopagetest(struct intel_memory_region *mem, in iopagetest() argument
70 va = ioremap_wc(mem->io_start + offset, PAGE_SIZE); in iopagetest()
72 dev_err(mem->i915->drm.dev, in iopagetest()
74 &mem->io_start, &offset, caller); in iopagetest()
79 err = __iopagetest(mem, va, PAGE_SIZE, val[i], offset, caller); in iopagetest()
83 err = __iopagetest(mem, va, PAGE_SIZE, ~val[i], offset, caller); in iopagetest()
98 static int iomemtest(struct intel_memory_region *mem, in iomemtest() argument
[all …]
H A Dintel_region_ttm.c54 int intel_region_to_ttm_type(const struct intel_memory_region *mem) in intel_region_to_ttm_type() argument
58 GEM_BUG_ON(mem->type != INTEL_MEMORY_LOCAL && in intel_region_to_ttm_type()
59 mem->type != INTEL_MEMORY_MOCK && in intel_region_to_ttm_type()
60 mem->type != INTEL_MEMORY_SYSTEM); in intel_region_to_ttm_type()
62 if (mem->type == INTEL_MEMORY_SYSTEM) in intel_region_to_ttm_type()
65 type = mem->instance + TTM_PL_PRIV; in intel_region_to_ttm_type()
73 * @mem: The region to initialize.
82 int intel_region_ttm_init(struct intel_memory_region *mem) in intel_region_ttm_init() argument
84 struct ttm_device *bdev = &mem->i915->bdev; in intel_region_ttm_init()
85 int mem_type = intel_region_to_ttm_type(mem); in intel_region_ttm_init()
[all …]
/openbmc/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->cli->drm->client.vmm.vmm, &mem->vma[1]); in nouveau_mem_fini()
82 nvif_vmm_put(&mem->cli->drm->client.vmm.vmm, &mem->vma[0]); in nouveau_mem_fini()
83 mutex_lock(&mem->cli->drm->master.lock); in nouveau_mem_fini()
[all …]
/openbmc/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(sizeof(*mem), GFP_KERNEL); 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 …]
/openbmc/linux/drivers/infiniband/sw/siw/
H A Dsiw_mem.c36 siw_dbg_mem(m, "new MEM object\n"); in siw_mem_add()
50 struct siw_mem *mem; in siw_mem_id2obj() local
53 mem = xa_load(&sdev->mem_xa, stag_index); in siw_mem_id2obj()
54 if (likely(mem && kref_get_unless_zero(&mem->ref))) { in siw_mem_id2obj()
56 return mem; in siw_mem_id2obj()
93 struct siw_mem *mem = kzalloc(sizeof(*mem), GFP_KERNEL); in siw_mr_add_mem() local
97 if (!mem) in siw_mr_add_mem()
100 mem->mem_obj = mem_obj; in siw_mr_add_mem()
101 mem->stag_valid = 0; in siw_mr_add_mem()
102 mem->sdev = sdev; in siw_mr_add_mem()
[all …]
/openbmc/linux/drivers/media/v4l2-core/
H A Dvideobuf-dma-contig.c38 struct videobuf_dma_contig_memory *mem, in __videobuf_dc_alloc() argument
41 mem->size = size; in __videobuf_dc_alloc()
42 mem->vaddr = dma_alloc_coherent(dev, mem->size, &mem->dma_handle, in __videobuf_dc_alloc()
44 if (!mem->vaddr) { in __videobuf_dc_alloc()
45 dev_err(dev, "memory alloc size %ld failed\n", mem->size); in __videobuf_dc_alloc()
49 dev_dbg(dev, "dma mapped data is at %p (%ld)\n", mem->vaddr, mem->size); in __videobuf_dc_alloc()
55 struct videobuf_dma_contig_memory *mem) in __videobuf_dc_free() argument
57 dma_free_coherent(dev, mem->size, mem->vaddr, mem->dma_handle); in __videobuf_dc_free()
59 mem->vaddr = NULL; in __videobuf_dc_free()
83 struct videobuf_dma_contig_memory *mem; in videobuf_vm_close() local
[all …]
H A Dvideobuf-vmalloc.c72 struct videobuf_vmalloc_memory *mem; in videobuf_vm_close() local
88 mem = q->bufs[i]->priv; in videobuf_vm_close()
89 if (mem) { in videobuf_vm_close()
96 MAGIC_CHECK(mem->magic, MAGIC_VMAL_MEM); in videobuf_vm_close()
102 __func__, i, mem->vaddr); in videobuf_vm_close()
104 vfree(mem->vaddr); in videobuf_vm_close()
105 mem->vaddr = NULL; in videobuf_vm_close()
137 struct videobuf_vmalloc_memory *mem; in __videobuf_alloc_vb() local
140 vb = kzalloc(size + sizeof(*mem), GFP_KERNEL); in __videobuf_alloc_vb()
144 mem = vb->priv = ((char *)vb) + size; in __videobuf_alloc_vb()
[all …]
/openbmc/linux/kernel/dma/
H A Dcoherent.c31 struct dma_coherent_mem * mem) in dma_get_device_base() argument
33 if (mem->use_dev_dma_pfn_offset) in dma_get_device_base()
34 return phys_to_dma(dev, PFN_PHYS(mem->pfn_base)); in dma_get_device_base()
35 return mem->device_base; in dma_get_device_base()
77 static void _dma_release_coherent_memory(struct dma_coherent_mem *mem) in _dma_release_coherent_memory() argument
79 if (!mem) in _dma_release_coherent_memory()
82 memunmap(mem->virt_base); in _dma_release_coherent_memory()
83 bitmap_free(mem->bitmap); in _dma_release_coherent_memory()
84 kfree(mem); in _dma_release_coherent_memory()
88 struct dma_coherent_mem *mem) in dma_assign_coherent_memory() argument
[all …]
H A Dswiotlb.c231 struct io_tlb_pool *mem = &io_tlb_default_mem.defpool; in swiotlb_print_info() local
233 if (!mem->nslabs) { in swiotlb_print_info()
234 pr_warn("No low mem\n"); in swiotlb_print_info()
238 pr_info("mapped [mem %pa-%pa] (%luMB)\n", &mem->start, &mem->end, in swiotlb_print_info()
239 (mem->nslabs << IO_TLB_SHIFT) >> 20); in swiotlb_print_info()
260 struct io_tlb_pool *mem = &io_tlb_default_mem.defpool; in swiotlb_update_mem_attributes() local
263 if (!mem->nslabs || mem->late_alloc) in swiotlb_update_mem_attributes()
265 bytes = PAGE_ALIGN(mem->nslabs << IO_TLB_SHIFT); in swiotlb_update_mem_attributes()
266 set_memory_decrypted((unsigned long)mem->vaddr, bytes >> PAGE_SHIFT); in swiotlb_update_mem_attributes()
269 static void swiotlb_init_io_tlb_pool(struct io_tlb_pool *mem, phys_addr_t start, in swiotlb_init_io_tlb_pool() argument
[all …]
/openbmc/linux/tools/testing/selftests/mm/
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.c100 static int child_memcmp_fn(char *mem, size_t size, in child_memcmp_fn() argument
107 memcpy(old, mem, size); in child_memcmp_fn()
115 return memcmp(old, mem, size); in child_memcmp_fn()
118 static int child_vmsplice_memcmp_fn(char *mem, size_t size, in child_vmsplice_memcmp_fn() argument
122 .iov_base = mem, in child_vmsplice_memcmp_fn()
134 memcpy(old, mem, size); in child_vmsplice_memcmp_fn()
147 if (munmap(mem, size) < 0) in child_vmsplice_memcmp_fn()
165 typedef int (*child_fn)(char *mem, size_t size, struct comm_pipes *comm_pipes);
167 static void do_test_cow_in_parent(char *mem, size_t size, bool do_mprotect, in do_test_cow_in_parent() argument
185 exit(fn(mem, size, &comm_pipes)); in do_test_cow_in_parent()
[all …]
/openbmc/linux/drivers/gpu/drm/amd/amdgpu/
H A Damdgpu_amdkfd_gpuvm.c77 struct kgd_mem *mem) in kfd_mem_is_attached() argument
81 list_for_each_entry(entry, &mem->attachments, list) in kfd_mem_is_attached()
114 uint64_t mem; in amdgpu_amdkfd_gpuvm_init_mem_limits() local
120 mem = si.freeram - si.freehigh; in amdgpu_amdkfd_gpuvm_init_mem_limits()
121 mem *= si.mem_unit; in amdgpu_amdkfd_gpuvm_init_mem_limits()
124 kfd_mem_limit.max_system_mem_limit = mem - (mem >> 4); in amdgpu_amdkfd_gpuvm_init_mem_limits()
250 "adev reference can't be null when alloc mem flags vram is set"); in amdgpu_amdkfd_unreserve_mem_limit()
301 * @mem: BO of peer device that is being DMA mapped. Provides parameters
307 struct kgd_mem *mem, struct amdgpu_bo **bo_out) in create_dmamap_sg_bo() argument
313 ret = amdgpu_bo_reserve(mem->bo, false); in create_dmamap_sg_bo()
[all …]
/openbmc/qemu/tests/tcg/s390x/
H A Dex-relative-long.c14 * Each test sets the MEM_IDXth element of the mem array to MEM and uses a
16 * This is in order to prevent stumbling upon MEM in random memory in case
20 * clang doesn't, so the assembly code accesses mem[MEM_IDX] using MEM_ASM.
22 static long mem[0x1000]; variable
24 #define MEM_ASM "mem+0x800*8"
29 /* Initial mem[MEM_IDX] value. */
30 #define MEM 0xfedcba9889abcdef macro
37 F(cgfrl, REG, MEM, 2) \
38 F(cghrl, REG, MEM, 2) \
39 F(cgrl, REG, MEM, 2) \
[all …]
/openbmc/linux/drivers/base/
H A Dmemory.c107 struct memory_block *mem = to_memory_block(dev); in memory_block_release() local
109 WARN_ON(mem->altmap); in memory_block_release()
110 kfree(mem); in memory_block_release()
123 struct memory_block *mem = to_memory_block(dev); in phys_index_show() local
125 return sysfs_emit(buf, "%08lx\n", memory_block_id(mem->start_section_nr)); in phys_index_show()
144 struct memory_block *mem = to_memory_block(dev); in state_show() local
151 switch (mem->state) { in state_show()
163 return sysfs_emit(buf, "ERROR-UNKNOWN-%ld\n", mem->state); in state_show()
175 static unsigned long memblk_nr_poison(struct memory_block *mem);
177 static inline unsigned long memblk_nr_poison(struct memory_block *mem) in memblk_nr_poison() argument
[all …]
/openbmc/u-boot/arch/arm/mach-exynos/
H A Ddmc_init_ddr3.c3 * DDR3 mem setup file for board based on EXYNOS5
35 int ddr3_mem_ctrl_init(struct mem_timings *mem, int reset) in ddr3_mem_ctrl_init() argument
51 val = (mem->impedance << CA_CK_DRVR_DS_OFFSET) | in ddr3_mem_ctrl_init()
52 (mem->impedance << CA_CKE_DRVR_DS_OFFSET) | in ddr3_mem_ctrl_init()
53 (mem->impedance << CA_CS_DRVR_DS_OFFSET) | in ddr3_mem_ctrl_init()
54 (mem->impedance << CA_ADR_DRVR_DS_OFFSET); in ddr3_mem_ctrl_init()
59 val = (mem->ctrl_bstlen << PHY_CON42_CTRL_BSTLEN_SHIFT) | in ddr3_mem_ctrl_init()
60 (mem->ctrl_rdlat << PHY_CON42_CTRL_RDLAT_SHIFT); in ddr3_mem_ctrl_init()
65 if (dmc_config_zq(mem, &phy0_ctrl->phy_con16, &phy1_ctrl->phy_con16, in ddr3_mem_ctrl_init()
70 writel(mem->phy0_pulld_dqs, &phy0_ctrl->phy_con14); in ddr3_mem_ctrl_init()
[all …]
H A Ddmc_init_exynos4.c31 struct mem_timings mem = { variable
54 writel((mem.control1 | (1 << mem.dll_resync)), in phy_control_reset()
56 writel((mem.control1 | (0 << mem.dll_resync)), in phy_control_reset()
59 writel((mem.control0 | (0 << mem.dll_on)), in phy_control_reset()
61 writel((mem.control0 | (1 << mem.dll_on)), in phy_control_reset()
75 writel(mem.direct_cmd_msr[i] | mask, in dmc_config_mrs()
87 writel(mem.control1, &dmc->phycontrol1); in dmc_init()
94 writel(mem.zqcontrol, &dmc->phyzqcontrol); in dmc_init()
105 writel(mem.control1, &dmc->phycontrol1); in dmc_init()
108 writel((mem.control0 | CTRL_START | CTRL_DLL_ON), &dmc->phycontrol0); in dmc_init()
[all …]
/openbmc/linux/tools/perf/
H A Dbuiltin-mem.c15 #include "util/mem-events.h"
45 struct perf_mem *mem = *(struct perf_mem **)opt->value; in parse_record_events() local
54 mem->operation = 0; in parse_record_events()
59 "perf mem record [<options>] [<command>]",
60 "perf mem record [<options>] -- <command> [<options>]",
66 static int __cmd_record(int argc, const char **argv, struct perf_mem *mem) in __cmd_record() argument
76 OPT_CALLBACK('e', "event", &mem, "event", in __cmd_record()
77 "event selector. use 'perf mem record -e list' to list available events", in __cmd_record()
79 OPT_UINTEGER(0, "ldlat", &perf_mem_events__loads_ldlat, "mem-loads latency"), in __cmd_record()
98 if (mem->cpu_list) in __cmd_record()
[all …]
/openbmc/linux/drivers/spi/
H A Dspi-mem.c12 #include <linux/spi/spi-mem.h>
104 static int spi_check_buswidth_req(struct spi_mem *mem, u8 buswidth, bool tx) in spi_check_buswidth_req() argument
106 u32 mode = mem->spi->mode; in spi_check_buswidth_req()
142 static bool spi_mem_check_buswidth(struct spi_mem *mem, in spi_mem_check_buswidth() argument
145 if (spi_check_buswidth_req(mem, op->cmd.buswidth, true)) in spi_mem_check_buswidth()
149 spi_check_buswidth_req(mem, op->addr.buswidth, true)) in spi_mem_check_buswidth()
153 spi_check_buswidth_req(mem, op->dummy.buswidth, true)) in spi_mem_check_buswidth()
157 spi_check_buswidth_req(mem, op->data.buswidth, in spi_mem_check_buswidth()
164 bool spi_mem_default_supports_op(struct spi_mem *mem, in spi_mem_default_supports_op() argument
167 struct spi_controller *ctlr = mem->spi->controller; in spi_mem_default_supports_op()
[all …]
/openbmc/linux/mm/
H A Dcma_debug.c71 static void cma_add_to_cma_mem_list(struct cma *cma, struct cma_mem *mem) in cma_add_to_cma_mem_list() argument
74 hlist_add_head(&mem->node, &cma->mem_head); in cma_add_to_cma_mem_list()
80 struct cma_mem *mem = NULL; in cma_get_entry_from_list() local
84 mem = hlist_entry(cma->mem_head.first, struct cma_mem, node); in cma_get_entry_from_list()
85 hlist_del_init(&mem->node); in cma_get_entry_from_list()
89 return mem; in cma_get_entry_from_list()
94 struct cma_mem *mem = NULL; in cma_free_mem() local
97 mem = cma_get_entry_from_list(cma); in cma_free_mem()
98 if (mem == NULL) in cma_free_mem()
101 if (mem->n <= count) { in cma_free_mem()
[all …]
/openbmc/linux/arch/powerpc/include/asm/
H A Dio-defs.h5 DEF_PCI_AC_RET(readb, u8, (const PCI_IO_ADDR addr), (addr), mem, addr)
6 DEF_PCI_AC_RET(readw, u16, (const PCI_IO_ADDR addr), (addr), mem, addr)
7 DEF_PCI_AC_RET(readl, u32, (const PCI_IO_ADDR addr), (addr), mem, addr)
8 DEF_PCI_AC_RET(readw_be, u16, (const PCI_IO_ADDR addr), (addr), mem, addr)
9 DEF_PCI_AC_RET(readl_be, u32, (const PCI_IO_ADDR addr), (addr), mem, addr)
10 DEF_PCI_AC_NORET(writeb, (u8 val, PCI_IO_ADDR addr), (val, addr), mem, addr)
11 DEF_PCI_AC_NORET(writew, (u16 val, PCI_IO_ADDR addr), (val, addr), mem, addr)
12 DEF_PCI_AC_NORET(writel, (u32 val, PCI_IO_ADDR addr), (val, addr), mem, addr)
13 DEF_PCI_AC_NORET(writew_be, (u16 val, PCI_IO_ADDR addr), (val, addr), mem, addr)
14 DEF_PCI_AC_NORET(writel_be, (u32 val, PCI_IO_ADDR addr), (val, addr), mem, addr)
[all …]
/openbmc/linux/drivers/gpu/drm/i915/gem/
H A Di915_gem_region.c14 struct intel_memory_region *mem) in i915_gem_object_init_memory_region() argument
16 obj->mm.region = mem; in i915_gem_object_init_memory_region()
18 mutex_lock(&mem->objects.lock); in i915_gem_object_init_memory_region()
19 list_add(&obj->mm.region_link, &mem->objects.list); in i915_gem_object_init_memory_region()
20 mutex_unlock(&mem->objects.lock); in i915_gem_object_init_memory_region()
25 struct intel_memory_region *mem = obj->mm.region; in i915_gem_object_release_memory_region() local
27 mutex_lock(&mem->objects.lock); in i915_gem_object_release_memory_region()
29 mutex_unlock(&mem->objects.lock); in i915_gem_object_release_memory_region()
33 __i915_gem_object_create_region(struct intel_memory_region *mem, in __i915_gem_object_create_region() argument
45 * resource for the mem->region. We might need to revisit this in the in __i915_gem_object_create_region()
[all …]
/openbmc/qemu/tests/tcg/x86_64/
H A Dcmpxchg.c3 static int mem; variable
8 mem = orig; in test_cmpxchgb()
9 asm("cmpxchgb %b[cmp],%[mem]" in test_cmpxchgb()
10 : [ mem ] "+m"(mem), [ rax ] "=a"(ret) in test_cmpxchgb()
18 mem = orig; in test_cmpxchgw()
19 asm("cmpxchgw %w[cmp],%[mem]" in test_cmpxchgw()
20 : [ mem ] "+m"(mem), [ rax ] "=a"(ret) in test_cmpxchgw()
28 mem = orig; in test_cmpxchgl()
29 asm("cmpxchgl %[cmp],%[mem]" in test_cmpxchgl()
30 : [ mem ] "+m"(mem), [ rax ] "=a"(ret) in test_cmpxchgl()

12345678910>>...144