Home
last modified time | relevance | path

Searched refs:dma_handle (Results 1 – 25 of 28) sorted by relevance

12

/arch/sh/kernel/
Ddma-coherent.c12 void *arch_dma_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle, in arch_dma_alloc() argument
39 *dma_handle = virt_to_phys(ret); in arch_dma_alloc()
41 *dma_handle -= PFN_PHYS(dev->dma_pfn_offset); in arch_dma_alloc()
47 dma_addr_t dma_handle, unsigned long attrs) in arch_dma_free() argument
50 unsigned long pfn = (dma_handle >> PAGE_SHIFT); in arch_dma_free()
/arch/x86/include/asm/xen/
Dpage-coherent.h9 dma_addr_t *dma_handle, gfp_t flags, in xen_alloc_coherent_pages() argument
13 *dma_handle = virt_to_phys(vstart); in xen_alloc_coherent_pages()
18 void *cpu_addr, dma_addr_t dma_handle, in xen_free_coherent_pages() argument
/arch/powerpc/kernel/
Ddma-iommu.c39 dma_addr_t *dma_handle, gfp_t flag, in dma_iommu_alloc_coherent() argument
43 return dma_direct_alloc(dev, size, dma_handle, flag, attrs); in dma_iommu_alloc_coherent()
45 dma_handle, dev->coherent_dma_mask, flag, in dma_iommu_alloc_coherent()
50 void *vaddr, dma_addr_t dma_handle, in dma_iommu_free_coherent() argument
54 dma_direct_free(dev, size, vaddr, dma_handle, attrs); in dma_iommu_free_coherent()
57 dma_handle); in dma_iommu_free_coherent()
78 static void dma_iommu_unmap_page(struct device *dev, dma_addr_t dma_handle, in dma_iommu_unmap_page() argument
83 iommu_unmap_page(get_iommu_table_base(dev), dma_handle, size, in dma_iommu_unmap_page()
86 dma_direct_unmap_page(dev, dma_handle, size, direction, attrs); in dma_iommu_unmap_page()
Diommu.c588 dma_addr_t dma_handle = sg->dma_address; in ppc_iommu_unmap_sg() local
592 npages = iommu_num_pages(dma_handle, sg->dma_length, in ppc_iommu_unmap_sg()
594 __iommu_free(tbl, dma_handle, npages); in ppc_iommu_unmap_sg()
810 dma_addr_t dma_handle = DMA_MAPPING_ERROR; in iommu_map_page() local
827 dma_handle = iommu_alloc(dev, tbl, vaddr, npages, direction, in iommu_map_page()
830 if (dma_handle == DMA_MAPPING_ERROR) { in iommu_map_page()
838 dma_handle |= (uaddr & ~IOMMU_PAGE_MASK(tbl)); in iommu_map_page()
841 return dma_handle; in iommu_map_page()
844 void iommu_unmap_page(struct iommu_table *tbl, dma_addr_t dma_handle, in iommu_unmap_page() argument
853 npages = iommu_num_pages(dma_handle, size, in iommu_unmap_page()
[all …]
/arch/sh/mm/
Dconsistent.c41 dma_addr_t dma_handle; in platform_resource_setup_memory() local
55 buf = dma_alloc_coherent(&pdev->dev, memsize, &dma_handle, GFP_KERNEL); in platform_resource_setup_memory()
64 r->start = dma_handle; in platform_resource_setup_memory()
/arch/m68k/kernel/
Ddma.c40 void *arch_dma_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle, in arch_dma_alloc() argument
51 *dma_handle = virt_to_phys(ret); in arch_dma_alloc()
57 dma_addr_t dma_handle, unsigned long attrs) in arch_dma_free() argument
/arch/ia64/kernel/
Ddma-mapping.c12 dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs) in arch_dma_alloc() argument
14 return dma_direct_alloc_pages(dev, size, dma_handle, gfp, attrs); in arch_dma_alloc()
/arch/openrisc/kernel/
Ddma.c87 arch_dma_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle, in arch_dma_alloc() argument
98 *dma_handle = __pa(page); in arch_dma_alloc()
117 dma_addr_t dma_handle, unsigned long attrs) in arch_dma_free() argument
/arch/mips/jazz/
Djazzdma.c564 dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs) in jazz_dma_alloc() argument
568 ret = dma_direct_alloc_pages(dev, size, dma_handle, gfp, attrs); in jazz_dma_alloc()
572 *dma_handle = vdma_alloc(virt_to_phys(ret), size); in jazz_dma_alloc()
573 if (*dma_handle == DMA_MAPPING_ERROR) { in jazz_dma_alloc()
574 dma_direct_free_pages(dev, size, ret, *dma_handle, attrs); in jazz_dma_alloc()
582 dma_addr_t dma_handle, unsigned long attrs) in jazz_dma_free() argument
584 vdma_free(dma_handle); in jazz_dma_free()
585 dma_direct_free_pages(dev, size, vaddr, dma_handle, attrs); in jazz_dma_free()
/arch/arm/xen/
Dmm.c121 dma_addr_t *dma_handle) in xen_create_contiguous_region() argument
127 *dma_handle = pstart; in xen_create_contiguous_region()
/arch/xtensa/kernel/
Dpci-dma.c186 dma_addr_t dma_handle, unsigned long attrs) in arch_dma_free() argument
197 page = pfn_to_page(PHYS_PFN(dma_to_phys(dev, dma_handle))); in arch_dma_free()
/arch/powerpc/include/asm/
Diommu.h264 size_t size, dma_addr_t *dma_handle,
267 void *vaddr, dma_addr_t dma_handle);
273 extern void iommu_unmap_page(struct iommu_table *tbl, dma_addr_t dma_handle,
/arch/parisc/kernel/
Dpci-dma.c398 dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs) in arch_dma_alloc() argument
414 *dma_handle = (dma_addr_t) paddr; in arch_dma_alloc()
428 dma_addr_t dma_handle, unsigned long attrs) in arch_dma_free() argument
439 free_pages((unsigned long)__va(dma_handle), order); in arch_dma_free()
/arch/arm/mm/
Ddma-mapping-nommu.c34 dma_addr_t *dma_handle, gfp_t gfp, in arm_nommu_dma_alloc() argument
38 void *ret = dma_alloc_from_global_coherent(dev, size, dma_handle); in arm_nommu_dma_alloc()
/arch/s390/pci/
Dpci_dma.c398 dma_addr_t *dma_handle, gfp_t flag, in s390_dma_alloc() argument
419 if (dma_handle) in s390_dma_alloc()
420 *dma_handle = map; in s390_dma_alloc()
425 void *pa, dma_addr_t dma_handle, in s390_dma_free() argument
432 s390_dma_unmap_pages(dev, dma_handle, size, DMA_BIDIRECTIONAL, 0); in s390_dma_free()
/arch/sparc/kernel/
Diommu.c628 dma_addr_t dma_handle = sg->dma_address; in dma_4u_unmap_sg() local
636 npages = iommu_num_pages(dma_handle, len, IO_PAGE_SIZE); in dma_4u_unmap_sg()
638 entry = ((dma_handle - iommu->tbl.table_map_base) in dma_4u_unmap_sg()
642 dma_handle &= IO_PAGE_MASK; in dma_4u_unmap_sg()
644 strbuf_flush(strbuf, iommu, dma_handle, ctx, in dma_4u_unmap_sg()
650 iommu_tbl_range_free(&iommu->tbl, dma_handle, npages, in dma_4u_unmap_sg()
Dioport.c318 void *arch_dma_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle, in arch_dma_alloc() argument
340 *dma_handle = virt_to_phys(va); in arch_dma_alloc()
Dpci_sun4v.c648 dma_addr_t dma_handle = sg->dma_address; in dma_4v_unmap_sg() local
656 npages = iommu_num_pages(dma_handle, len, IO_PAGE_SIZE); in dma_4v_unmap_sg()
658 if (dma_handle <= DMA_BIT_MASK(32)) { in dma_4v_unmap_sg()
665 entry = ((dma_handle - tbl->table_map_base) >> shift); in dma_4v_unmap_sg()
666 dma_4v_iommu_demap(dev, devhandle, dma_handle, iotsb_num, in dma_4v_unmap_sg()
668 iommu_tbl_range_free(tbl, dma_handle, npages, in dma_4v_unmap_sg()
/arch/powerpc/platforms/pseries/
Dibmebus.c66 dma_addr_t *dma_handle, in ibmebus_alloc_coherent() argument
73 *dma_handle = (dma_addr_t)mem; in ibmebus_alloc_coherent()
80 dma_addr_t dma_handle, in ibmebus_free_coherent() argument
Dvio.c480 dma_addr_t *dma_handle, gfp_t flag, in vio_dma_iommu_alloc_coherent() argument
492 dma_handle, dev->coherent_dma_mask, flag, in vio_dma_iommu_alloc_coherent()
503 void *vaddr, dma_addr_t dma_handle, in vio_dma_iommu_free_coherent() argument
508 iommu_free_coherent(get_iommu_table_base(dev), size, vaddr, dma_handle); in vio_dma_iommu_free_coherent()
536 static void vio_dma_iommu_unmap_page(struct device *dev, dma_addr_t dma_handle, in vio_dma_iommu_unmap_page() argument
544 iommu_unmap_page(tbl, dma_handle, size, direction, attrs); in vio_dma_iommu_unmap_page()
/arch/powerpc/platforms/ps3/
Dsystem-bus.c508 dma_addr_t *dma_handle, gfp_t flag, in ps3_alloc_coherent() argument
525 result = ps3_dma_map(dev->d_region, virt_addr, size, dma_handle, in ps3_alloc_coherent()
541 dma_handle = NULL; in ps3_alloc_coherent()
546 dma_addr_t dma_handle, unsigned long attrs) in ps3_free_coherent() argument
550 ps3_dma_unmap(dev->d_region, dma_handle, size); in ps3_free_coherent()
/arch/c6x/mm/
Ddma-coherent.c103 dma_addr_t dma_handle, unsigned long attrs) in arch_dma_free() argument
/arch/sparc/mm/
Dio-unit.c215 dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs) in iounit_alloc() argument
234 *dma_handle = addr; in iounit_alloc()
Diommu.c308 dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs) in sbus_iommu_alloc() argument
383 *dma_handle = iommu->start + (ioptex << PAGE_SHIFT); in sbus_iommu_alloc()
/arch/ia64/hp/common/
Dsba_iommu.c1111 sba_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, in sba_alloc_coherent() argument
1131 *dma_handle = page_to_phys(page); in sba_alloc_coherent()
1138 if (likely((*dma_handle & ~dev->coherent_dma_mask) == 0)) { in sba_alloc_coherent()
1140 dev->coherent_dma_mask, *dma_handle); in sba_alloc_coherent()
1150 *dma_handle = sba_map_page(&ioc->sac_only_dev->dev, page, 0, size, in sba_alloc_coherent()
1152 if (dma_mapping_error(dev, *dma_handle)) in sba_alloc_coherent()
1168 dma_addr_t dma_handle, unsigned long attrs) in sba_free_coherent() argument
1170 sba_unmap_page(dev, dma_handle, size, 0, 0); in sba_free_coherent()

12