Home
last modified time | relevance | path

Searched refs:mem (Results 1 – 25 of 704) sorted by relevance

12345678910>>...29

/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/
Dmem.c35 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()
87 while (mem->pages--) { in nvkm_mem_dtor()
[all …]
/drivers/gpu/drm/nouveau/
Dnouveau_mem.c36 nouveau_mem_map(struct nouveau_mem *mem, in nouveau_mem_map() argument
52 args.nv50.kind = mem->kind; in nouveau_mem_map()
53 args.nv50.comp = mem->comp; in nouveau_mem_map()
60 if (mem->mem.type & NVIF_MEM_VRAM) in nouveau_mem_map()
66 args.gf100.kind = mem->kind; in nouveau_mem_map()
74 return nvif_vmm_map(vmm, vma->addr, mem->mem.size, &args, argc, &mem->mem, 0); in nouveau_mem_map()
78 nouveau_mem_fini(struct nouveau_mem *mem) in nouveau_mem_fini() argument
80 nvif_vmm_put(&mem->cli->drm->client.vmm.vmm, &mem->vma[1]); in nouveau_mem_fini()
81 nvif_vmm_put(&mem->cli->drm->client.vmm.vmm, &mem->vma[0]); in nouveau_mem_fini()
82 mutex_lock(&mem->cli->drm->master.lock); in nouveau_mem_fini()
[all …]
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 …]
/drivers/gpu/drm/i915/gt/
Dintel_region_lmem.c15 static int init_fake_lmem_bar(struct intel_memory_region *mem) in init_fake_lmem_bar() argument
17 struct drm_i915_private *i915 = mem->i915; in init_fake_lmem_bar()
24 mem->fake_mappable.start = 0; in init_fake_lmem_bar()
25 mem->fake_mappable.size = resource_size(&mem->region); in init_fake_lmem_bar()
26 mem->fake_mappable.color = I915_COLOR_UNEVICTABLE; in init_fake_lmem_bar()
28 ret = drm_mm_reserve_node(&ggtt->vm.mm, &mem->fake_mappable); in init_fake_lmem_bar()
32 mem->remap_addr = dma_map_resource(i915->drm.dev, in init_fake_lmem_bar()
33 mem->region.start, in init_fake_lmem_bar()
34 mem->fake_mappable.size, in init_fake_lmem_bar()
37 if (dma_mapping_error(i915->drm.dev, mem->remap_addr)) { in init_fake_lmem_bar()
[all …]
/drivers/gpu/drm/i915/
Dintel_memory_region.c70 int intel_memory_region_reserve(struct intel_memory_region *mem, in intel_memory_region_reserve() argument
74 struct ttm_resource_manager *man = mem->region_private; in intel_memory_region_reserve()
76 GEM_BUG_ON(mem->is_range_manager); in intel_memory_region_reserve()
91 struct intel_memory_region *mem; in intel_memory_region_create() local
94 mem = kzalloc(sizeof(*mem), GFP_KERNEL); in intel_memory_region_create()
95 if (!mem) in intel_memory_region_create()
98 mem->i915 = i915; in intel_memory_region_create()
99 mem->region = (struct resource)DEFINE_RES_MEM(start, size); in intel_memory_region_create()
100 mem->io_start = io_start; in intel_memory_region_create()
101 mem->min_page_size = min_page_size; in intel_memory_region_create()
[all …]
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()
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()
89 resource_size(&mem->region), in intel_region_ttm_init()
[all …]
/drivers/staging/media/atomisp/pci/runtime/isp_param/src/
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 …]
/drivers/media/v4l2-core/
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 …]
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 …]
/drivers/pci/endpoint/
Dpci-epc-mem.c23 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()
94 mem->window.page_size = page_size; in pci_epc_multi_mem_init()
95 mem->bitmap = bitmap; in pci_epc_multi_mem_init()
[all …]
/drivers/infiniband/sw/siw/
Dsiw_mem.c50 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()
103 mem->va = start; in siw_mr_add_mem()
[all …]
/drivers/gpu/drm/amd/amdgpu/
Damdgpu_amdkfd_gpuvm.c70 struct kgd_mem *mem) in kfd_mem_is_attached() argument
74 list_for_each_entry(entry, &mem->attachments, list) in kfd_mem_is_attached()
88 uint64_t mem; in amdgpu_amdkfd_gpuvm_init_mem_limits() local
91 mem = si.freeram - si.freehigh; in amdgpu_amdkfd_gpuvm_init_mem_limits()
92 mem *= si.mem_unit; in amdgpu_amdkfd_gpuvm_init_mem_limits()
95 kfd_mem_limit.max_system_mem_limit = mem - (mem >> 4); in amdgpu_amdkfd_gpuvm_init_mem_limits()
96 kfd_mem_limit.max_ttm_mem_limit = (mem >> 1) - (mem >> 3); in amdgpu_amdkfd_gpuvm_init_mem_limits()
401 static uint64_t get_pte_flags(struct amdgpu_device *adev, struct kgd_mem *mem) in get_pte_flags() argument
403 struct amdgpu_device *bo_adev = amdgpu_ttm_adev(mem->bo->tbo.bdev); in get_pte_flags()
404 bool coherent = mem->alloc_flags & KFD_IOC_ALLOC_MEM_FLAGS_COHERENT; in get_pte_flags()
[all …]
/drivers/base/
Dmemory.c107 struct memory_block *mem = to_memory_block(dev); in memory_block_release() local
109 kfree(mem); in memory_block_release()
124 struct memory_block *mem = to_memory_block(dev); in phys_index_show() local
127 phys_index = mem->start_section_nr / sections_per_block; in phys_index_show()
148 struct memory_block *mem = to_memory_block(dev); in state_show() local
155 switch (mem->state) { in state_show()
167 return sysfs_emit(buf, "ERROR-UNKNOWN-%ld\n", mem->state); in state_show()
178 static int memory_block_online(struct memory_block *mem) in memory_block_online() argument
180 unsigned long start_pfn = section_nr_to_pfn(mem->start_section_nr); in memory_block_online()
182 unsigned long nr_vmemmap_pages = mem->nr_vmemmap_pages; in memory_block_online()
[all …]
/drivers/spi/
Dspi-mem.c103 static int spi_check_buswidth_req(struct spi_mem *mem, u8 buswidth, bool tx) in spi_check_buswidth_req() argument
105 u32 mode = mem->spi->mode; in spi_check_buswidth_req()
141 static bool spi_mem_check_buswidth(struct spi_mem *mem, in spi_mem_check_buswidth() argument
144 if (spi_check_buswidth_req(mem, op->cmd.buswidth, true)) in spi_mem_check_buswidth()
148 spi_check_buswidth_req(mem, op->addr.buswidth, true)) in spi_mem_check_buswidth()
152 spi_check_buswidth_req(mem, op->dummy.buswidth, true)) in spi_mem_check_buswidth()
156 spi_check_buswidth_req(mem, op->data.buswidth, in spi_mem_check_buswidth()
163 bool spi_mem_dtr_supports_op(struct spi_mem *mem, in spi_mem_dtr_supports_op() argument
169 return spi_mem_check_buswidth(mem, op); in spi_mem_dtr_supports_op()
173 bool spi_mem_default_supports_op(struct spi_mem *mem, in spi_mem_default_supports_op() argument
[all …]
/drivers/firmware/efi/
Dcper.c214 static int cper_mem_err_location(struct cper_mem_err_compact *mem, char *msg) in cper_mem_err_location() argument
223 if (mem->validation_bits & CPER_MEM_VALID_NODE) in cper_mem_err_location()
224 n += scnprintf(msg + n, len - n, "node: %d ", mem->node); in cper_mem_err_location()
225 if (mem->validation_bits & CPER_MEM_VALID_CARD) in cper_mem_err_location()
226 n += scnprintf(msg + n, len - n, "card: %d ", mem->card); in cper_mem_err_location()
227 if (mem->validation_bits & CPER_MEM_VALID_MODULE) in cper_mem_err_location()
228 n += scnprintf(msg + n, len - n, "module: %d ", mem->module); in cper_mem_err_location()
229 if (mem->validation_bits & CPER_MEM_VALID_RANK_NUMBER) in cper_mem_err_location()
230 n += scnprintf(msg + n, len - n, "rank: %d ", mem->rank); in cper_mem_err_location()
231 if (mem->validation_bits & CPER_MEM_VALID_BANK) in cper_mem_err_location()
[all …]
/drivers/gpu/drm/ttm/
Dttm_agp_backend.c46 struct agp_memory *mem; member
54 struct agp_memory *mem; in ttm_agp_bind() local
58 if (agp_be->mem) in ttm_agp_bind()
61 mem = agp_allocate_memory(agp_be->bridge, ttm->num_pages, AGP_USER_MEMORY); in ttm_agp_bind()
62 if (unlikely(mem == NULL)) in ttm_agp_bind()
65 mem->page_count = 0; in ttm_agp_bind()
72 mem->pages[mem->page_count++] = page; in ttm_agp_bind()
74 agp_be->mem = mem; in ttm_agp_bind()
76 mem->is_flushed = 1; in ttm_agp_bind()
77 mem->type = (cached) ? AGP_USER_CACHED_MEMORY : AGP_USER_MEMORY; in ttm_agp_bind()
[all …]
/drivers/char/hw_random/
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 = (void __iomem *)rng->priv; in intel_rng_init() local
[all …]
Dxiphera-trng.c32 void __iomem *mem; member
43 if (readl(trng->mem + STATUS_REG) == TRNG_NEW_RAND_AVAILABLE) { in xiphera_trng_read()
44 *(u32 *)buf = readl(trng->mem + RAND_REG); in xiphera_trng_read()
49 writel(HOST_TO_TRNG_READ, trng->mem + CONTROL_REG); in xiphera_trng_read()
50 writel(HOST_TO_TRNG_ENABLE, trng->mem + CONTROL_REG); in xiphera_trng_read()
71 trng->mem = devm_platform_ioremap_resource(pdev, 0); in xiphera_trng_probe()
72 if (IS_ERR(trng->mem)) in xiphera_trng_probe()
73 return PTR_ERR(trng->mem); in xiphera_trng_probe()
79 writel(HOST_TO_TRNG_RESET, trng->mem + CONTROL_REG); in xiphera_trng_probe()
82 if (readl(trng->mem + STATUS_REG) != TRNG_ACK_RESET) { in xiphera_trng_probe()
[all …]
/drivers/net/ipa/
Dipa_qmi.c288 const struct ipa_mem *mem; in init_modem_driver_req() local
301 mem = ipa_mem_find(ipa, IPA_MEM_MODEM_HEADER); in init_modem_driver_req()
302 if (mem->size) { in init_modem_driver_req()
304 req.hdr_tbl_info.start = ipa->mem_offset + mem->offset; in init_modem_driver_req()
305 req.hdr_tbl_info.end = req.hdr_tbl_info.start + mem->size - 1; in init_modem_driver_req()
308 mem = ipa_mem_find(ipa, IPA_MEM_V4_ROUTE); in init_modem_driver_req()
310 req.v4_route_tbl_info.start = ipa->mem_offset + mem->offset; in init_modem_driver_req()
313 mem = ipa_mem_find(ipa, IPA_MEM_V6_ROUTE); in init_modem_driver_req()
315 req.v6_route_tbl_info.start = ipa->mem_offset + mem->offset; in init_modem_driver_req()
318 mem = ipa_mem_find(ipa, IPA_MEM_V4_FILTER); in init_modem_driver_req()
[all …]
Dipa_mem.c34 const struct ipa_mem *mem = &ipa->mem[i]; in ipa_mem_find() local
36 if (mem->id == mem_id) in ipa_mem_find()
37 return mem; in ipa_mem_find()
48 const struct ipa_mem *mem = ipa_mem_find(ipa, mem_id); in ipa_mem_zero_region_add() local
51 if (!mem->size) in ipa_mem_zero_region_add()
54 ipa_cmd_dma_shared_mem_add(trans, mem->offset, mem->size, addr, true); in ipa_mem_zero_region_add()
78 const struct ipa_mem *mem; in ipa_mem_setup() local
97 mem = ipa_mem_find(ipa, IPA_MEM_MODEM_HEADER); in ipa_mem_setup()
98 offset = mem->offset; in ipa_mem_setup()
99 size = mem->size; in ipa_mem_setup()
[all …]
/drivers/media/platform/mtk-vcodec/
Dmtk_vcodec_util.c37 struct mtk_vcodec_mem *mem) in mtk_vcodec_mem_alloc() argument
39 unsigned long size = mem->size; in mtk_vcodec_mem_alloc()
43 mem->va = dma_alloc_coherent(dev, size, &mem->dma_addr, GFP_KERNEL); in mtk_vcodec_mem_alloc()
44 if (!mem->va) { in mtk_vcodec_mem_alloc()
50 mtk_v4l2_debug(3, "[%d] - va = %p", ctx->id, mem->va); in mtk_vcodec_mem_alloc()
52 (unsigned long)mem->dma_addr); in mtk_vcodec_mem_alloc()
60 struct mtk_vcodec_mem *mem) in mtk_vcodec_mem_free() argument
62 unsigned long size = mem->size; in mtk_vcodec_mem_free()
66 if (!mem->va) { in mtk_vcodec_mem_free()
72 mtk_v4l2_debug(3, "[%d] - va = %p", ctx->id, mem->va); in mtk_vcodec_mem_free()
[all …]
/drivers/gpu/drm/nouveau/nvif/
Dmem.c29 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()
73 args, sizeof(*args) + argc, &mem->object); in nvif_mem_ctor_type()
[all …]
/drivers/uio/
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->memtype = UIO_MEM_PHYS; in mf624_setup_mem()
[all …]
/drivers/gpu/drm/i915/gem/
Di915_gem_region.c12 struct intel_memory_region *mem) in i915_gem_object_init_memory_region() argument
14 obj->mm.region = intel_memory_region_get(mem); in i915_gem_object_init_memory_region()
16 mutex_lock(&mem->objects.lock); in i915_gem_object_init_memory_region()
17 list_add(&obj->mm.region_link, &mem->objects.list); in i915_gem_object_init_memory_region()
18 mutex_unlock(&mem->objects.lock); in i915_gem_object_init_memory_region()
23 struct intel_memory_region *mem = obj->mm.region; in i915_gem_object_release_memory_region() local
25 mutex_lock(&mem->objects.lock); in i915_gem_object_release_memory_region()
27 mutex_unlock(&mem->objects.lock); in i915_gem_object_release_memory_region()
29 intel_memory_region_put(mem); 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
[all …]
/drivers/gpu/drm/nouveau/dispnv50/
Dheadc57d.c120 headc57d_olut_load_8(struct drm_color_lut *in, int size, void __iomem *mem) in headc57d_olut_load_8() argument
122 memset_io(mem, 0x00, 0x20); /* VSS header. */ in headc57d_olut_load_8()
123 mem += 0x20; in headc57d_olut_load_8()
137 for (i = 0; i < 4; i++, mem += 8) { in headc57d_olut_load_8()
138 writew(r + ri * i, mem + 0); in headc57d_olut_load_8()
139 writew(g + gi * i, mem + 2); in headc57d_olut_load_8()
140 writew(b + bi * i, mem + 4); in headc57d_olut_load_8()
147 writew(readw(mem - 8), mem + 0); in headc57d_olut_load_8()
148 writew(readw(mem - 6), mem + 2); in headc57d_olut_load_8()
149 writew(readw(mem - 4), mem + 4); in headc57d_olut_load_8()
[all …]

12345678910>>...29