Home
last modified time | relevance | path

Searched refs:dma_addr (Results 1 – 25 of 50) sorted by relevance

12

/arch/mips/include/asm/mach-loongson64/
Ddma-coherence.h43 dma_addr_t dma_addr) in plat_dma_addr_to_phys() argument
46 return dma_to_phys(dev, dma_addr); in plat_dma_addr_to_phys()
48 return (dma_addr > 0x8fffffff) ? dma_addr : (dma_addr & 0x0fffffff); in plat_dma_addr_to_phys()
50 return dma_addr & 0x7fffffff; in plat_dma_addr_to_phys()
54 static inline void plat_unmap_dma_mem(struct device *dev, dma_addr_t dma_addr, in plat_unmap_dma_mem() argument
/arch/s390/pci/
Dpci_dma.c100 unsigned long *dma_walk_cpu_trans(unsigned long *rto, dma_addr_t dma_addr) in dma_walk_cpu_trans() argument
105 rtx = calc_rtx(dma_addr); in dma_walk_cpu_trans()
110 sx = calc_sx(dma_addr); in dma_walk_cpu_trans()
115 px = calc_px(dma_addr); in dma_walk_cpu_trans()
135 dma_addr_t dma_addr, size_t size, int flags) in __dma_update_trans() argument
153 entry = dma_walk_cpu_trans(zdev->dma_table, dma_addr); in __dma_update_trans()
160 dma_addr += PAGE_SIZE; in __dma_update_trans()
168 dma_addr -= PAGE_SIZE; in __dma_update_trans()
169 entry = dma_walk_cpu_trans(zdev->dma_table, dma_addr); in __dma_update_trans()
180 static int __dma_purge_tlb(struct zpci_dev *zdev, dma_addr_t dma_addr, in __dma_purge_tlb() argument
[all …]
/arch/mips/include/asm/mach-jazz/
Ddma-coherence.h27 dma_addr_t dma_addr) in plat_dma_addr_to_phys() argument
29 return vdma_log2phys(dma_addr); in plat_dma_addr_to_phys()
32 static inline void plat_unmap_dma_mem(struct device *dev, dma_addr_t dma_addr, in plat_unmap_dma_mem() argument
35 vdma_free(dma_addr); in plat_unmap_dma_mem()
/arch/mips/include/asm/mach-rc32434/
Ddma_v.h42 static inline void rc32434_start_dma(struct dma_reg *ch, u32 dma_addr) in rc32434_start_dma() argument
45 __raw_writel(dma_addr, &ch->dmadptr); in rc32434_start_dma()
48 static inline void rc32434_chain_dma(struct dma_reg *ch, u32 dma_addr) in rc32434_chain_dma() argument
50 __raw_writel(dma_addr, &ch->dmandptr); in rc32434_chain_dma()
/arch/hexagon/kernel/
Ddma.c33 static inline void *dma_addr_to_virt(dma_addr_t dma_addr) in dma_addr_to_virt() argument
35 return phys_to_virt((unsigned long) dma_addr); in dma_addr_to_virt()
44 dma_addr_t *dma_addr, gfp_t flag, in hexagon_dma_alloc_coherent() argument
70 *dma_addr = (dma_addr_t) virt_to_phys(ret); in hexagon_dma_alloc_coherent()
72 *dma_addr = ~0; in hexagon_dma_alloc_coherent()
78 dma_addr_t dma_addr, unsigned long attrs) in hexagon_free_coherent() argument
197 static int hexagon_mapping_error(struct device *dev, dma_addr_t dma_addr) in hexagon_mapping_error() argument
199 return dma_addr == HEXAGON_MAPPING_ERROR; in hexagon_mapping_error()
/arch/mips/include/asm/mach-ip32/
Ddma-coherence.h55 dma_addr_t dma_addr) in plat_dma_addr_to_phys() argument
57 unsigned long addr = dma_addr & RAM_OFFSET_MASK; in plat_dma_addr_to_phys()
59 if (dma_addr >= 256*1024*1024) in plat_dma_addr_to_phys()
65 static inline void plat_unmap_dma_mem(struct device *dev, dma_addr_t dma_addr, in plat_unmap_dma_mem() argument
/arch/ia64/sn/pci/
Dpci_dma.c182 dma_addr_t dma_addr; in sn_dma_map_page() local
191 dma_addr = provider->dma_map_consistent(pdev, phys_addr, in sn_dma_map_page()
194 dma_addr = provider->dma_map(pdev, phys_addr, size, in sn_dma_map_page()
197 if (!dma_addr) { in sn_dma_map_page()
201 return dma_addr; in sn_dma_map_page()
216 static void sn_dma_unmap_page(struct device *dev, dma_addr_t dma_addr, in sn_dma_unmap_page() argument
225 provider->dma_unmap(pdev, dma_addr, dir); in sn_dma_unmap_page()
287 dma_addr_t dma_addr; in sn_dma_map_sg() local
290 dma_addr = provider->dma_map_consistent(pdev, in sn_dma_map_sg()
295 dma_addr = provider->dma_map(pdev, phys_addr, in sn_dma_map_sg()
[all …]
/arch/mips/bmips/
Ddma.c65 unsigned long plat_dma_addr_to_phys(struct device *dev, dma_addr_t dma_addr) in plat_dma_addr_to_phys() argument
70 if (dma_addr >= r->parent_addr && in plat_dma_addr_to_phys()
71 dma_addr < (r->parent_addr + r->size)) in plat_dma_addr_to_phys()
72 return dma_addr - r->parent_addr + r->child_addr; in plat_dma_addr_to_phys()
74 return dma_addr; in plat_dma_addr_to_phys()
/arch/x86/kernel/
Dpci-swiotlb.c42 void *vaddr, dma_addr_t dma_addr, in x86_swiotlb_free_coherent() argument
45 if (is_swiotlb_buffer(dma_to_phys(dev, dma_addr))) in x86_swiotlb_free_coherent()
46 swiotlb_free_coherent(dev, size, vaddr, dma_addr); in x86_swiotlb_free_coherent()
48 dma_generic_free_coherent(dev, size, vaddr, dma_addr, attrs); in x86_swiotlb_free_coherent()
Damd_gart_64.c265 static void gart_unmap_page(struct device *dev, dma_addr_t dma_addr, in gart_unmap_page() argument
273 if (dma_addr < iommu_bus_base + EMERGENCY_PAGES*PAGE_SIZE || in gart_unmap_page()
274 dma_addr >= iommu_bus_base + iommu_size) in gart_unmap_page()
277 iommu_page = (dma_addr - iommu_bus_base)>>PAGE_SHIFT; in gart_unmap_page()
278 npages = iommu_num_pages(dma_addr, size, PAGE_SIZE); in gart_unmap_page()
479 gart_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_addr, in gart_alloc_coherent() argument
498 *dma_addr = paddr; in gart_alloc_coherent()
503 return dma_generic_alloc_coherent(dev, size, dma_addr, flag, in gart_alloc_coherent()
512 dma_addr_t dma_addr, unsigned long attrs) in gart_free_coherent() argument
514 gart_unmap_page(dev, dma_addr, size, DMA_BIDIRECTIONAL, 0); in gart_free_coherent()
[all …]
Dpci-nommu.c94 static int nommu_mapping_error(struct device *dev, dma_addr_t dma_addr) in nommu_mapping_error() argument
96 return dma_addr == NOMMU_MAPPING_ERROR; in nommu_mapping_error()
/arch/arm/common/
Ddmabounce.c212 dma_addr_t dma_addr, const char *where) in find_safe_buffer_dev() argument
216 if (dma_mapping_error(dev, dma_addr)) { in find_safe_buffer_dev()
220 return find_safe_buffer(dev->archdata.dmabounce, dma_addr); in find_safe_buffer_dev()
223 static int needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size) in needs_bounce() argument
239 if ((dma_addr | (dma_addr + size - 1)) & ~mask) in needs_bounce()
243 return !!dev->archdata.dmabounce->needs_bounce(dev, dma_addr, size); in needs_bounce()
320 dma_addr_t dma_addr; in dmabounce_map_page() local
326 dma_addr = pfn_to_dma(dev, page_to_pfn(page)) + offset; in dmabounce_map_page()
328 ret = needs_bounce(dev, dma_addr, size); in dmabounce_map_page()
333 arm_dma_ops.sync_single_for_device(dev, dma_addr, size, dir); in dmabounce_map_page()
[all …]
/arch/mips/include/asm/mach-ath25/
Ddma-coherence.h46 plat_dma_addr_to_phys(struct device *dev, dma_addr_t dma_addr) in plat_dma_addr_to_phys() argument
48 return dma_addr - ath25_dev_offset(dev); in plat_dma_addr_to_phys()
52 plat_unmap_dma_mem(struct device *dev, dma_addr_t dma_addr, size_t size, in plat_unmap_dma_mem() argument
/arch/mips/include/asm/mach-generic/
Ddma-coherence.h27 dma_addr_t dma_addr) in plat_dma_addr_to_phys() argument
29 return dma_addr; in plat_dma_addr_to_phys()
32 static inline void plat_unmap_dma_mem(struct device *dev, dma_addr_t dma_addr, in plat_unmap_dma_mem() argument
/arch/mips/include/asm/mach-ip27/
Ddma-coherence.h38 dma_addr_t dma_addr) in plat_dma_addr_to_phys() argument
40 return dma_addr & ~(0xffUL << 56); in plat_dma_addr_to_phys()
43 static inline void plat_unmap_dma_mem(struct device *dev, dma_addr_t dma_addr, in plat_unmap_dma_mem() argument
/arch/mips/include/asm/mach-bmips/
Ddma-coherence.h27 dma_addr_t dma_addr);
29 static inline void plat_unmap_dma_mem(struct device *dev, dma_addr_t dma_addr, in plat_unmap_dma_mem() argument
/arch/alpha/kernel/
Dpci_iommu.c371 static void alpha_pci_unmap_page(struct device *dev, dma_addr_t dma_addr, in alpha_pci_unmap_page() argument
383 if (dma_addr >= __direct_map_base in alpha_pci_unmap_page()
384 && dma_addr < __direct_map_base + __direct_map_size) { in alpha_pci_unmap_page()
388 dma_addr, size, __builtin_return_address(0)); in alpha_pci_unmap_page()
393 if (dma_addr > 0xffffffff) { in alpha_pci_unmap_page()
395 dma_addr, size, __builtin_return_address(0)); in alpha_pci_unmap_page()
400 if (!arena || dma_addr < arena->dma_base) in alpha_pci_unmap_page()
403 dma_ofs = (dma_addr - arena->dma_base) >> PAGE_SHIFT; in alpha_pci_unmap_page()
407 dma_addr, arena->dma_base, arena->size); in alpha_pci_unmap_page()
412 npages = iommu_num_pages(dma_addr, size, PAGE_SIZE); in alpha_pci_unmap_page()
[all …]
/arch/unicore32/mm/
Ddma-swiotlb.c28 void *vaddr, dma_addr_t dma_addr, in unicore_swiotlb_free_coherent() argument
31 swiotlb_free_coherent(dev, size, vaddr, dma_addr); in unicore_swiotlb_free_coherent()
/arch/mips/include/asm/mach-cavium-octeon/
Ddma-coherence.h37 dma_addr_t dma_addr) in plat_dma_addr_to_phys() argument
43 static inline void plat_unmap_dma_mem(struct device *dev, dma_addr_t dma_addr, in plat_unmap_dma_mem() argument
/arch/mips/mm/
Ddma-default.c51 dma_addr_t dma_addr) in dma_addr_to_page() argument
54 plat_dma_addr_to_phys(dev, dma_addr) >> PAGE_SHIFT); in dma_addr_to_page()
179 void *cpu_addr, dma_addr_t dma_addr, size_t size, in mips_dma_mmap() argument
270 static void mips_dma_unmap_page(struct device *dev, dma_addr_t dma_addr, in mips_dma_unmap_page() argument
274 __dma_sync(dma_addr_to_page(dev, dma_addr), in mips_dma_unmap_page()
275 dma_addr & ~PAGE_MASK, size, direction); in mips_dma_unmap_page()
277 plat_unmap_dma_mem(dev, dma_addr, size, direction); in mips_dma_unmap_page()
376 static int mips_dma_mapping_error(struct device *dev, dma_addr_t dma_addr) in mips_dma_mapping_error() argument
/arch/ia64/kernel/
Dpci-swiotlb.c28 void *vaddr, dma_addr_t dma_addr, in ia64_swiotlb_free_coherent() argument
31 swiotlb_free_coherent(dev, size, vaddr, dma_addr); in ia64_swiotlb_free_coherent()
/arch/arm/mm/
Ddma-mapping.c183 static int arm_dma_mapping_error(struct device *dev, dma_addr_t dma_addr) in arm_dma_mapping_error() argument
185 return dma_addr == ARM_MAPPING_ERROR; in arm_dma_mapping_error()
211 void *cpu_addr, dma_addr_t dma_addr, size_t size,
845 void *cpu_addr, dma_addr_t dma_addr, size_t size, in __arm_dma_mmap() argument
851 unsigned long pfn = dma_to_pfn(dev, dma_addr); in __arm_dma_mmap()
871 void *cpu_addr, dma_addr_t dma_addr, size_t size, in arm_coherent_dma_mmap() argument
874 return __arm_dma_mmap(dev, vma, cpu_addr, dma_addr, size, attrs); in arm_coherent_dma_mmap()
878 void *cpu_addr, dma_addr_t dma_addr, size_t size, in arm_dma_mmap() argument
882 return __arm_dma_mmap(dev, vma, cpu_addr, dma_addr, size, attrs); in arm_dma_mmap()
1427 dma_addr_t dma_addr, iova; in __iommu_create_mapping() local
[all …]
Ddma-mapping-nommu.c70 void *cpu_addr, dma_addr_t dma_addr, in arm_nommu_dma_free() argument
76 ops->free(dev, size, cpu_addr, dma_addr, attrs); in arm_nommu_dma_free()
88 void *cpu_addr, dma_addr_t dma_addr, size_t size, in arm_nommu_dma_mmap() argument
96 return dma_common_mmap(dev, vma, cpu_addr, dma_addr, size); in arm_nommu_dma_mmap()
/arch/powerpc/kernel/
Diommu.c348 static bool iommu_free_check(struct iommu_table *tbl, dma_addr_t dma_addr, in iommu_free_check() argument
353 entry = dma_addr >> tbl->it_page_shift; in iommu_free_check()
361 printk(KERN_INFO "\tdma_addr = 0x%llx\n", (u64)dma_addr); in iommu_free_check()
395 static void __iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr, in __iommu_free() argument
402 entry = dma_addr >> tbl->it_page_shift; in __iommu_free()
407 if (!iommu_free_check(tbl, dma_addr, npages)) in __iommu_free()
417 static void iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr, in iommu_free() argument
420 __iommu_free(tbl, dma_addr, npages); in iommu_free()
435 dma_addr_t dma_next = 0, dma_addr; in ppc_iommu_map_sg() local
491 dma_addr = entry << tbl->it_page_shift; in ppc_iommu_map_sg()
[all …]
/arch/x86/include/asm/
Ddma-mapping.h38 dma_addr_t *dma_addr, gfp_t flag,
42 void *vaddr, dma_addr_t dma_addr,

12