/linux-6.6.21/arch/mips/cavium-octeon/ |
D | dma-octeon.c | 31 dma_addr_t (*phys_to_dma)(struct device *dev, phys_addr_t paddr); 35 static dma_addr_t octeon_hole_phys_to_dma(phys_addr_t paddr) in octeon_hole_phys_to_dma() argument 37 …if (paddr >= CVMX_PCIE_BAR1_PHYS_BASE && paddr < (CVMX_PCIE_BAR1_PHYS_BASE + CVMX_PCIE_BAR1_PHYS_S… in octeon_hole_phys_to_dma() 38 return paddr - CVMX_PCIE_BAR1_PHYS_BASE + CVMX_PCIE_BAR1_RC_BASE; in octeon_hole_phys_to_dma() 40 return paddr; in octeon_hole_phys_to_dma() 51 static dma_addr_t octeon_gen1_phys_to_dma(struct device *dev, phys_addr_t paddr) in octeon_gen1_phys_to_dma() argument 53 if (paddr >= 0x410000000ull && paddr < 0x420000000ull) in octeon_gen1_phys_to_dma() 54 paddr -= 0x400000000ull; in octeon_gen1_phys_to_dma() 55 return octeon_hole_phys_to_dma(paddr); in octeon_gen1_phys_to_dma() 73 static dma_addr_t octeon_gen2_phys_to_dma(struct device *dev, phys_addr_t paddr) in octeon_gen2_phys_to_dma() argument [all …]
|
/linux-6.6.21/arch/m68k/mm/ |
D | memory.c | 24 static inline void clear040(unsigned long paddr) in clear040() argument 31 : : "a" (paddr)); in clear040() 35 static inline void cleari040(unsigned long paddr) in cleari040() argument 42 : : "a" (paddr)); in cleari040() 47 static inline void push040(unsigned long paddr) in push040() argument 54 : : "a" (paddr)); in push040() 59 static inline void pushcl040(unsigned long paddr) in pushcl040() argument 64 push040(paddr); in pushcl040() 66 clear040(paddr); in pushcl040() 97 void cache_clear (unsigned long paddr, int len) in cache_clear() argument [all …]
|
/linux-6.6.21/arch/m68k/kernel/ |
D | sys_m68k.c | 70 unsigned long paddr, i; in cache_flush_040() local 103 if ((paddr = virt_to_phys_040(addr))) { in cache_flush_040() 104 paddr += addr & ~(PAGE_MASK | 15); in cache_flush_040() 116 if ((paddr = virt_to_phys_040(addr))) in cache_flush_040() 125 i = (PAGE_SIZE - (paddr & ~PAGE_MASK)) >> 4; in cache_flush_040() 135 : : "a" (paddr)); in cache_flush_040() 142 : : "a" (paddr)); in cache_flush_040() 150 : : "a" (paddr)); in cache_flush_040() 165 if ((paddr = virt_to_phys_040(addr))) in cache_flush_040() 174 paddr += 16; in cache_flush_040() [all …]
|
/linux-6.6.21/arch/riscv/mm/ |
D | dma-noncoherent.c | 18 static inline void arch_dma_cache_wback(phys_addr_t paddr, size_t size) in arch_dma_cache_wback() argument 20 void *vaddr = phys_to_virt(paddr); in arch_dma_cache_wback() 24 noncoherent_cache_ops.wback(paddr, size); in arch_dma_cache_wback() 31 static inline void arch_dma_cache_inv(phys_addr_t paddr, size_t size) in arch_dma_cache_inv() argument 33 void *vaddr = phys_to_virt(paddr); in arch_dma_cache_inv() 37 noncoherent_cache_ops.inv(paddr, size); in arch_dma_cache_inv() 45 static inline void arch_dma_cache_wback_inv(phys_addr_t paddr, size_t size) in arch_dma_cache_wback_inv() argument 47 void *vaddr = phys_to_virt(paddr); in arch_dma_cache_wback_inv() 51 noncoherent_cache_ops.wback_inv(paddr, size); in arch_dma_cache_wback_inv() 69 void arch_sync_dma_for_device(phys_addr_t paddr, size_t size, in arch_sync_dma_for_device() argument [all …]
|
/linux-6.6.21/arch/arc/mm/ |
D | cache.c | 35 void (*_cache_line_loop_ic_fn)(phys_addr_t paddr, unsigned long vaddr, 189 void __cache_line_loop_v3(phys_addr_t paddr, unsigned long vaddr, in __cache_line_loop_v3() argument 210 sz += paddr & ~CACHE_LINE_MASK; in __cache_line_loop_v3() 211 paddr &= CACHE_LINE_MASK; in __cache_line_loop_v3() 221 write_aux_reg(aux_tag, paddr); in __cache_line_loop_v3() 231 write_aux_reg(ARC_REG_IC_PTAG_HI, (u64)paddr >> 32); in __cache_line_loop_v3() 235 write_aux_reg(aux_tag, paddr); in __cache_line_loop_v3() 236 paddr += L1_CACHE_BYTES; in __cache_line_loop_v3() 249 void __cache_line_loop_v4(phys_addr_t paddr, unsigned long vaddr, in __cache_line_loop_v4() argument 269 sz += paddr & ~CACHE_LINE_MASK; in __cache_line_loop_v4() [all …]
|
D | ioremap.c | 13 static inline bool arc_uncached_addr_space(phys_addr_t paddr) in arc_uncached_addr_space() argument 16 if (paddr >= ARC_UNCACHED_ADDR_SPACE) in arc_uncached_addr_space() 18 } else if (paddr >= perip_base && paddr <= perip_end) { in arc_uncached_addr_space() 25 void __iomem *ioremap(phys_addr_t paddr, unsigned long size) in ioremap() argument 31 if (arc_uncached_addr_space(paddr)) in ioremap() 32 return (void __iomem *)(u32)paddr; in ioremap() 34 return ioremap_prot(paddr, size, in ioremap() 46 void __iomem *ioremap_prot(phys_addr_t paddr, size_t size, in ioremap_prot() argument 52 return generic_ioremap_prot(paddr, size, pgprot_noncached(prot)); in ioremap_prot()
|
D | dma.c | 51 void arch_sync_dma_for_device(phys_addr_t paddr, size_t size, in arch_sync_dma_for_device() argument 56 dma_cache_wback(paddr, size); in arch_sync_dma_for_device() 60 dma_cache_inv(paddr, size); in arch_sync_dma_for_device() 64 dma_cache_wback_inv(paddr, size); in arch_sync_dma_for_device() 72 void arch_sync_dma_for_cpu(phys_addr_t paddr, size_t size, in arch_sync_dma_for_cpu() argument 82 dma_cache_inv(paddr, size); in arch_sync_dma_for_cpu()
|
/linux-6.6.21/arch/arm/mm/ |
D | dma-mapping-nommu.c | 16 void arch_sync_dma_for_device(phys_addr_t paddr, size_t size, in arch_sync_dma_for_device() argument 19 dmac_map_area(__va(paddr), size, dir); in arch_sync_dma_for_device() 22 outer_inv_range(paddr, paddr + size); in arch_sync_dma_for_device() 24 outer_clean_range(paddr, paddr + size); in arch_sync_dma_for_device() 27 void arch_sync_dma_for_cpu(phys_addr_t paddr, size_t size, in arch_sync_dma_for_cpu() argument 31 outer_inv_range(paddr, paddr + size); in arch_sync_dma_for_cpu() 32 dmac_unmap_area(__va(paddr), size, dir); in arch_sync_dma_for_cpu()
|
/linux-6.6.21/arch/microblaze/kernel/ |
D | dma.c | 17 static void __dma_sync(phys_addr_t paddr, size_t size, in __dma_sync() argument 23 flush_dcache_range(paddr, paddr + size); in __dma_sync() 26 invalidate_dcache_range(paddr, paddr + size); in __dma_sync() 33 void arch_sync_dma_for_device(phys_addr_t paddr, size_t size, in arch_sync_dma_for_device() argument 36 __dma_sync(paddr, size, dir); in arch_sync_dma_for_device() 39 void arch_sync_dma_for_cpu(phys_addr_t paddr, size_t size, in arch_sync_dma_for_cpu() argument 42 __dma_sync(paddr, size, dir); in arch_sync_dma_for_cpu()
|
/linux-6.6.21/include/linux/ |
D | dma-direct.h | 28 phys_addr_t paddr) in translate_phys_to_dma() argument 33 if (paddr >= m->cpu_start && paddr - m->cpu_start < m->size) in translate_phys_to_dma() 34 return (dma_addr_t)paddr - m->offset; in translate_phys_to_dma() 59 phys_addr_t paddr) in phys_to_dma_unencrypted() argument 62 return translate_phys_to_dma(dev, paddr); in phys_to_dma_unencrypted() 63 return paddr; in phys_to_dma_unencrypted() 72 static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) in phys_to_dma() argument 74 return __sme_set(phys_to_dma_unencrypted(dev, paddr)); in phys_to_dma() 79 phys_addr_t paddr; in dma_to_phys() local 82 paddr = translate_dma_to_phys(dev, dma_addr); in dma_to_phys() [all …]
|
/linux-6.6.21/arch/x86/mm/pat/ |
D | memtype.c | 672 static enum page_cache_mode lookup_memtype(u64 paddr) in lookup_memtype() argument 677 if (x86_platform.is_untracked_pat_range(paddr, paddr + PAGE_SIZE)) in lookup_memtype() 680 if (pat_pagerange_is_ram(paddr, paddr + PAGE_SIZE)) { in lookup_memtype() 683 page = pfn_to_page(paddr >> PAGE_SHIFT); in lookup_memtype() 689 entry = memtype_lookup(paddr); in lookup_memtype() 874 static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot, in reserve_pfn_range() argument 882 is_ram = pat_pagerange_is_ram(paddr, paddr + size); in reserve_pfn_range() 893 pcm = lookup_memtype(paddr); in reserve_pfn_range() 898 (unsigned long long)paddr, in reserve_pfn_range() 899 (unsigned long long)(paddr + size - 1), in reserve_pfn_range() [all …]
|
/linux-6.6.21/drivers/soc/apple/ |
D | sart.c | 53 phys_addr_t *paddr, size_t *size); 72 phys_addr_t *paddr, size_t *size) in sart2_get_entry() argument 80 *paddr = paddr_ << APPLE_SART2_PADDR_SHIFT; in sart2_get_entry() 104 phys_addr_t *paddr, size_t *size) in sart3_get_entry() argument 111 *paddr = paddr_ << APPLE_SART3_PADDR_SHIFT; in sart3_get_entry() 150 phys_addr_t paddr; in apple_sart_probe() local 152 sart->ops->get_entry(sart, i, &flags, &paddr, &size); in apple_sart_probe() 159 i, flags, &paddr, size); in apple_sart_probe() 208 phys_addr_t paddr, size_t size) in sart_set_entry() argument 212 if (paddr & ((1 << sart->ops->paddr_shift) - 1)) in sart_set_entry() [all …]
|
/linux-6.6.21/arch/x86/mm/ |
D | ioremap.c | 598 u64 paddr; in memremap_is_efi_data() local 604 paddr = boot_params.efi_info.efi_memmap_hi; in memremap_is_efi_data() 605 paddr <<= 32; in memremap_is_efi_data() 606 paddr |= boot_params.efi_info.efi_memmap; in memremap_is_efi_data() 607 if (phys_addr == paddr) in memremap_is_efi_data() 610 paddr = boot_params.efi_info.efi_systab_hi; in memremap_is_efi_data() 611 paddr <<= 32; in memremap_is_efi_data() 612 paddr |= boot_params.efi_info.efi_systab; in memremap_is_efi_data() 613 if (phys_addr == paddr) in memremap_is_efi_data() 639 u64 paddr, paddr_next; in memremap_is_setup_data() local [all …]
|
D | mem_encrypt_amd.c | 60 unsigned long paddr, bool decrypt) in snp_memcpy() argument 69 early_snp_set_memory_shared((unsigned long)__va(paddr), paddr, npages); in snp_memcpy() 74 early_snp_set_memory_private((unsigned long)__va(paddr), paddr, npages); in snp_memcpy() 93 static void __init __sme_early_enc_dec(resource_size_t paddr, in __sme_early_enc_dec() argument 115 src = enc ? early_memremap_decrypted_wp(paddr, len) : in __sme_early_enc_dec() 116 early_memremap_encrypted_wp(paddr, len); in __sme_early_enc_dec() 118 dst = enc ? early_memremap_encrypted(paddr, len) : in __sme_early_enc_dec() 119 early_memremap_decrypted(paddr, len); in __sme_early_enc_dec() 133 snp_memcpy(sme_early_buffer, src, len, paddr, enc); in __sme_early_enc_dec() 134 snp_memcpy(dst, sme_early_buffer, len, paddr, !enc); in __sme_early_enc_dec() [all …]
|
/linux-6.6.21/arch/xtensa/kernel/ |
D | pci-dma.c | 24 static void do_cache_op(phys_addr_t paddr, size_t size, in do_cache_op() argument 27 unsigned long off = paddr & (PAGE_SIZE - 1); in do_cache_op() 28 unsigned long pfn = PFN_DOWN(paddr); in do_cache_op() 32 fn((unsigned long)phys_to_virt(paddr), size); in do_cache_op() 46 void arch_sync_dma_for_cpu(phys_addr_t paddr, size_t size, in arch_sync_dma_for_cpu() argument 52 do_cache_op(paddr, size, __invalidate_dcache_range); in arch_sync_dma_for_cpu() 64 void arch_sync_dma_for_device(phys_addr_t paddr, size_t size, in arch_sync_dma_for_device() argument 71 do_cache_op(paddr, size, __flush_dcache_range); in arch_sync_dma_for_device()
|
/linux-6.6.21/drivers/bus/ |
D | uniphier-system-bus.c | 39 int bank, u32 addr, u64 paddr, u32 size) in uniphier_system_bus_add_bank() argument 45 bank, addr, paddr, size); in uniphier_system_bus_add_bank() 58 if (paddr > U32_MAX) { in uniphier_system_bus_add_bank() 59 dev_err(priv->dev, "base address %llx is too high\n", paddr); in uniphier_system_bus_add_bank() 63 end = paddr + size; in uniphier_system_bus_add_bank() 65 if (addr > paddr) { in uniphier_system_bus_add_bank() 68 addr, paddr); in uniphier_system_bus_add_bank() 71 paddr -= addr; in uniphier_system_bus_add_bank() 73 paddr = round_down(paddr, 0x00020000); in uniphier_system_bus_add_bank() 80 mask = paddr ^ (end - 1); in uniphier_system_bus_add_bank() [all …]
|
/linux-6.6.21/arch/csky/mm/ |
D | dma-mapping.c | 14 static inline void cache_op(phys_addr_t paddr, size_t size, in cache_op() argument 17 struct page *page = phys_to_page(paddr); in cache_op() 19 unsigned long offset = offset_in_page(paddr); in cache_op() 58 void arch_sync_dma_for_device(phys_addr_t paddr, size_t size, in arch_sync_dma_for_device() argument 63 cache_op(paddr, size, dma_wb_range); in arch_sync_dma_for_device() 67 cache_op(paddr, size, dma_wbinv_range); in arch_sync_dma_for_device() 74 void arch_sync_dma_for_cpu(phys_addr_t paddr, size_t size, in arch_sync_dma_for_cpu() argument 82 cache_op(paddr, size, dma_inv_range); in arch_sync_dma_for_cpu()
|
D | tcm.c | 29 unsigned long vaddr, paddr; local 32 paddr = CONFIG_ITCM_RAM_BASE; 47 set_pte(tcm_pte, pfn_pte(__phys_to_pfn(paddr), PAGE_KERNEL)); 51 paddr = paddr + PAGE_SIZE; 58 paddr = CONFIG_DTCM_RAM_BASE; 66 set_pte(tcm_pte, pfn_pte(__phys_to_pfn(paddr), PAGE_KERNEL)); 70 paddr = paddr + PAGE_SIZE;
|
/linux-6.6.21/drivers/xen/ |
D | swiotlb-xen.c | 47 static inline phys_addr_t xen_phys_to_bus(struct device *dev, phys_addr_t paddr) in xen_phys_to_bus() argument 49 unsigned long bfn = pfn_to_bfn(XEN_PFN_DOWN(paddr)); in xen_phys_to_bus() 52 baddr |= paddr & ~XEN_PAGE_MASK; in xen_phys_to_bus() 56 static inline dma_addr_t xen_phys_to_dma(struct device *dev, phys_addr_t paddr) in xen_phys_to_dma() argument 58 return phys_to_dma(dev, xen_phys_to_bus(dev, paddr)); in xen_phys_to_dma() 65 phys_addr_t paddr = (xen_pfn << XEN_PAGE_SHIFT) | in xen_bus_to_phys() local 68 return paddr; in xen_bus_to_phys() 95 phys_addr_t paddr = (phys_addr_t)xen_pfn << XEN_PAGE_SHIFT; in is_xen_swiotlb_buffer() local 101 if (pfn_valid(PFN_DOWN(paddr))) in is_xen_swiotlb_buffer() 102 return is_swiotlb_buffer(dev, paddr); in is_xen_swiotlb_buffer() [all …]
|
/linux-6.6.21/drivers/media/platform/st/sti/hva/ |
D | hva-mem.c | 16 dma_addr_t paddr; in hva_mem_alloc() local 25 base = dma_alloc_attrs(dev, size, &paddr, GFP_KERNEL, in hva_mem_alloc() 36 b->paddr = paddr; in hva_mem_alloc() 42 ctx->name, size, b->vaddr, &b->paddr, b->name); in hva_mem_alloc() 56 ctx->name, buf->size, buf->vaddr, &buf->paddr, buf->name); in hva_mem_free() 58 dma_free_attrs(dev, buf->size, buf->vaddr, buf->paddr, in hva_mem_free()
|
/linux-6.6.21/drivers/net/phy/ |
D | bcm87xx.c | 36 const __be32 *paddr; in bcm87xx_of_reg_init() local 43 paddr = of_get_property(phydev->mdio.dev.of_node, in bcm87xx_of_reg_init() 45 if (!paddr) in bcm87xx_of_reg_init() 48 paddr_end = paddr + (len /= sizeof(*paddr)); in bcm87xx_of_reg_init() 52 while (paddr + 3 < paddr_end) { in bcm87xx_of_reg_init() 53 u16 devid = be32_to_cpup(paddr++); in bcm87xx_of_reg_init() 54 u16 reg = be32_to_cpup(paddr++); in bcm87xx_of_reg_init() 55 u16 mask = be32_to_cpup(paddr++); in bcm87xx_of_reg_init() 56 u16 val_bits = be32_to_cpup(paddr++); in bcm87xx_of_reg_init()
|
/linux-6.6.21/arch/sparc/include/asm/ |
D | mxcc.h | 89 static inline void mxcc_set_stream_src(unsigned long *paddr) in mxcc_set_stream_src() argument 91 unsigned long data0 = paddr[0]; in mxcc_set_stream_src() 92 unsigned long data1 = paddr[1]; in mxcc_set_stream_src() 102 static inline void mxcc_set_stream_dst(unsigned long *paddr) in mxcc_set_stream_dst() argument 104 unsigned long data0 = paddr[0]; in mxcc_set_stream_dst() 105 unsigned long data1 = paddr[1]; in mxcc_set_stream_dst()
|
/linux-6.6.21/arch/x86/include/asm/uv/ |
D | uv_hub.h | 420 static inline unsigned long uv_soc_phys_ram_to_nasid(unsigned long paddr) in uv_soc_phys_ram_to_nasid() argument 422 return uv_gam_range(paddr)->nasid; in uv_soc_phys_ram_to_nasid() 433 static inline unsigned long uv_soc_phys_ram_to_gpa(unsigned long paddr) in uv_soc_phys_ram_to_gpa() argument 437 if (paddr < uv_hub_info->lowmem_remap_top) in uv_soc_phys_ram_to_gpa() 438 paddr |= uv_hub_info->lowmem_remap_base; in uv_soc_phys_ram_to_gpa() 441 paddr |= uv_hub_info->gnode_upper; in uv_soc_phys_ram_to_gpa() 442 paddr = ((paddr << uv_hub_info->m_shift) in uv_soc_phys_ram_to_gpa() 444 ((paddr >> uv_hub_info->m_val) in uv_soc_phys_ram_to_gpa() 447 paddr |= uv_soc_phys_ram_to_nasid(paddr) in uv_soc_phys_ram_to_gpa() 450 return paddr; in uv_soc_phys_ram_to_gpa() [all …]
|
/linux-6.6.21/arch/mips/sgi-ip32/ |
D | ip32-dma.c | 21 dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) in phys_to_dma() argument 23 dma_addr_t dma_addr = paddr & RAM_OFFSET_MASK; in phys_to_dma() 32 phys_addr_t paddr = dma_addr & RAM_OFFSET_MASK; in dma_to_phys() local 35 paddr += CRIME_HI_MEM_BASE; in dma_to_phys() 36 return paddr; in dma_to_phys()
|
/linux-6.6.21/arch/mips/mm/ |
D | dma-noncoherent.c | 95 static inline void dma_sync_phys(phys_addr_t paddr, size_t size, in dma_sync_phys() argument 98 struct page *page = pfn_to_page(paddr >> PAGE_SHIFT); in dma_sync_phys() 99 unsigned long offset = paddr & ~PAGE_MASK; in dma_sync_phys() 124 void arch_sync_dma_for_device(phys_addr_t paddr, size_t size, in arch_sync_dma_for_device() argument 127 dma_sync_phys(paddr, size, dir, true); in arch_sync_dma_for_device() 131 void arch_sync_dma_for_cpu(phys_addr_t paddr, size_t size, in arch_sync_dma_for_cpu() argument 135 dma_sync_phys(paddr, size, dir, false); in arch_sync_dma_for_cpu()
|