Home
last modified time | relevance | path

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

12345678910>>...30

/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/i915/
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 …]
Dintel_region_ttm.c55 int intel_region_to_ttm_type(const struct intel_memory_region *mem) in intel_region_to_ttm_type() argument
59 GEM_BUG_ON(mem->type != INTEL_MEMORY_LOCAL && in intel_region_to_ttm_type()
60 mem->type != INTEL_MEMORY_MOCK && in intel_region_to_ttm_type()
61 mem->type != INTEL_MEMORY_SYSTEM); in intel_region_to_ttm_type()
63 if (mem->type == INTEL_MEMORY_SYSTEM) in intel_region_to_ttm_type()
66 type = mem->instance + TTM_PL_PRIV; in intel_region_to_ttm_type()
83 int intel_region_ttm_init(struct intel_memory_region *mem) in intel_region_ttm_init() argument
85 struct ttm_device *bdev = &mem->i915->bdev; in intel_region_ttm_init()
86 int mem_type = intel_region_to_ttm_type(mem); in intel_region_ttm_init()
90 resource_size(&mem->region), in intel_region_ttm_init()
[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/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.c72 struct kgd_mem *mem) in kfd_mem_is_attached() argument
76 list_for_each_entry(entry, &mem->attachments, list) in kfd_mem_is_attached()
90 uint64_t mem; in amdgpu_amdkfd_gpuvm_init_mem_limits() local
93 mem = si.freeram - si.freehigh; in amdgpu_amdkfd_gpuvm_init_mem_limits()
94 mem *= si.mem_unit; in amdgpu_amdkfd_gpuvm_init_mem_limits()
97 kfd_mem_limit.max_system_mem_limit = mem - (mem >> 4); in amdgpu_amdkfd_gpuvm_init_mem_limits()
98 kfd_mem_limit.max_ttm_mem_limit = (mem >> 1) - (mem >> 3); in amdgpu_amdkfd_gpuvm_init_mem_limits()
251 struct kgd_mem *mem, struct amdgpu_bo **bo_out) in create_dmamap_sg_bo() argument
256 ret = amdgpu_bo_reserve(mem->bo, false); in create_dmamap_sg_bo()
261 ret = amdgpu_gem_object_create(adev, mem->bo->tbo.base.size, align, in create_dmamap_sg_bo()
[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()
181 static int memory_block_online(struct memory_block *mem) in memory_block_online() argument
183 unsigned long start_pfn = section_nr_to_pfn(mem->start_section_nr); in memory_block_online()
185 unsigned long nr_vmemmap_pages = mem->nr_vmemmap_pages; in memory_block_online()
[all …]
/drivers/spi/
Dspi-mem.c104 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()
187 return spi_mem_check_buswidth(mem, op); in spi_mem_default_supports_op()
[all …]
/drivers/firmware/efi/
Dcper.c240 int cper_mem_err_location(struct cper_mem_err_compact *mem, char *msg) in cper_mem_err_location() argument
249 if (mem->validation_bits & CPER_MEM_VALID_NODE) in cper_mem_err_location()
250 n += scnprintf(msg + n, len - n, "node:%d ", mem->node); in cper_mem_err_location()
251 if (mem->validation_bits & CPER_MEM_VALID_CARD) in cper_mem_err_location()
252 n += scnprintf(msg + n, len - n, "card:%d ", mem->card); in cper_mem_err_location()
253 if (mem->validation_bits & CPER_MEM_VALID_MODULE) in cper_mem_err_location()
254 n += scnprintf(msg + n, len - n, "module:%d ", mem->module); in cper_mem_err_location()
255 if (mem->validation_bits & CPER_MEM_VALID_RANK_NUMBER) in cper_mem_err_location()
256 n += scnprintf(msg + n, len - n, "rank:%d ", mem->rank); in cper_mem_err_location()
257 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()
79 const struct ipa_mem *mem; in ipa_mem_setup() local
98 mem = ipa_mem_find(ipa, IPA_MEM_MODEM_HEADER); in ipa_mem_setup()
99 offset = mem->offset; in ipa_mem_setup()
100 size = mem->size; in ipa_mem_setup()
[all …]
/drivers/gpu/drm/i915/gem/
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
56 if (!mem) in __i915_gem_object_create_region()
[all …]
Di915_gem_stolen.c395 static int i915_gem_init_stolen(struct intel_memory_region *mem) in i915_gem_init_stolen() argument
397 struct drm_i915_private *i915 = mem->i915; in i915_gem_init_stolen()
418 if (resource_size(&mem->region) == 0) in i915_gem_init_stolen()
421 i915->dsm = mem->region; in i915_gem_init_stolen()
482 mem->region.end = reserved_base - 1; in i915_gem_init_stolen()
483 mem->io_size = min(mem->io_size, resource_size(&mem->region)); in i915_gem_init_stolen()
632 static int __i915_gem_object_create_stolen(struct intel_memory_region *mem, in __i915_gem_object_create_stolen() argument
647 drm_gem_private_object_init(&mem->i915->drm, &obj->base, stolen->size); in __i915_gem_object_create_stolen()
652 cache_level = HAS_LLC(mem->i915) ? I915_CACHE_LLC : I915_CACHE_NONE; in __i915_gem_object_create_stolen()
658 i915_gem_object_init_memory_region(obj, mem); in __i915_gem_object_create_stolen()
[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/media/platform/mediatek/vcodec/
Dmtk_vcodec_util.c30 struct mtk_vcodec_mem *mem) in mtk_vcodec_mem_alloc() argument
32 unsigned long size = mem->size; in mtk_vcodec_mem_alloc()
36 mem->va = dma_alloc_coherent(dev, size, &mem->dma_addr, GFP_KERNEL); in mtk_vcodec_mem_alloc()
37 if (!mem->va) { in mtk_vcodec_mem_alloc()
43 mtk_v4l2_debug(3, "[%d] - va = %p", ctx->id, mem->va); in mtk_vcodec_mem_alloc()
45 (unsigned long)mem->dma_addr); in mtk_vcodec_mem_alloc()
53 struct mtk_vcodec_mem *mem) in mtk_vcodec_mem_free() argument
55 unsigned long size = mem->size; in mtk_vcodec_mem_free()
59 if (!mem->va) { in mtk_vcodec_mem_free()
65 mtk_v4l2_debug(3, "[%d] - va = %p", ctx->id, mem->va); in mtk_vcodec_mem_free()
[all …]
/drivers/leds/
Dleds-bcm6328.c70 void __iomem *mem; member
117 mode = led->mem + BCM6328_REG_MODE_HI; in bcm6328_led_mode()
119 mode = led->mem + BCM6328_REG_MODE_LO; in bcm6328_led_mode()
212 val = bcm6328_led_read(led->mem + BCM6328_REG_INIT); in bcm6328_blink_set()
215 bcm6328_led_write(led->mem + BCM6328_REG_INIT, val); in bcm6328_blink_set()
236 val = bcm6328_led_read(led->mem + BCM6328_REG_INIT); in bcm6328_blink_set()
239 bcm6328_led_write(led->mem + BCM6328_REG_INIT, val); in bcm6328_blink_set()
256 void __iomem *mem, spinlock_t *lock) in bcm6328_hwled() argument
262 val = bcm6328_led_read(mem + BCM6328_REG_HWDIS); in bcm6328_hwled()
264 bcm6328_led_write(mem + BCM6328_REG_HWDIS, val); in bcm6328_hwled()
[all …]

12345678910>>...30