/linux/arch/powerpc/mm/book3s64/ |
A D | iommu_api.c | 73 mem = kzalloc(sizeof(*mem), GFP_KERNEL); in mm_iommu_do_alloc() 74 if (!mem) { in mm_iommu_do_alloc() 94 kfree(mem); in mm_iommu_do_alloc() 156 mem->pageshift = min(mem->pageshift, pageshift); in mm_iommu_do_alloc() 178 kfree(mem); in mm_iommu_do_alloc() 232 kfree(mem); in mm_iommu_do_free() 335 if ((mem->ua == ua) && (mem->entries == entries)) { in mm_iommu_get() 361 *hpa = mem->dev_hpa + (ua - mem->ua); in mm_iommu_ua_to_hpa() 385 *hpa = mem->dev_hpa + (ua - mem->ua); in mm_iommu_ua_to_hpa_rm() 406 if (!mem) in mm_iommu_ua_mark_dirty_rm() [all …]
|
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ |
A D | mem.c | 58 if (mem->pages == 1 && mem->mem) in nvkm_mem_addr() 86 if (mem->mem) { in nvkm_mem_dtor() 89 mem->dma[mem->pages], PAGE_SIZE, in nvkm_mem_dtor() 91 __free_page(mem->mem[mem->pages]); in nvkm_mem_dtor() 94 kvfree(mem->mem); in nvkm_mem_dtor() 136 if (mem->mem) { in nvkm_mem_map_host() 137 *pmap = vmap(mem->mem, mem->pages, VM_MAP, PAGE_KERNEL); in nvkm_mem_map_host() 166 if (!(mem = kzalloc(sizeof(*mem), GFP_KERNEL))) in nvkm_mem_new_host() 194 if (!(mem->mem = kvmalloc_array(size, sizeof(*mem->mem), GFP_KERNEL))) in nvkm_mem_new_host() 204 for (mem->pages = 0; size; size--, mem->pages++) { in nvkm_mem_new_host() [all …]
|
/linux/kernel/dma/ |
A D | swiotlb.c | 170 if (!mem->nslabs || mem->late_alloc) in swiotlb_update_mem_attributes() 186 mem->end = mem->start + bytes; in swiotlb_init_io_tlb_mem() 340 tbl_size = PAGE_ALIGN(mem->end - mem->start); in swiotlb_exit() 352 memset(mem, 0, sizeof(*mem)); in swiotlb_exit() 489 if (unlikely(nslots > mem->nslabs - mem->used)) in swiotlb_find_slots() 554 if (!mem) in swiotlb_tbl_map_single() 572 alloc_size, mem->nslabs, mem->used); in swiotlb_tbl_map_single() 711 return mem && mem->nslabs; in is_swiotlb_active() 762 if (!mem) in swiotlb_alloc() 798 mem = kzalloc(sizeof(*mem), GFP_KERNEL); in rmem_swiotlb_device_init() [all …]
|
A D | coherent.c | 79 if (!mem) in dma_release_coherent_memory() 84 kfree(mem); in dma_release_coherent_memory() 96 dev->dma_mem = mem; in dma_assign_coherent_memory() 124 if (IS_ERR(mem)) in dma_declare_coherent_memory() 147 pageno = bitmap_find_free_region(mem->bitmap, mem->size, order); in __dma_alloc_from_coherent() 184 if (!mem) in dma_alloc_from_dev_coherent() 194 if (mem && vaddr >= mem->virt_base && vaddr < in __dma_release_from_coherent() 195 (mem->virt_base + ((dma_addr_t)mem->size << PAGE_SHIFT))) { in __dma_release_from_coherent() 229 if (mem && vaddr >= mem->virt_base && vaddr + size <= in __dma_mmap_from_coherent() 230 (mem->virt_base + ((dma_addr_t)mem->size << PAGE_SHIFT))) { in __dma_mmap_from_coherent() [all …]
|
/linux/drivers/gpu/drm/nouveau/ |
A D | nouveau_mem.c | 60 if (mem->mem.type & NVIF_MEM_VRAM) in nouveau_mem_map() 74 return nvif_vmm_map(vmm, vma->addr, mem->mem.size, &args, argc, &mem->mem, 0); in nouveau_mem_map() 83 nvif_mem_dtor(&mem->mem); in nouveau_mem_fini() 104 mem->comp = mem->kind = 0; in nouveau_mem_host() 107 mem->kind = mmu->kind[mem->kind]; in nouveau_mem_host() 119 &args, sizeof(args), &mem->mem); in nouveau_mem_host() 142 &mem->mem); in nouveau_mem_vram() 151 &mem->mem); in nouveau_mem_vram() 160 reg->start = mem->mem.addr >> PAGE_SHIFT; in nouveau_mem_vram() 170 kfree(mem); in nouveau_mem_del() [all …]
|
/linux/drivers/gpu/drm/i915/gt/ |
A D | intel_region_lmem.c | 25 mem->fake_mappable.size = resource_size(&mem->region); in init_fake_lmem_bar() 49 mem->region = (struct resource)DEFINE_RES_MEM(mem->remap_addr, in init_fake_lmem_bar() 63 mem->remap_addr, in release_fake_lmem_bar() 88 mem->io_start, in region_lmem_init() 145 if (!IS_ERR(mem)) { in intel_gt_setup_fake_lmem() 147 &mem->region); in intel_gt_setup_fake_lmem() 155 return mem; in intel_gt_setup_fake_lmem() 218 if (IS_ERR(mem)) in setup_lmem() 219 return mem; in setup_lmem() 227 &mem->io_start); in setup_lmem() [all …]
|
/linux/drivers/staging/media/atomisp/pci/runtime/isp_param/src/ |
A D | isp_param.c | 27 enum ia_css_isp_memories mem, in ia_css_isp_param_set_mem_init() argument 38 enum ia_css_isp_memories mem, in ia_css_isp_param_set_css_mem_init() argument 90 unsigned int pclass, mem; in ia_css_init_memory_interface() local 94 for (mem = 0; mem < IA_CSS_NUM_MEMORIES; mem++) { in ia_css_init_memory_interface() 97 isp_mem_if->params[pclass][mem].size = mem_params->params[pclass][mem].size; in ia_css_init_memory_interface() 111 unsigned int mem, pclass; in ia_css_isp_param_allocate_isp_parameters() local 114 for (mem = 0; mem < IA_CSS_NUM_MEMORIES; mem++) in ia_css_isp_param_allocate_isp_parameters() 154 unsigned int mem, pclass; in ia_css_isp_param_destroy_isp_parameters() local 156 for (mem = 0; mem < IA_CSS_NUM_MEMORIES; mem++) { in ia_css_isp_param_destroy_isp_parameters() 188 unsigned int mem; in ia_css_isp_param_copy_isp_mem_if_to_ddr() local [all …]
|
/linux/drivers/gpu/drm/i915/ |
A D | intel_memory_region.c | 106 mem = kzalloc(sizeof(*mem), GFP_KERNEL); in intel_memory_region_create() 107 if (!mem) in intel_memory_region_create() 114 mem->ops = ops; in intel_memory_region_create() 116 mem->avail = mem->total; in intel_memory_region_create() 130 return mem; in intel_memory_region_create() 133 kfree(mem); in intel_memory_region_create() 143 vsnprintf(mem->name, sizeof(mem->name), fmt, ap); in intel_memory_region_set_name() 153 mem->ops->release(mem); in __intel_memory_region_destroy() 156 kfree(mem); in __intel_memory_region_destroy() 163 return mem; in intel_memory_region_get() [all …]
|
A D | intel_region_ttm.c | 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() 84 struct ttm_device *bdev = &mem->i915->bdev; in intel_region_ttm_init() 89 resource_size(&mem->region), in intel_region_ttm_init() 90 mem->min_page_size, PAGE_SIZE); in intel_region_ttm_init() 112 intel_region_to_ttm_type(mem)); in intel_region_ttm_fini() 114 mem->region_private = NULL; in intel_region_ttm_fini() 132 if (mem->is_range_manager) { in intel_region_ttm_resource_to_st() [all …]
|
/linux/drivers/media/v4l2-core/ |
A D | videobuf-dma-contig.c | 41 mem->size = size; in __videobuf_dc_alloc() 42 mem->vaddr = dma_alloc_coherent(dev, mem->size, in __videobuf_dc_alloc() 58 dma_free_coherent(dev, mem->size, mem->vaddr, mem->dma_handle); in __videobuf_dc_free() 101 if (mem) { in videobuf_vm_close() 144 mem->size = 0; in videobuf_dma_contig_user_put() 228 BUG_ON(!mem); in __videobuf_to_vaddr() 240 BUG_ON(!mem); in __videobuf_iolock() 295 BUG_ON(!mem); in __videobuf_mmap_mapper() 318 mem->vaddr, mem->dma_handle); in __videobuf_mmap_mapper() 366 BUG_ON(!mem); in videobuf_to_dma_contig() [all …]
|
A D | videobuf-vmalloc.c | 89 if (mem) { in videobuf_vm_close() 149 mem, (long)sizeof(*mem)); in __videobuf_alloc_vb() 161 BUG_ON(!mem); in __videobuf_iolock() 170 if (!mem->vaddr) { in __videobuf_iolock() 229 mem = buf->priv; in __videobuf_mmap_mapper() 230 BUG_ON(!mem); in __videobuf_mmap_mapper() 235 if (!mem->vaddr) { in __videobuf_mmap_mapper() 263 mem = NULL; in __videobuf_mmap_mapper() 295 BUG_ON(!mem); in videobuf_to_vmalloc() 298 return mem->vaddr; in videobuf_to_vmalloc() [all …]
|
/linux/drivers/pci/endpoint/ |
A D | pci-epc-mem.c | 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() 96 mem->pages = pages; in pci_epc_multi_mem_init() 110 kfree(mem); in pci_epc_multi_mem_init() 149 kfree(mem); in pci_epc_mem_exit() 154 epc->mem = NULL; in pci_epc_mem_exit() 185 pageno = bitmap_find_free_region(mem->bitmap, mem->pages, in pci_epc_mem_alloc_addr() 218 phys_addr < (mem->window.phys_base + mem->window.size)) in pci_epc_get_matching_window() 219 return mem; in pci_epc_get_matching_window() [all …]
|
/linux/drivers/infiniband/sw/siw/ |
A D | siw_mem.c | 54 if (likely(mem && kref_get_unless_zero(&mem->ref))) { in siw_mem_id2obj() 56 return mem; in siw_mem_id2obj() 97 if (!mem) in siw_mr_add_mem() 114 kfree(mem); in siw_mr_add_mem() 118 mr->mem = mem; in siw_mr_add_mem() 128 struct siw_mem *mem = mr->mem, *found; in siw_mr_drop_mem() local 135 found = xa_erase(&mem->sdev->mem_xa, mem->stag >> 8); in siw_mr_drop_mem() 146 if (!mem->is_mw && mem->mem_obj) { in siw_free_mem() 152 kfree(mem); in siw_free_mem() 190 if (addr < mem->va || addr + len > mem->va + mem->len) { in siw_check_mem() [all …]
|
/linux/drivers/gpu/drm/amd/amdgpu/ |
A D | amdgpu_amdkfd_gpuvm.c | 88 uint64_t mem; in amdgpu_amdkfd_gpuvm_init_mem_limits() local 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() 1574 mem->va + bo_size * (1 + mem->aql_queue)); in amdgpu_amdkfd_gpuvm_free_memory_of_gpu() 1661 mem->va, in amdgpu_amdkfd_gpuvm_map_memory_to_gpu() 1662 mem->va + bo_size * (1 + mem->aql_queue), in amdgpu_amdkfd_gpuvm_map_memory_to_gpu() 1775 mem->va, in amdgpu_amdkfd_gpuvm_unmap_memory_from_gpu() 1776 mem->va + bo_size * (1 + mem->aql_queue), in amdgpu_amdkfd_gpuvm_unmap_memory_from_gpu() 1935 if (!*mem) in amdgpu_amdkfd_gpuvm_import_dmabuf() 2134 mem->resv_list.bo = mem->validate_list.bo; in validate_invalid_user_pages() [all …]
|
/linux/drivers/base/ |
A D | memory.c | 109 kfree(mem); in memory_block_release() 155 switch (mem->state) { in state_show() 186 zone = zone_for_pfn_range(mem->online_type, mem->nid, mem->group, in memory_block_online() 405 int nid = mem->nid; in valid_zones_show() 581 if (mem) in find_memory_block_by_id() 583 return mem; in find_memory_block_by_id() 652 if (mem) { in init_memory_block() 656 mem = kzalloc(sizeof(*mem), GFP_KERNEL); in init_memory_block() 657 if (!mem) in init_memory_block() 661 mem->state = state; in init_memory_block() [all …]
|
/linux/tools/perf/ |
A D | builtin-mem.c | 53 mem->operation = 0; in parse_record_events() 142 if (mem->phys_addr) in __cmd_record() 145 if (mem->data_page_size) in __cmd_record() 222 if (mem->phys_addr) { in dump_raw_samples() 271 .force = mem->force, in report_raw_events() 281 if (mem->cpu_list) { in report_raw_events() 294 if (mem->phys_addr) in report_raw_events() 326 if (mem->phys_addr) in get_sort_order() 341 if (mem->dump_raw) in report_events() 437 struct perf_mem mem = { in cmd_mem() local [all …]
|
/linux/drivers/spi/ |
A D | spi-mem.c | 105 u32 mode = mem->spi->mode; in spi_check_buswidth_req() 322 spi_mem_access_end(mem); in spi_mem_exec_op() 423 return mem->name; in spi_mem_get_name() 541 desc->mem = mem; in spi_mem_dirmap_create() 807 spi_mem_access_end(mem); in spi_mem_poll_status() 836 struct spi_mem *mem; in spi_mem_probe() local 838 mem = devm_kzalloc(&spi->dev, sizeof(*mem), GFP_KERNEL); in spi_mem_probe() 839 if (!mem) in spi_mem_probe() 842 mem->spi = spi; in spi_mem_probe() 845 mem->name = ctlr->mem_ops->get_name(mem); in spi_mem_probe() [all …]
|
/linux/drivers/firmware/efi/ |
A D | cper.c | 242 u32 row = mem->row; in cper_mem_err_location() 244 row |= cper_get_mem_extension(mem->validation_bits, mem->extended); in cper_mem_err_location() 251 mem->bit_pos); in cper_mem_err_location() 260 mem->target_id); in cper_mem_err_location() 292 cmem->node = mem->node; in cper_mem_err_pack() 293 cmem->card = mem->card; in cper_mem_err_pack() 294 cmem->module = mem->module; in cper_mem_err_pack() 295 cmem->bank = mem->bank; in cper_mem_err_pack() 296 cmem->device = mem->device; in cper_mem_err_pack() 297 cmem->row = mem->row; in cper_mem_err_pack() [all …]
|
/linux/drivers/gpu/drm/ttm/ |
A D | ttm_agp_backend.c | 46 struct agp_memory *mem; member 54 struct agp_memory *mem; in ttm_agp_bind() local 58 if (agp_be->mem) 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() 91 if (agp_be->mem) { in ttm_agp_unbind() 97 agp_be->mem = NULL; in ttm_agp_unbind() 117 if (agp_be->mem) in ttm_agp_destroy() [all …]
|
/linux/drivers/net/ipa/ |
A D | ipa_qmi.c | 288 const struct ipa_mem *mem; in init_modem_driver_req() local 302 if (mem->size) { in init_modem_driver_req() 327 if (mem->size) { in init_modem_driver_req() 340 if (mem->size) { in init_modem_driver_req() 343 ipa->mem_offset + mem->offset; in init_modem_driver_req() 351 if (mem->size) { in init_modem_driver_req() 359 if (mem->size) { in init_modem_driver_req() 367 if (mem->size) { in init_modem_driver_req() 373 if (mem->size) { in init_modem_driver_req() 381 if (mem->size) { in init_modem_driver_req() [all …]
|
A D | ipa_mem.c | 34 const struct ipa_mem *mem = &ipa->mem[i]; in ipa_mem_find() local 37 return mem; in ipa_mem_find() 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() 99 size = mem->size; in ipa_mem_setup() 101 if (mem) in ipa_mem_setup() 218 if (!mem->size && !mem->canary_count) { in ipa_mem_valid_one() 230 else if (mem->offset < mem->canary_count * sizeof(__le32)) in ipa_mem_valid_one() 288 const struct ipa_mem *mem = &ipa->mem[i]; in ipa_mem_size_valid() local 290 if (mem->offset + mem->size <= limit) in ipa_mem_size_valid() [all …]
|
/linux/drivers/char/hw_random/ |
A D | intel-rng.c | 164 return hwstatus_get(mem); in hwstatus_set() 197 hw_status = hwstatus_get(mem); in intel_rng_init() 215 hw_status = hwstatus_get(mem); in intel_rng_cleanup() 233 void __iomem *mem; member 321 if (intel_rng_hw->mem == NULL) in intel_init_hw_struct() 333 void __iomem *mem; in intel_rng_mod_init() local 374 iounmap(intel_rng_hw->mem); in intel_rng_mod_init() 382 if (!mem) in intel_rng_mod_init() 390 iounmap(mem); in intel_rng_mod_init() 399 iounmap(mem); in intel_rng_mod_init() [all …]
|
/linux/mm/ |
A D | cma_debug.c | 89 return mem; in cma_get_entry_from_list() 98 if (mem == NULL) in cma_free_mem() 102 cma_release(cma, mem->p, mem->n); in cma_free_mem() 103 count -= mem->n; in cma_free_mem() 104 kfree(mem); in cma_free_mem() 107 mem->p += count; in cma_free_mem() 136 mem = kzalloc(sizeof(*mem), GFP_KERNEL); in cma_alloc_mem() 137 if (!mem) in cma_alloc_mem() 142 kfree(mem); in cma_alloc_mem() 146 mem->p = p; in cma_alloc_mem() [all …]
|
/linux/arch/powerpc/include/asm/ |
A D | io-defs.h | 5 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) 31 (a, b, c), mem, a) 33 (a, b, c), mem, a) 35 (a, b, c), mem, a) 37 (a, b, c), mem, a) 39 (a, b, c), mem, a) 41 (a, b, c), mem, a) 57 (a, c, n), mem, a) 59 (d, s, n), mem, s) [all …]
|
/linux/include/linux/spi/ |
A D | spi-mem.h | 176 struct spi_mem *mem; member 208 mem->drvpriv = data; in spi_mem_set_drvdata() 220 return mem->drvpriv; in spi_mem_get_drvdata() 269 bool (*supports_op)(struct spi_mem *mem, 271 int (*exec_op)(struct spi_mem *mem, 280 int (*poll_status)(struct spi_mem *mem, 306 int (*probe)(struct spi_mem *mem); 307 int (*remove)(struct spi_mem *mem); 308 void (*shutdown)(struct spi_mem *mem); 362 int spi_mem_exec_op(struct spi_mem *mem, [all …]
|