/openbmc/linux/kernel/dma/ |
H A D | mapping.c | 32 dma_addr_t dma_handle; member 40 dma_free_attrs(dev, this->size, this->vaddr, this->dma_handle, in dmam_release() 50 this->dma_handle != match->dma_handle); in dmam_match() 66 dma_addr_t dma_handle) in dmam_free_coherent() argument 68 struct dma_devres match_data = { size, vaddr, dma_handle }; in dmam_free_coherent() 71 dma_free_coherent(dev, size, vaddr, dma_handle); in dmam_free_coherent() 89 void *dmam_alloc_attrs(struct device *dev, size_t size, dma_addr_t *dma_handle, in dmam_alloc_attrs() argument 99 vaddr = dma_alloc_attrs(dev, size, dma_handle, gfp, attrs); in dmam_alloc_attrs() 106 dr->dma_handle = *dma_handle; in dmam_alloc_attrs() 497 void *dma_alloc_attrs(struct device *dev, size_t size, dma_addr_t *dma_handle, in dma_alloc_attrs() argument [all …]
|
H A D | ops_helpers.c | 62 dma_addr_t *dma_handle, enum dma_data_direction dir, gfp_t gfp) in dma_common_alloc_pages() argument 73 *dma_handle = ops->map_page(dev, page, 0, size, dir, in dma_common_alloc_pages() 75 if (*dma_handle == DMA_MAPPING_ERROR) { in dma_common_alloc_pages() 85 dma_addr_t dma_handle, enum dma_data_direction dir) in dma_common_free_pages() argument 90 ops->unmap_page(dev, dma_handle, size, dir, in dma_common_free_pages()
|
H A D | direct.c | 172 dma_addr_t *dma_handle, gfp_t gfp) in dma_direct_alloc_from_pool() argument 185 *dma_handle = phys_to_dma_direct(dev, page_to_phys(page)); in dma_direct_alloc_from_pool() 190 dma_addr_t *dma_handle, gfp_t gfp) in dma_direct_alloc_no_mapping() argument 203 *dma_handle = phys_to_dma_direct(dev, page_to_phys(page)); in dma_direct_alloc_no_mapping() 208 dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs) in dma_direct_alloc() argument 220 return dma_direct_alloc_no_mapping(dev, size, dma_handle, gfp); in dma_direct_alloc() 231 return arch_dma_alloc(dev, size, dma_handle, gfp, in dma_direct_alloc() 240 dma_handle); in dma_direct_alloc() 251 dma_handle, gfp); in dma_direct_alloc() 264 return dma_direct_alloc_from_pool(dev, size, dma_handle, gfp); in dma_direct_alloc() [all …]
|
H A D | debug.h | 43 dma_addr_t dma_handle, size_t size, 47 dma_addr_t dma_handle, 107 dma_addr_t dma_handle, in debug_dma_sync_single_for_cpu() argument 113 dma_addr_t dma_handle, in debug_dma_sync_single_for_device() argument
|
H A D | coherent.c | 143 ssize_t size, dma_addr_t *dma_handle) in __dma_alloc_from_coherent() argument 162 *dma_handle = dma_get_device_base(dev, mem) + in __dma_alloc_from_coherent() 188 dma_addr_t *dma_handle, void **ret) in dma_alloc_from_dev_coherent() argument 195 *ret = __dma_alloc_from_coherent(dev, mem, size, dma_handle); in dma_alloc_from_dev_coherent() 283 dma_addr_t *dma_handle) in dma_alloc_from_global_coherent() argument 289 dma_handle); in dma_alloc_from_global_coherent()
|
/openbmc/linux/drivers/xen/ |
H A D | grant-dma-ops.c | 79 dma_addr_t *dma_handle, gfp_t gfp, in xen_grant_dma_alloc() argument 111 *dma_handle = grant_to_dma(grant); in xen_grant_dma_alloc() 117 dma_addr_t dma_handle, unsigned long attrs) in xen_grant_dma_free() argument 130 grant = dma_to_grant(dma_handle); in xen_grant_dma_free() 146 dma_addr_t *dma_handle, in xen_grant_dma_alloc_pages() argument 152 vaddr = xen_grant_dma_alloc(dev, size, dma_handle, gfp, 0); in xen_grant_dma_alloc_pages() 160 struct page *vaddr, dma_addr_t dma_handle, in xen_grant_dma_free_pages() argument 163 xen_grant_dma_free(dev, size, page_to_virt(vaddr), dma_handle, 0); in xen_grant_dma_free_pages() 176 dma_addr_t dma_handle; in xen_grant_dma_map_page() local 197 dma_handle = grant_to_dma(grant) + dma_offset; in xen_grant_dma_map_page() [all …]
|
H A D | swiotlb-xen.c | 118 dma_addr_t dma_handle; in xen_swiotlb_fixup() local 129 dma_bits, &dma_handle); in xen_swiotlb_fixup() 141 dma_addr_t *dma_handle, gfp_t flags, unsigned long attrs) in xen_swiotlb_alloc_coherent() argument 156 *dma_handle = xen_phys_to_dma(dev, phys); in xen_swiotlb_alloc_coherent() 157 if (*dma_handle + size - 1 > dma_mask || in xen_swiotlb_alloc_coherent() 160 dma_handle) != 0) in xen_swiotlb_alloc_coherent() 175 dma_addr_t dma_handle, unsigned long attrs) in xen_swiotlb_free_coherent() argument 183 if (WARN_ON_ONCE(dma_handle + size - 1 > dev->coherent_dma_mask) || in xen_swiotlb_free_coherent()
|
/openbmc/linux/include/linux/ |
H A D | dma-mapping.h | 128 void *dma_alloc_attrs(struct device *dev, size_t size, dma_addr_t *dma_handle, 131 dma_addr_t dma_handle, unsigned long attrs); 132 void *dmam_alloc_attrs(struct device *dev, size_t size, dma_addr_t *dma_handle, 135 dma_addr_t dma_handle); 218 dma_addr_t *dma_handle, gfp_t flag, unsigned long attrs) in dma_alloc_attrs() argument 223 dma_addr_t dma_handle, unsigned long attrs) in dma_free_attrs() argument 227 dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs) in dmam_alloc_attrs() argument 232 void *vaddr, dma_addr_t dma_handle) in dmam_free_coherent() argument 309 dma_addr_t *dma_handle, enum dma_data_direction dir, gfp_t gfp); 311 dma_addr_t dma_handle, enum dma_data_direction dir); [all …]
|
H A D | dma-map-ops.h | 27 dma_addr_t *dma_handle, gfp_t gfp, 30 dma_addr_t dma_handle, unsigned long attrs); 32 dma_addr_t *dma_handle, enum dma_data_direction dir, 35 dma_addr_t dma_handle, enum dma_data_direction dir); 51 void (*unmap_page)(struct device *dev, dma_addr_t dma_handle, 66 void (*unmap_resource)(struct device *dev, dma_addr_t dma_handle, 69 void (*sync_single_for_cpu)(struct device *dev, dma_addr_t dma_handle, 72 dma_addr_t dma_handle, size_t size, 177 dma_addr_t *dma_handle, void **ret); 196 dma_addr_t *dma_handle); [all …]
|
/openbmc/linux/arch/powerpc/kernel/ |
H A D | dma-iommu.c | 27 bool arch_dma_unmap_page_direct(struct device *dev, dma_addr_t dma_handle) in arch_dma_unmap_page_direct() argument 32 return is_direct_handle(dev, dma_handle); in arch_dma_unmap_page_direct() 79 dma_addr_t *dma_handle, gfp_t flag, in dma_iommu_alloc_coherent() argument 83 dma_handle, dev->coherent_dma_mask, flag, in dma_iommu_alloc_coherent() 88 void *vaddr, dma_addr_t dma_handle, in dma_iommu_free_coherent() argument 91 iommu_free_coherent(get_iommu_table_base(dev), size, vaddr, dma_handle); in dma_iommu_free_coherent() 109 static void dma_iommu_unmap_page(struct device *dev, dma_addr_t dma_handle, in dma_iommu_unmap_page() argument 113 iommu_unmap_page(get_iommu_table_base(dev), dma_handle, size, direction, in dma_iommu_unmap_page()
|
H A D | iommu.c | 627 dma_addr_t dma_handle = sg->dma_address; in ppc_iommu_unmap_sg() local 631 npages = iommu_num_pages(dma_handle, sg->dma_length, in ppc_iommu_unmap_sg() 633 __iommu_free(tbl, dma_handle, npages); in ppc_iommu_unmap_sg() 857 dma_addr_t dma_handle = DMA_MAPPING_ERROR; in iommu_map_page() local 874 dma_handle = iommu_alloc(dev, tbl, vaddr, npages, direction, in iommu_map_page() 877 if (dma_handle == DMA_MAPPING_ERROR) { in iommu_map_page() 885 dma_handle |= (uaddr & ~IOMMU_PAGE_MASK(tbl)); in iommu_map_page() 888 return dma_handle; in iommu_map_page() 891 void iommu_unmap_page(struct iommu_table *tbl, dma_addr_t dma_handle, in iommu_unmap_page() argument 900 npages = iommu_num_pages(dma_handle, size, in iommu_unmap_page() [all …]
|
/openbmc/linux/sound/pci/asihpi/ |
H A D | hpios.c | 40 dma_alloc_coherent(&pdev->dev, size, &p_mem_area->dma_handle, in hpios_locked_mem_alloc() 45 size, (unsigned int)p_mem_area->dma_handle, in hpios_locked_mem_alloc() 62 p_mem_area->vaddr, p_mem_area->dma_handle); in hpios_locked_mem_free() 65 (unsigned int)p_mem_area->dma_handle, in hpios_locked_mem_free()
|
/openbmc/linux/drivers/net/ethernet/broadcom/bnxt/ |
H A D | bnxt_hwrm.c | 64 dma_addr_t dma_handle; in __hwrm_req_init() local 71 &dma_handle); in __hwrm_req_init() 81 ctx->dma_handle = dma_handle; in __hwrm_req_init() 90 ctx->req->resp_addr = cpu_to_le64(dma_handle + BNXT_HWRM_RESP_OFFSET); in __hwrm_req_init() 221 ctx->req->resp_addr = cpu_to_le64(ctx->dma_handle + in hwrm_req_replace() 301 dma_addr_t dma_handle = ctx->dma_handle; /* save before invalidate */ in __hwrm_ctx_drop() local 312 if (dma_handle) in __hwrm_ctx_drop() 313 dma_pool_free(bp->hwrm_dma_pool, addr, dma_handle); in __hwrm_ctx_drop() 517 short_input.req_addr = cpu_to_le64(ctx->dma_handle); in __hwrm_send() 776 hwrm_req_dma_slice(struct bnxt *bp, void *req, u32 size, dma_addr_t *dma_handle) in hwrm_req_dma_slice() argument [all …]
|
/openbmc/linux/drivers/media/v4l2-core/ |
H A D | videobuf-dma-contig.c | 26 dma_addr_t dma_handle; member 42 mem->vaddr = dma_alloc_coherent(dev, mem->size, &mem->dma_handle, in __videobuf_dc_alloc() 57 dma_free_coherent(dev, mem->size, mem->vaddr, mem->dma_handle); in __videobuf_dc_free() 142 mem->dma_handle = 0; in videobuf_dma_contig_user_put() 190 mem->dma_handle = (this_pfn << PAGE_SHIFT) + offset; in videobuf_dma_contig_user_get() 306 retval = dma_mmap_coherent(q->dev, vma, mem->vaddr, mem->dma_handle, in __videobuf_mmap_mapper() 312 mem->vaddr, mem->dma_handle); in __videobuf_mmap_mapper() 363 return mem->dma_handle; in videobuf_to_dma_contig()
|
/openbmc/linux/arch/sh/mm/ |
H A D | consistent.c | 41 dma_addr_t dma_handle; in platform_resource_setup_memory() local 54 buf = dma_alloc_coherent(&pdev->dev, memsize, &dma_handle, GFP_KERNEL); in platform_resource_setup_memory() 61 r->start = dma_handle; in platform_resource_setup_memory()
|
/openbmc/linux/arch/m68k/kernel/ |
H A D | dma.c | 37 void *arch_dma_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle, in arch_dma_alloc() argument 48 *dma_handle = virt_to_phys(ret); in arch_dma_alloc() 54 dma_addr_t dma_handle, unsigned long attrs) in arch_dma_free() argument
|
/openbmc/linux/drivers/scsi/aic94xx/ |
H A D | aic94xx_hwi.c | 222 &seq->next_scb.dma_handle); in asd_init_scbs() 355 eb->bus_addr = cpu_to_le64(((u64) edb->dma_handle)); in asd_assign_edbs2escbs() 502 dma_addr_t dma_handle; in asd_extend_devctx() local 524 dma_handle = asd_ha->hw_prof.ddb_ext->dma_handle; in asd_extend_devctx() 525 dma_addr = ALIGN((unsigned long) dma_handle, ASD_DDB_SIZE); in asd_extend_devctx() 527 dma_handle = (dma_addr_t) dma_addr; in asd_extend_devctx() 528 asd_write_reg_addr(asd_ha, DEVCTXBASE, dma_handle); in asd_extend_devctx() 540 dma_addr_t dma_handle; in asd_extend_cmdctx() local 560 dma_handle = asd_ha->hw_prof.scb_ext->dma_handle; in asd_extend_cmdctx() 561 dma_addr = ALIGN((unsigned long) dma_handle, ASD_SCB_SIZE); in asd_extend_cmdctx() [all …]
|
/openbmc/linux/drivers/media/common/saa7146/ |
H A D | saa7146_core.c | 404 &dev->d_rps0.dma_handle, in saa7146_init_one() 410 &dev->d_rps1.dma_handle, in saa7146_init_one() 416 &dev->d_i2c.dma_handle, GFP_KERNEL); in saa7146_init_one() 465 dev->d_i2c.dma_handle); in saa7146_init_one() 468 dev->d_rps1.dma_handle); in saa7146_init_one() 471 dev->d_rps0.dma_handle); in saa7146_init_one() 493 { dev->d_i2c.cpu_addr, dev->d_i2c.dma_handle }, in saa7146_remove_one() 494 { dev->d_rps1.cpu_addr, dev->d_rps1.dma_handle }, in saa7146_remove_one() 495 { dev->d_rps0.cpu_addr, dev->d_rps0.dma_handle }, in saa7146_remove_one()
|
/openbmc/linux/drivers/scsi/ |
H A D | a2091.c | 66 scsi_pointer->dma_handle = addr; in dma_setup() 71 dma_unmap_single(hdata->dev, scsi_pointer->dma_handle, in dma_setup() 74 scsi_pointer->dma_handle = (dma_addr_t) NULL; in dma_setup() 111 scsi_pointer->dma_handle = addr; in dma_setup() 168 dma_unmap_single(hdata->dev, scsi_pointer->dma_handle, in dma_stop()
|
H A D | a3000.c | 71 scsi_pointer->dma_handle = addr; in dma_setup() 84 dma_unmap_single(hdata->dev, scsi_pointer->dma_handle, in dma_setup() 95 scsi_pointer->dma_handle = (dma_addr_t) NULL; in dma_setup() 113 scsi_pointer->dma_handle = addr; in dma_setup() 179 dma_unmap_single(hdata->dev, scsi_pointer->dma_handle, in dma_stop()
|
H A D | gvp11.c | 73 scsi_pointer->dma_handle = addr; in dma_setup() 78 dma_unmap_single(hdata->dev, scsi_pointer->dma_handle, in dma_setup() 81 scsi_pointer->dma_handle = (dma_addr_t) NULL; in dma_setup() 128 dma_unmap_single(hdata->dev, scsi_pointer->dma_handle, in dma_setup() 159 scsi_pointer->dma_handle = addr; in dma_setup() 200 dma_unmap_single(hdata->dev, scsi_pointer->dma_handle, in dma_stop()
|
/openbmc/linux/drivers/crypto/marvell/cesa/ |
H A D | tdma.c | 195 dma_addr_t dma_handle; in mv_cesa_dma_add_desc() local 198 &dma_handle); in mv_cesa_dma_add_desc() 202 new_tdma->cur_dma = dma_handle; in mv_cesa_dma_add_desc() 204 chain->last->next_dma = cpu_to_le32(dma_handle); in mv_cesa_dma_add_desc() 256 dma_addr_t dma_handle; in mv_cesa_dma_add_op() local 263 op = dma_pool_alloc(cesa_dev->dma->op_pool, flags, &dma_handle); in mv_cesa_dma_add_op() 274 tdma->src = cpu_to_le32(dma_handle); in mv_cesa_dma_add_op()
|
/openbmc/linux/drivers/net/ethernet/rocker/ |
H A D | rocker_main.c | 158 dma_addr_t dma_handle, const unsigned char *buf, in rocker_dma_test_one() argument 192 dma_addr_t dma_handle; in rocker_dma_test_offset() local 203 dma_handle = dma_map_single(&pdev->dev, buf, ROCKER_TEST_DMA_BUF_SIZE, in rocker_dma_test_offset() 205 if (dma_mapping_error(&pdev->dev, dma_handle)) { in rocker_dma_test_offset() 210 rocker_write64(rocker, TEST_DMA_ADDR, dma_handle); in rocker_dma_test_offset() 215 dma_handle, buf, expect, in rocker_dma_test_offset() 222 dma_handle, buf, expect, in rocker_dma_test_offset() 231 dma_handle, buf, expect, in rocker_dma_test_offset() 237 dma_unmap_single(&pdev->dev, dma_handle, ROCKER_TEST_DMA_BUF_SIZE, in rocker_dma_test_offset() 500 dma_addr_t dma_handle; in rocker_dma_ring_bufs_alloc() local [all …]
|
/openbmc/linux/drivers/s390/net/ |
H A D | ism_drv.c | 180 dma_addr_t dma_handle; in register_sba() local 183 sba = dma_alloc_coherent(&ism->pdev->dev, PAGE_SIZE, &dma_handle, in register_sba() 191 cmd.request.sba = dma_handle; in register_sba() 194 dma_free_coherent(&ism->pdev->dev, PAGE_SIZE, sba, dma_handle); in register_sba() 199 ism->sba_dma_addr = dma_handle; in register_sba() 207 dma_addr_t dma_handle; in register_ieq() local 210 ieq = dma_alloc_coherent(&ism->pdev->dev, PAGE_SIZE, &dma_handle, in register_ieq() 218 cmd.request.ieq = dma_handle; in register_ieq() 222 dma_free_coherent(&ism->pdev->dev, PAGE_SIZE, ieq, dma_handle); in register_ieq() 228 ism->ieq_dma_addr = dma_handle; in register_ieq()
|
/openbmc/linux/drivers/tty/ |
H A D | goldfish.c | 81 dma_addr_t dma_handle; in goldfish_tty_rw() local 102 dma_handle = dma_map_single(qtty->dev, (void *)addr, in goldfish_tty_rw() 105 if (dma_mapping_error(qtty->dev, dma_handle)) { in goldfish_tty_rw() 109 do_rw_io(qtty, dma_handle, avail, is_write); in goldfish_tty_rw() 115 dma_unmap_single(qtty->dev, dma_handle, avail, dma_dir); in goldfish_tty_rw()
|