Home
last modified time | relevance | path

Searched refs:cpu_addr (Results 1 – 25 of 168) sorted by relevance

1234567

/kernel/linux/linux-5.10/kernel/dma/
Dops_helpers.c8 static struct page *dma_common_vaddr_to_page(void *cpu_addr) in dma_common_vaddr_to_page() argument
10 if (is_vmalloc_addr(cpu_addr)) in dma_common_vaddr_to_page()
11 return vmalloc_to_page(cpu_addr); in dma_common_vaddr_to_page()
12 return virt_to_page(cpu_addr); in dma_common_vaddr_to_page()
19 void *cpu_addr, dma_addr_t dma_addr, size_t size, in dma_common_get_sgtable() argument
22 struct page *page = dma_common_vaddr_to_page(cpu_addr); in dma_common_get_sgtable()
35 void *cpu_addr, dma_addr_t dma_addr, size_t size, in dma_common_mmap() argument
42 struct page *page = dma_common_vaddr_to_page(cpu_addr); in dma_common_mmap()
47 if (dma_mmap_from_dev_coherent(dev, vma, cpu_addr, size, &ret)) in dma_common_mmap()
Dremap.c9 struct page **dma_common_find_pages(void *cpu_addr) in dma_common_find_pages() argument
11 struct vm_struct *area = find_vm_area(cpu_addr); in dma_common_find_pages()
60 void dma_common_free_remap(void *cpu_addr, size_t size) in dma_common_free_remap() argument
62 struct vm_struct *area = find_vm_area(cpu_addr); in dma_common_free_remap()
65 WARN(1, "trying to free invalid coherent area: %p\n", cpu_addr); in dma_common_free_remap()
69 unmap_kernel_range((unsigned long)cpu_addr, PAGE_ALIGN(size)); in dma_common_free_remap()
70 vunmap(cpu_addr); in dma_common_free_remap()
Dmapping.c322 void *cpu_addr, dma_addr_t dma_addr, size_t size, in dma_get_sgtable_attrs() argument
328 return dma_direct_get_sgtable(dev, sgt, cpu_addr, dma_addr, in dma_get_sgtable_attrs()
332 return ops->get_sgtable(dev, sgt, cpu_addr, dma_addr, size, attrs); in dma_get_sgtable_attrs()
386 void *cpu_addr, dma_addr_t dma_addr, size_t size, in dma_mmap_attrs() argument
392 return dma_direct_mmap(dev, vma, cpu_addr, dma_addr, size, in dma_mmap_attrs()
396 return ops->mmap(dev, vma, cpu_addr, dma_addr, size, attrs); in dma_mmap_attrs()
425 void *cpu_addr; in dma_alloc_attrs() local
429 if (dma_alloc_from_dev_coherent(dev, size, dma_handle, &cpu_addr)) in dma_alloc_attrs()
430 return cpu_addr; in dma_alloc_attrs()
436 cpu_addr = dma_direct_alloc(dev, size, dma_handle, flag, attrs); in dma_alloc_attrs()
[all …]
Ddirect.c245 void *cpu_addr, dma_addr_t dma_addr, unsigned long attrs) in dma_direct_free() argument
252 dma_free_contiguous(dev, cpu_addr, size); in dma_direct_free()
259 arch_dma_free(dev, size, cpu_addr, dma_addr, attrs); in dma_direct_free()
265 dma_free_from_pool(dev, cpu_addr, PAGE_ALIGN(size))) in dma_direct_free()
269 set_memory_encrypted((unsigned long)cpu_addr, 1 << page_order); in dma_direct_free()
271 if (IS_ENABLED(CONFIG_DMA_REMAP) && is_vmalloc_addr(cpu_addr)) in dma_direct_free()
272 vunmap(cpu_addr); in dma_direct_free()
274 arch_dma_clear_uncached(cpu_addr, size); in dma_direct_free()
434 void *cpu_addr, dma_addr_t dma_addr, size_t size, in dma_direct_get_sgtable() argument
453 void *cpu_addr, dma_addr_t dma_addr, size_t size, in dma_direct_mmap() argument
[all …]
/kernel/linux/linux-5.10/drivers/pci/controller/dwc/
Dpcie-designware.c230 u64 cpu_addr, u64 pci_addr, in dw_pcie_prog_outbound_atu_unroll() argument
234 u64 limit_addr = cpu_addr + size - 1; in dw_pcie_prog_outbound_atu_unroll()
237 lower_32_bits(cpu_addr)); in dw_pcie_prog_outbound_atu_unroll()
239 upper_32_bits(cpu_addr)); in dw_pcie_prog_outbound_atu_unroll()
269 int index, int type, u64 cpu_addr, in __dw_pcie_prog_outbound_atu() argument
275 cpu_addr = pci->ops->cpu_addr_fixup(pci, cpu_addr); in __dw_pcie_prog_outbound_atu()
279 cpu_addr, pci_addr, size); in __dw_pcie_prog_outbound_atu()
286 lower_32_bits(cpu_addr)); in __dw_pcie_prog_outbound_atu()
288 upper_32_bits(cpu_addr)); in __dw_pcie_prog_outbound_atu()
290 lower_32_bits(cpu_addr + size - 1)); in __dw_pcie_prog_outbound_atu()
[all …]
/kernel/linux/linux-5.10/drivers/pci/controller/cadence/
Dpcie-cadence.c28 u64 cpu_addr, u64 pci_addr, size_t size) in cdns_pcie_set_outbound_region() argument
93 cpu_addr = pcie->ops->cpu_addr_fixup(pcie, cpu_addr); in cdns_pcie_set_outbound_region()
96 (lower_32_bits(cpu_addr) & GENMASK(31, 8)); in cdns_pcie_set_outbound_region()
97 addr1 = upper_32_bits(cpu_addr); in cdns_pcie_set_outbound_region()
105 u32 r, u64 cpu_addr) in cdns_pcie_set_outbound_region_for_normal_msg() argument
123 cpu_addr = pcie->ops->cpu_addr_fixup(pcie, cpu_addr); in cdns_pcie_set_outbound_region_for_normal_msg()
126 (lower_32_bits(cpu_addr) & GENMASK(31, 8)); in cdns_pcie_set_outbound_region_for_normal_msg()
127 addr1 = upper_32_bits(cpu_addr); in cdns_pcie_set_outbound_region_for_normal_msg()
Dpcie-cadence-host.c185 u64 cpu_addr, u64 size, in cdns_pcie_host_bar_ib_config() argument
198 (lower_32_bits(cpu_addr) & GENMASK(31, 8)); in cdns_pcie_host_bar_ib_config()
199 addr1 = upper_32_bits(cpu_addr); in cdns_pcie_host_bar_ib_config()
212 if (size + cpu_addr >= SZ_4G) { in cdns_pcie_host_bar_ib_config()
279 u64 cpu_addr, pci_addr, size, winsize; in cdns_pcie_host_bar_config() local
286 cpu_addr = entry->res->start; in cdns_pcie_host_bar_config()
293 pci_addr, cpu_addr); in cdns_pcie_host_bar_config()
308 ret = cdns_pcie_host_bar_ib_config(rc, bar, cpu_addr, in cdns_pcie_host_bar_config()
329 cpu_addr); in cdns_pcie_host_bar_config()
334 ret = cdns_pcie_host_bar_ib_config(rc, bar, cpu_addr, winsize, in cdns_pcie_host_bar_config()
[all …]
/kernel/linux/linux-5.10/drivers/iommu/
Ddma-iommu.c949 static void __iommu_dma_free(struct device *dev, size_t size, void *cpu_addr) in __iommu_dma_free() argument
957 dma_free_from_pool(dev, cpu_addr, alloc_size)) in __iommu_dma_free()
960 if (IS_ENABLED(CONFIG_DMA_REMAP) && is_vmalloc_addr(cpu_addr)) { in __iommu_dma_free()
965 pages = dma_common_find_pages(cpu_addr); in __iommu_dma_free()
967 page = vmalloc_to_page(cpu_addr); in __iommu_dma_free()
968 dma_common_free_remap(cpu_addr, alloc_size); in __iommu_dma_free()
971 page = virt_to_page(cpu_addr); in __iommu_dma_free()
980 static void iommu_dma_free(struct device *dev, size_t size, void *cpu_addr, in iommu_dma_free() argument
984 __iommu_dma_free(dev, size, cpu_addr); in iommu_dma_free()
994 void *cpu_addr; in iommu_dma_alloc_pages() local
[all …]
/kernel/linux/linux-5.10/arch/s390/kvm/
Dtrace.h220 TP_PROTO(VCPU_PROTO_COMMON, __u8 order_code, __u16 cpu_addr, \
222 TP_ARGS(VCPU_ARGS_COMMON, order_code, cpu_addr, parameter),
227 __field(__u16, cpu_addr)
234 __entry->cpu_addr = cpu_addr;
242 __entry->cpu_addr, __entry->parameter)
246 TP_PROTO(VCPU_PROTO_COMMON, __u8 order_code, __u16 cpu_addr),
247 TP_ARGS(VCPU_ARGS_COMMON, order_code, cpu_addr),
252 __field(__u16, cpu_addr)
258 __entry->cpu_addr = cpu_addr;
265 __entry->cpu_addr)
Dsigp.c283 u16 cpu_addr, u32 parameter, u64 *status_reg) in handle_sigp_dst() argument
286 struct kvm_vcpu *dst_vcpu = kvm_get_vcpu_by_id(vcpu->kvm, cpu_addr); in handle_sigp_dst()
388 u16 cpu_addr) in handle_sigp_order_in_user_space() argument
432 order_code, cpu_addr); in handle_sigp_order_in_user_space()
442 u16 cpu_addr = vcpu->run->s.regs.gprs[r3]; in kvm_s390_handle_sigp() local
451 if (handle_sigp_order_in_user_space(vcpu, order_code, cpu_addr)) in kvm_s390_handle_sigp()
459 trace_kvm_s390_handle_sigp(vcpu, order_code, cpu_addr, parameter); in kvm_s390_handle_sigp()
467 rc = handle_sigp_dst(vcpu, order_code, cpu_addr, in kvm_s390_handle_sigp()
491 u16 cpu_addr = vcpu->run->s.regs.gprs[r3]; in kvm_s390_handle_sigp_pei() local
495 trace_kvm_s390_handle_sigp_pei(vcpu, order_code, cpu_addr); in kvm_s390_handle_sigp_pei()
[all …]
/kernel/linux/linux-5.10/arch/openrisc/kernel/
Ddma.c68 void *arch_dma_set_uncached(void *cpu_addr, size_t size) in arch_dma_set_uncached() argument
70 unsigned long va = (unsigned long)cpu_addr; in arch_dma_set_uncached()
84 return cpu_addr; in arch_dma_set_uncached()
87 void arch_dma_clear_uncached(void *cpu_addr, size_t size) in arch_dma_clear_uncached() argument
89 unsigned long va = (unsigned long)cpu_addr; in arch_dma_clear_uncached()
/kernel/linux/linux-5.10/arch/mips/loongson64/
Dinit.c128 range.cpu_addr, in reserve_pio_range()
129 range.cpu_addr + range.size - 1, in reserve_pio_range()
131 if (add_legacy_isa_io(&np->fwnode, range.cpu_addr, range.size)) in reserve_pio_range()
136 range.cpu_addr, in reserve_pio_range()
137 range.cpu_addr + range.size - 1, in reserve_pio_range()
/kernel/linux/linux-5.10/arch/arm/mm/
Ddma-mapping.c54 void *cpu_addr; member
219 static void arm_coherent_dma_free(struct device *dev, size_t size, void *cpu_addr,
222 void *cpu_addr, dma_addr_t dma_addr, size_t size,
556 void *cpu_addr, size_t size, bool want_vaddr) in __free_from_contiguous() argument
560 dma_common_free_remap(cpu_addr, size); in __free_from_contiguous()
616 __free_from_contiguous(args->dev, args->page, args->cpu_addr, in cma_allocator_free()
633 __free_from_pool(args->cpu_addr, args->size); in pool_allocator_free()
652 dma_common_free_remap(args->cpu_addr, args->size); in remap_allocator_free()
760 void *cpu_addr, dma_addr_t dma_addr, size_t size, in __arm_dma_mmap() argument
769 if (dma_mmap_from_dev_coherent(dev, vma, cpu_addr, size, &ret)) in __arm_dma_mmap()
[all …]
/kernel/linux/linux-5.10/arch/mips/mm/
Dioremap.c54 void __iomem *cpu_addr; in ioremap_prot() local
56 cpu_addr = plat_ioremap(phys_addr, size, flags); in ioremap_prot()
57 if (cpu_addr) in ioremap_prot()
58 return cpu_addr; in ioremap_prot()
/kernel/linux/linux-5.10/drivers/pci/controller/mobiveil/
Dpcie-mobiveil.c137 u64 cpu_addr, u64 pci_addr, u32 type, u64 size) in program_ib_windows() argument
157 mobiveil_csr_writel(pcie, lower_32_bits(cpu_addr), in program_ib_windows()
159 mobiveil_csr_writel(pcie, upper_32_bits(cpu_addr), in program_ib_windows()
174 u64 cpu_addr, u64 pci_addr, u32 type, u64 size) in program_ob_windows() argument
203 lower_32_bits(cpu_addr) & (~AXI_WINDOW_ALIGN_MASK), in program_ob_windows()
205 mobiveil_csr_writel(pcie, upper_32_bits(cpu_addr), in program_ob_windows()
/kernel/linux/linux-5.10/include/linux/
Ddma-map-ops.h34 void *cpu_addr, dma_addr_t dma_addr, size_t size,
172 void *cpu_addr, size_t size, int *ret);
177 int dma_mmap_from_global_coherent(struct vm_area_struct *vma, void *cpu_addr,
200 void *cpu_addr, size_t size, int *ret) in dma_mmap_from_global_coherent() argument
207 void *cpu_addr, dma_addr_t dma_addr, size_t size,
210 void *cpu_addr, dma_addr_t dma_addr, size_t size,
217 struct page **dma_common_find_pages(void *cpu_addr);
222 void dma_common_free_remap(void *cpu_addr, size_t size);
225 void **cpu_addr, gfp_t flags,
247 void arch_dma_free(struct device *dev, size_t size, void *cpu_addr,
Ddma-mapping.h127 void dma_free_attrs(struct device *dev, size_t size, void *cpu_addr,
134 void *cpu_addr, dma_addr_t dma_addr, size_t size,
137 void *cpu_addr, dma_addr_t dma_addr, size_t size,
203 static void dma_free_attrs(struct device *dev, size_t size, void *cpu_addr, in dma_free_attrs() argument
217 struct sg_table *sgt, void *cpu_addr, dma_addr_t dma_addr, in dma_get_sgtable_attrs() argument
223 void *cpu_addr, dma_addr_t dma_addr, size_t size, in dma_mmap_attrs() argument
401 void *cpu_addr, dma_addr_t dma_handle) in dma_free_coherent() argument
403 return dma_free_attrs(dev, size, cpu_addr, dma_handle, 0); in dma_free_coherent()
546 void *cpu_addr, dma_addr_t dma_addr) in dma_free_wc() argument
548 return dma_free_attrs(dev, size, cpu_addr, dma_addr, in dma_free_wc()
[all …]
/kernel/linux/linux-5.10/arch/mips/pci/
Dpci-legacy.c155 range.cpu_addr, in pci_load_of_ranges()
156 range.cpu_addr + range.size - 1); in pci_load_of_ranges()
158 (unsigned long)ioremap(range.cpu_addr, in pci_load_of_ranges()
164 range.cpu_addr, in pci_load_of_ranges()
165 range.cpu_addr + range.size - 1); in pci_load_of_ranges()
172 res->start = range.cpu_addr; in pci_load_of_ranges()
173 res->end = range.cpu_addr + range.size - 1; in pci_load_of_ranges()
/kernel/linux/linux-5.10/drivers/media/common/saa7146/
Dsaa7146_core.c415 dev->d_rps0.cpu_addr = pci_zalloc_consistent(pci, SAA7146_RPS_MEM, in saa7146_init_one()
417 if (!dev->d_rps0.cpu_addr) in saa7146_init_one()
420 dev->d_rps1.cpu_addr = pci_zalloc_consistent(pci, SAA7146_RPS_MEM, in saa7146_init_one()
422 if (!dev->d_rps1.cpu_addr) in saa7146_init_one()
425 dev->d_i2c.cpu_addr = pci_zalloc_consistent(pci, SAA7146_RPS_MEM, in saa7146_init_one()
427 if (!dev->d_i2c.cpu_addr) in saa7146_init_one()
474 pci_free_consistent(pci, SAA7146_RPS_MEM, dev->d_i2c.cpu_addr, in saa7146_init_one()
477 pci_free_consistent(pci, SAA7146_RPS_MEM, dev->d_rps1.cpu_addr, in saa7146_init_one()
480 pci_free_consistent(pci, SAA7146_RPS_MEM, dev->d_rps0.cpu_addr, in saa7146_init_one()
503 { dev->d_i2c.cpu_addr, dev->d_i2c.dma_handle }, in saa7146_remove_one()
[all …]
/kernel/linux/linux-5.10/arch/arm/include/asm/
Ddma-mapping.h51 extern void arm_dma_free(struct device *dev, size_t size, void *cpu_addr,
68 void *cpu_addr, dma_addr_t dma_addr, size_t size,
124 void *cpu_addr, dma_addr_t dma_addr, size_t size,
/kernel/linux/linux-5.10/arch/sparc/kernel/
Dioport.c267 bool sparc_dma_free_resource(void *cpu_addr, size_t size) in sparc_dma_free_resource() argument
269 unsigned long addr = (unsigned long)cpu_addr; in sparc_dma_free_resource()
274 printk("%s: cannot free %p\n", __func__, cpu_addr); in sparc_dma_free_resource()
279 printk("%s: unaligned va %p\n", __func__, cpu_addr); in sparc_dma_free_resource()
356 void arch_dma_free(struct device *dev, size_t size, void *cpu_addr, in arch_dma_free() argument
361 if (!sparc_dma_free_resource(cpu_addr, size)) in arch_dma_free()
365 srmmu_unmapiorange((unsigned long)cpu_addr, size); in arch_dma_free()
/kernel/linux/linux-5.10/drivers/dma/
Dst_fdma.h185 readl((fchan)->fdev->slim_rproc->mem[ST_SLIM_DMEM].cpu_addr \
190 writel((val), (fchan)->fdev->slim_rproc->mem[ST_SLIM_DMEM].cpu_addr \
197 writel((val), (fchan)->fdev->slim_rproc->mem[ST_SLIM_DMEM].cpu_addr \
207 readl((fchan)->fdev->slim_rproc->mem[ST_SLIM_DMEM].cpu_addr \
212 writel((val), (fchan)->fdev->slim_rproc->mem[ST_SLIM_DMEM].cpu_addr \
/kernel/linux/linux-5.10/arch/alpha/kernel/
Dpci_iommu.c259 pci_map_single_1(struct pci_dev *pdev, void *cpu_addr, size_t size, in pci_map_single_1() argument
271 paddr = __pa(cpu_addr); in pci_map_single_1()
280 cpu_addr, size, ret, __builtin_return_address(0)); in pci_map_single_1()
291 cpu_addr, size, ret, __builtin_return_address(0)); in pci_map_single_1()
325 ret += (unsigned long)cpu_addr & ~PAGE_MASK; in pci_map_single_1()
328 cpu_addr, size, npages, ret, __builtin_return_address(0)); in pci_map_single_1()
447 void *cpu_addr; in alpha_pci_alloc_coherent() local
453 cpu_addr = (void *)__get_free_pages(gfp | __GFP_ZERO, order); in alpha_pci_alloc_coherent()
454 if (! cpu_addr) { in alpha_pci_alloc_coherent()
462 memset(cpu_addr, 0, size); in alpha_pci_alloc_coherent()
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/amd/amdgpu/
Damdgpu_fence.c103 if (drv->cpu_addr) in amdgpu_fence_write()
104 *drv->cpu_addr = cpu_to_le32(seq); in amdgpu_fence_write()
120 if (drv->cpu_addr) in amdgpu_fence_read()
121 seq = le32_to_cpu(*drv->cpu_addr); in amdgpu_fence_read()
410 ring->fence_drv.cpu_addr = &adev->wb.wb[ring->fence_offs]; in amdgpu_fence_driver_start_ring()
415 ring->fence_drv.cpu_addr = adev->uvd.inst[ring->me].cpu_addr + index; in amdgpu_fence_driver_start_ring()
455 ring->fence_drv.cpu_addr = NULL; in amdgpu_fence_driver_init_ring()
733 le32_to_cpu(*(ring->fence_drv.cpu_addr + 2))); in amdgpu_debugfs_fence_info()
736 le32_to_cpu(*(ring->fence_drv.cpu_addr + 4))); in amdgpu_debugfs_fence_info()
739 le32_to_cpu(*(ring->fence_drv.cpu_addr + 6))); in amdgpu_debugfs_fence_info()
/kernel/linux/linux-5.10/drivers/of/
Daddress.c281 err = pci_register_io_range(&np->fwnode, range->cpu_addr, in of_pci_range_to_resource()
285 port = pci_address_to_pio(range->cpu_addr); in of_pci_range_to_resource()
293 upper_32_bits(range->cpu_addr)) { in of_pci_range_to_resource()
298 res->start = range->cpu_addr; in of_pci_range_to_resource()
771 range->cpu_addr = of_translate_dma_address(parser->node, in of_pci_range_parser_one()
774 range->cpu_addr = of_translate_address(parser->node, in of_pci_range_parser_one()
783 u64 bus_addr, cpu_addr, size; in of_pci_range_parser_one() local
788 cpu_addr = of_translate_dma_address(parser->node, in of_pci_range_parser_one()
791 cpu_addr = of_translate_address(parser->node, in of_pci_range_parser_one()
798 cpu_addr != range->cpu_addr + range->size) in of_pci_range_parser_one()
[all …]

1234567