/arch/mips/sgi-ip32/ |
D | ip32-dma.c | 23 dma_addr_t dma_addr = paddr & RAM_OFFSET_MASK; in __phys_to_dma() local 26 dma_addr += CRIME_HI_MEM_BASE; in __phys_to_dma() 27 return dma_addr; in __phys_to_dma() 30 phys_addr_t __dma_to_phys(struct device *dev, dma_addr_t dma_addr) in __dma_to_phys() argument 32 phys_addr_t paddr = dma_addr & RAM_OFFSET_MASK; in __dma_to_phys() 34 if (dma_addr >= 256*1024*1024) in __dma_to_phys()
|
/arch/s390/pci/ |
D | pci_dma.c | 99 unsigned long *dma_walk_cpu_trans(unsigned long *rto, dma_addr_t dma_addr) in dma_walk_cpu_trans() argument 104 rtx = calc_rtx(dma_addr); in dma_walk_cpu_trans() 109 sx = calc_sx(dma_addr); in dma_walk_cpu_trans() 114 px = calc_px(dma_addr); in dma_walk_cpu_trans() 134 dma_addr_t dma_addr, size_t size, int flags) in __dma_update_trans() argument 152 entry = dma_walk_cpu_trans(zdev->dma_table, dma_addr); in __dma_update_trans() 159 dma_addr += PAGE_SIZE; in __dma_update_trans() 167 dma_addr -= PAGE_SIZE; in __dma_update_trans() 168 entry = dma_walk_cpu_trans(zdev->dma_table, dma_addr); in __dma_update_trans() 179 static int __dma_purge_tlb(struct zpci_dev *zdev, dma_addr_t dma_addr, in __dma_purge_tlb() argument [all …]
|
/arch/mips/loongson64/lemote-2f/ |
D | dma.c | 9 phys_addr_t __dma_to_phys(struct device *dev, dma_addr_t dma_addr) in __dma_to_phys() argument 11 if (dma_addr > 0x8fffffff) in __dma_to_phys() 12 return dma_addr; in __dma_to_phys() 13 return dma_addr & 0x0fffffff; in __dma_to_phys()
|
/arch/mips/include/asm/mach-rc32434/ |
D | dma_v.h | 42 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/ |
D | dma.c | 19 void *arch_dma_alloc(struct device *dev, size_t size, dma_addr_t *dma_addr, in arch_dma_alloc() argument 45 *dma_addr = (dma_addr_t) virt_to_phys(ret); in arch_dma_alloc() 47 *dma_addr = ~0; in arch_dma_alloc() 53 dma_addr_t dma_addr, unsigned long attrs) in arch_dma_free() argument
|
/arch/mips/bmips/ |
D | dma.c | 55 phys_addr_t __dma_to_phys(struct device *dev, dma_addr_t dma_addr) in __dma_to_phys() argument 60 if (dma_addr >= r->parent_addr && in __dma_to_phys() 61 dma_addr < (r->parent_addr + r->size)) in __dma_to_phys() 62 return dma_addr - r->parent_addr + r->child_addr; in __dma_to_phys() 64 return dma_addr; in __dma_to_phys()
|
/arch/ia64/kernel/ |
D | dma-mapping.c | 18 dma_addr_t dma_addr, unsigned long attrs) in arch_dma_free() argument 20 dma_direct_free_pages(dev, size, cpu_addr, dma_addr, attrs); in arch_dma_free() 24 dma_addr_t dma_addr) in arch_dma_coherent_to_pfn() argument
|
/arch/arm/common/ |
D | dmabounce.c | 209 dma_addr_t dma_addr, const char *where) in find_safe_buffer_dev() argument 213 if (dma_mapping_error(dev, dma_addr)) { in find_safe_buffer_dev() 217 return find_safe_buffer(dev->archdata.dmabounce, dma_addr); in find_safe_buffer_dev() 220 static int needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size) in needs_bounce() argument 236 if ((dma_addr | (dma_addr + size - 1)) & ~mask) in needs_bounce() 240 return !!dev->archdata.dmabounce->needs_bounce(dev, dma_addr, size); in needs_bounce() 317 dma_addr_t dma_addr; in dmabounce_map_page() local 323 dma_addr = pfn_to_dma(dev, page_to_pfn(page)) + offset; in dmabounce_map_page() 325 ret = needs_bounce(dev, dma_addr, size); in dmabounce_map_page() 330 arm_dma_ops.sync_single_for_device(dev, dma_addr, size, dir); in dmabounce_map_page() [all …]
|
D | it8152.c | 244 static int it8152_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size) in it8152_needs_bounce() argument 247 __func__, dma_addr, size); in it8152_needs_bounce() 248 return (dma_addr + size - PHYS_OFFSET) >= SZ_64M; in it8152_needs_bounce()
|
/arch/mips/loongson64/fuloong-2e/ |
D | dma.c | 9 phys_addr_t __dma_to_phys(struct device *dev, dma_addr_t dma_addr) in __dma_to_phys() argument 11 return dma_addr & 0x7fffffff; in __dma_to_phys()
|
/arch/mips/pci/ |
D | pci-ip27.c | 20 phys_addr_t __dma_to_phys(struct device *dev, dma_addr_t dma_addr) in __dma_to_phys() argument 22 return dma_addr & ~(0xffUL << 56); in __dma_to_phys()
|
/arch/x86/kernel/ |
D | amd_gart_64.c | 248 static void gart_unmap_page(struct device *dev, dma_addr_t dma_addr, in gart_unmap_page() argument 256 if (WARN_ON_ONCE(dma_addr == DMA_MAPPING_ERROR)) in gart_unmap_page() 264 if (dma_addr < iommu_bus_base || in gart_unmap_page() 265 dma_addr >= iommu_bus_base + iommu_size) in gart_unmap_page() 268 iommu_page = (dma_addr - iommu_bus_base)>>PAGE_SHIFT; in gart_unmap_page() 269 npages = iommu_num_pages(dma_addr, size, PAGE_SIZE); in gart_unmap_page() 467 gart_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_addr, in gart_alloc_coherent() argument 472 vaddr = dma_direct_alloc_pages(dev, size, dma_addr, flag, attrs); in gart_alloc_coherent() 477 *dma_addr = dma_map_area(dev, virt_to_phys(vaddr), size, in gart_alloc_coherent() 480 if (unlikely(*dma_addr == DMA_MAPPING_ERROR)) in gart_alloc_coherent() [all …]
|
/arch/alpha/kernel/ |
D | pci_iommu.c | 383 static void alpha_pci_unmap_page(struct device *dev, dma_addr_t dma_addr, in alpha_pci_unmap_page() argument 395 if (dma_addr >= __direct_map_base in alpha_pci_unmap_page() 396 && dma_addr < __direct_map_base + __direct_map_size) { in alpha_pci_unmap_page() 400 dma_addr, size, __builtin_return_address(0)); in alpha_pci_unmap_page() 405 if (dma_addr > 0xffffffff) { in alpha_pci_unmap_page() 407 dma_addr, size, __builtin_return_address(0)); in alpha_pci_unmap_page() 412 if (!arena || dma_addr < arena->dma_base) in alpha_pci_unmap_page() 415 dma_ofs = (dma_addr - arena->dma_base) >> PAGE_SHIFT; in alpha_pci_unmap_page() 419 dma_addr, arena->dma_base, arena->size); in alpha_pci_unmap_page() 424 npages = iommu_num_pages(dma_addr, size, PAGE_SIZE); in alpha_pci_unmap_page() [all …]
|
/arch/arm/mm/ |
D | dma-mapping.c | 206 void *cpu_addr, dma_addr_t dma_addr, size_t size, 788 void *cpu_addr, dma_addr_t dma_addr, size_t size, in __arm_dma_mmap() argument 794 unsigned long pfn = dma_to_pfn(dev, dma_addr); in __arm_dma_mmap() 814 void *cpu_addr, dma_addr_t dma_addr, size_t size, in arm_coherent_dma_mmap() argument 817 return __arm_dma_mmap(dev, vma, cpu_addr, dma_addr, size, attrs); in arm_coherent_dma_mmap() 821 void *cpu_addr, dma_addr_t dma_addr, size_t size, in arm_dma_mmap() argument 825 return __arm_dma_mmap(dev, vma, cpu_addr, dma_addr, size, attrs); in arm_dma_mmap() 1354 dma_addr_t dma_addr, iova; in __iommu_create_mapping() local 1357 dma_addr = __alloc_iova(mapping, size); in __iommu_create_mapping() 1358 if (dma_addr == DMA_MAPPING_ERROR) in __iommu_create_mapping() [all …]
|
D | dma-mapping-nommu.c | 55 void *cpu_addr, dma_addr_t dma_addr, in arm_nommu_dma_free() argument 64 void *cpu_addr, dma_addr_t dma_addr, size_t size, in arm_nommu_dma_mmap() argument
|
/arch/powerpc/kernel/ |
D | iommu.c | 347 static bool iommu_free_check(struct iommu_table *tbl, dma_addr_t dma_addr, in iommu_free_check() argument 352 entry = dma_addr >> tbl->it_page_shift; in iommu_free_check() 360 printk(KERN_INFO "\tdma_addr = 0x%llx\n", (u64)dma_addr); in iommu_free_check() 394 static void __iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr, in __iommu_free() argument 401 entry = dma_addr >> tbl->it_page_shift; in __iommu_free() 406 if (!iommu_free_check(tbl, dma_addr, npages)) in __iommu_free() 416 static void iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr, in iommu_free() argument 419 __iommu_free(tbl, dma_addr, npages); in iommu_free() 434 dma_addr_t dma_next = 0, dma_addr; in ppc_iommu_map_sg() local 490 dma_addr = entry << tbl->it_page_shift; in ppc_iommu_map_sg() [all …]
|
/arch/arm/include/asm/ |
D | dma-mapping.h | 139 void *cpu_addr, dma_addr_t dma_addr, size_t size, 195 void *cpu_addr, dma_addr_t dma_addr, size_t size,
|
/arch/arm/mach-rpc/ |
D | dma.c | 32 dma_addr_t dma_addr; member 59 idma->cur_addr = idma->dma_addr; in iomd_get_next_sg() 73 idma->dma_addr += end - offset; in iomd_get_next_sg() 78 idma->dma_addr = idma->dma.sg->dma_address; in iomd_get_next_sg() 178 idma->dma_addr = idma->dma.sg->dma_address; in iomd_enable_dma()
|
/arch/sparc/include/asm/ |
D | iommu-common.h | 50 u64 dma_addr, unsigned long npages,
|
/arch/sparc/kernel/ |
D | ioport.c | 357 dma_addr_t dma_addr, unsigned long attrs) in arch_dma_free() argument 364 dma_make_coherent(dma_addr, size); in arch_dma_free() 366 free_pages((unsigned long)phys_to_virt(dma_addr), get_order(size)); in arch_dma_free()
|
D | iommu.c | 438 dma_addr_t dma_next = 0, dma_addr; in dma_4u_map_sg() local 505 dma_addr = iommu->tbl.table_map_base + in dma_4u_map_sg() 507 dma_addr |= (s->offset & ~IO_PAGE_MASK); in dma_4u_map_sg() 522 if ((dma_addr != dma_next) || in dma_4u_map_sg() 537 outs->dma_address = dma_addr; in dma_4u_map_sg() 543 dma_next = dma_addr + slen; in dma_4u_map_sg()
|
D | iommu-common.c | 250 void iommu_tbl_range_free(struct iommu_map_table *iommu, u64 dma_addr, in iommu_tbl_range_free() argument 258 entry = (dma_addr - iommu->table_map_base) >> shift; in iommu_tbl_range_free()
|
/arch/arm/mach-ixp4xx/ |
D | common.c | 284 static int ixp4xx_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size) in ixp4xx_needs_bounce() argument 286 return (dma_addr + size) > SZ_64M; in ixp4xx_needs_bounce()
|
/arch/powerpc/platforms/pseries/ |
D | iommu.c | 823 u64 dma_addr = 0; in find_existing_ddw() local 830 dma_addr = be64_to_cpu(direct64->dma_base); in find_existing_ddw() 836 return dma_addr; in find_existing_ddw() 988 u64 dma_addr, max_addr; in enable_ddw() local 998 dma_addr = find_existing_ddw(pdn); in enable_ddw() 999 if (dma_addr != 0) in enable_ddw() 1121 dma_addr = be64_to_cpu(ddwprop->dma_base); in enable_ddw() 1145 return dma_addr; in enable_ddw()
|
/arch/mips/mm/ |
D | dma-noncoherent.c | 63 dma_addr_t dma_addr) in arch_dma_coherent_to_pfn() argument
|