/drivers/staging/android/ion/ |
D | ion_cma_heap.c | 37 void *cpu_addr; member 62 info->cpu_addr = dma_alloc_coherent(dev, len, &(info->handle), in ion_cma_allocate() 65 if (!info->cpu_addr) { in ion_cma_allocate() 74 if (dma_get_sgtable(dev, info->table, info->cpu_addr, info->handle, in ion_cma_allocate() 84 dma_free_coherent(dev, len, info->cpu_addr, info->handle); in ion_cma_allocate() 97 dma_free_coherent(dev, buffer->size, info->cpu_addr, info->handle); in ion_cma_free() 141 return dma_mmap_coherent(dev, vma, info->cpu_addr, info->handle, in ion_cma_mmap() 150 return info->cpu_addr; in ion_cma_map_kernel()
|
/drivers/base/ |
D | dma-mapping.c | 229 void *cpu_addr, dma_addr_t handle, size_t size) in dma_common_get_sgtable() argument 231 struct page *page = virt_to_page(cpu_addr); in dma_common_get_sgtable() 247 void *cpu_addr, dma_addr_t dma_addr, size_t size) in dma_common_mmap() argument 253 unsigned long pfn = page_to_pfn(virt_to_page(cpu_addr)); in dma_common_mmap() 258 if (dma_mmap_from_coherent(dev, vma, cpu_addr, size, &ret)) in dma_common_mmap() 329 void dma_common_free_remap(void *cpu_addr, size_t size, unsigned long vm_flags) in dma_common_free_remap() argument 331 struct vm_struct *area = find_vm_area(cpu_addr); in dma_common_free_remap() 334 WARN(1, "trying to free invalid coherent area: %p\n", cpu_addr); in dma_common_free_remap() 338 unmap_kernel_range((unsigned long)cpu_addr, PAGE_ALIGN(size)); in dma_common_free_remap() 339 vunmap(cpu_addr); in dma_common_free_remap()
|
/drivers/media/common/saa7146/ |
D | saa7146_core.c | 427 dev->d_rps0.cpu_addr = pci_zalloc_consistent(pci, SAA7146_RPS_MEM, in saa7146_init_one() 429 if (!dev->d_rps0.cpu_addr) in saa7146_init_one() 432 dev->d_rps1.cpu_addr = pci_zalloc_consistent(pci, SAA7146_RPS_MEM, in saa7146_init_one() 434 if (!dev->d_rps1.cpu_addr) in saa7146_init_one() 437 dev->d_i2c.cpu_addr = pci_zalloc_consistent(pci, SAA7146_RPS_MEM, in saa7146_init_one() 439 if (!dev->d_i2c.cpu_addr) in saa7146_init_one() 486 pci_free_consistent(pci, SAA7146_RPS_MEM, dev->d_i2c.cpu_addr, in saa7146_init_one() 489 pci_free_consistent(pci, SAA7146_RPS_MEM, dev->d_rps1.cpu_addr, in saa7146_init_one() 492 pci_free_consistent(pci, SAA7146_RPS_MEM, dev->d_rps0.cpu_addr, in saa7146_init_one() 515 { dev->d_i2c.cpu_addr, dev->d_i2c.dma_handle }, in saa7146_remove_one() [all …]
|
/drivers/net/wireless/ath/wcn36xx/ |
D | dxe.c | 182 wcn_ch->cpu_addr = dma_alloc_coherent(dev, size, &wcn_ch->dma_addr, in wcn36xx_dxe_init_descs() 184 if (!wcn_ch->cpu_addr) in wcn36xx_dxe_init_descs() 187 memset(wcn_ch->cpu_addr, 0, size); in wcn36xx_dxe_init_descs() 189 cur_dxe = (struct wcn36xx_dxe_desc *)wcn_ch->cpu_addr; in wcn36xx_dxe_init_descs() 538 void *cpu_addr; in wcn36xx_dxe_allocate_mem_pools() local 547 cpu_addr = dma_alloc_coherent(wcn->dev, s, &wcn->mgmt_mem_pool.phy_addr, in wcn36xx_dxe_allocate_mem_pools() 549 if (!cpu_addr) in wcn36xx_dxe_allocate_mem_pools() 552 wcn->mgmt_mem_pool.virt_addr = cpu_addr; in wcn36xx_dxe_allocate_mem_pools() 553 memset(cpu_addr, 0, s); in wcn36xx_dxe_allocate_mem_pools() 562 cpu_addr = dma_alloc_coherent(wcn->dev, s, &wcn->data_mem_pool.phy_addr, in wcn36xx_dxe_allocate_mem_pools() [all …]
|
/drivers/pci/host/ |
D | pci-xgene.c | 264 u64 cpu_addr, u64 pci_addr) in xgene_pcie_setup_ob_reg() argument 286 writel(lower_32_bits(cpu_addr), base); in xgene_pcie_setup_ob_reg() 287 writel(upper_32_bits(cpu_addr), base + 0x04); in xgene_pcie_setup_ob_reg() 386 u64 cpu_addr = range->cpu_addr; in xgene_pcie_setup_ib_reg() local 403 bar_low = pcie_bar_low_val((u32)cpu_addr, flags); in xgene_pcie_setup_ib_reg() 409 writel(upper_32_bits(cpu_addr), bar_addr + 0x4); in xgene_pcie_setup_ib_reg() 421 writel(upper_32_bits(cpu_addr), bar_addr + 0x4); in xgene_pcie_setup_ib_reg() 464 u64 end = range.cpu_addr + range.size - 1; in xgene_pcie_parse_map_dma_ranges() 467 range.flags, range.cpu_addr, end, range.pci_addr); in xgene_pcie_parse_map_dma_ranges()
|
D | pcie-designware.c | 155 int type, u64 cpu_addr, u64 pci_addr, u32 size) in dw_pcie_prog_outbound_atu() argument 159 dw_pcie_writel_rc(pp, lower_32_bits(cpu_addr), PCIE_ATU_LOWER_BASE); in dw_pcie_prog_outbound_atu() 160 dw_pcie_writel_rc(pp, upper_32_bits(cpu_addr), PCIE_ATU_UPPER_BASE); in dw_pcie_prog_outbound_atu() 161 dw_pcie_writel_rc(pp, lower_32_bits(cpu_addr + size - 1), in dw_pcie_prog_outbound_atu() 571 u64 cpu_addr; in dw_pcie_rd_other_conf() local 579 cpu_addr = pp->cfg0_base; in dw_pcie_rd_other_conf() 584 cpu_addr = pp->cfg1_base; in dw_pcie_rd_other_conf() 590 type, cpu_addr, in dw_pcie_rd_other_conf() 605 u64 cpu_addr; in dw_pcie_wr_other_conf() local 613 cpu_addr = pp->cfg0_base; in dw_pcie_wr_other_conf() [all …]
|
D | pcie-rcar.c | 825 u64 cpu_addr = range->cpu_addr; in rcar_pcie_inbound_ranges() local 826 u64 cpu_end = range->cpu_addr + range->size; in rcar_pcie_inbound_ranges() 840 if (cpu_addr > 0) { in rcar_pcie_inbound_ranges() 841 unsigned long nr_zeros = __ffs64(cpu_addr); in rcar_pcie_inbound_ranges() 854 while (cpu_addr < cpu_end) { in rcar_pcie_inbound_ranges() 860 rcar_pci_write_reg(pcie, lower_32_bits(cpu_addr), PCIELAR(idx)); in rcar_pcie_inbound_ranges() 864 rcar_pci_write_reg(pcie, upper_32_bits(cpu_addr), PCIELAR(idx+1)); in rcar_pcie_inbound_ranges() 868 cpu_addr += size; in rcar_pcie_inbound_ranges() 912 u64 end = range.cpu_addr + range.size - 1; in rcar_pcie_parse_map_dma_ranges() 914 range.flags, range.cpu_addr, end, range.pci_addr); in rcar_pcie_parse_map_dma_ranges()
|
/drivers/staging/rdma/hfi1/ |
D | dma.c | 71 static u64 hfi1_dma_map_single(struct ib_device *dev, void *cpu_addr, in hfi1_dma_map_single() argument 77 return (u64) cpu_addr; in hfi1_dma_map_single() 169 void *cpu_addr, u64 dma_handle) in hfi1_dma_free_coherent() argument 171 free_pages((unsigned long) cpu_addr, get_order(size)); in hfi1_dma_free_coherent()
|
/drivers/infiniband/hw/qib/ |
D | qib_dma.c | 53 static u64 qib_dma_map_single(struct ib_device *dev, void *cpu_addr, in qib_dma_map_single() argument 57 return (u64) cpu_addr; in qib_dma_map_single() 152 void *cpu_addr, u64 dma_handle) in qib_dma_free_coherent() argument 154 free_pages((unsigned long) cpu_addr, get_order(size)); in qib_dma_free_coherent()
|
/drivers/staging/rdma/ipath/ |
D | ipath_dma.c | 56 void *cpu_addr, size_t size, in ipath_dma_map_single() argument 60 return (u64) cpu_addr; in ipath_dma_map_single() 162 void *cpu_addr, u64 dma_handle) in ipath_dma_free_coherent() argument 164 free_pages((unsigned long) cpu_addr, get_order(size)); in ipath_dma_free_coherent()
|
/drivers/remoteproc/ |
D | wkup_m3_rproc.c | 43 void __iomem *cpu_addr; member 106 va = (__force void *)(wkupm3->mem[i].cpu_addr + offset); in wkup_m3_rproc_da_to_va() 176 wkupm3->mem[i].cpu_addr = devm_ioremap_resource(dev, res); in wkup_m3_rproc_probe() 177 if (IS_ERR(wkupm3->mem[i].cpu_addr)) { in wkup_m3_rproc_probe() 180 ret = PTR_ERR(wkupm3->mem[i].cpu_addr); in wkup_m3_rproc_probe()
|
/drivers/gpu/drm/amd/amdgpu/ |
D | amdgpu_fence.c | 65 if (drv->cpu_addr) in amdgpu_fence_write() 66 *drv->cpu_addr = cpu_to_le32(seq); in amdgpu_fence_write() 82 if (drv->cpu_addr) in amdgpu_fence_read() 83 seq = le32_to_cpu(*drv->cpu_addr); in amdgpu_fence_read() 442 ring->fence_drv.cpu_addr = &adev->wb.wb[ring->fence_offs]; in amdgpu_fence_driver_start_ring() 447 ring->fence_drv.cpu_addr = adev->uvd.cpu_addr + index; in amdgpu_fence_driver_start_ring() 459 ring->fence_drv.gpu_addr, ring->fence_drv.cpu_addr); in amdgpu_fence_driver_start_ring() 476 ring->fence_drv.cpu_addr = NULL; in amdgpu_fence_driver_init_ring()
|
/drivers/gpu/drm/radeon/ |
D | radeon_fence.c | 66 if (drv->cpu_addr) { in radeon_fence_write() 67 *drv->cpu_addr = cpu_to_le32(seq); in radeon_fence_write() 89 if (drv->cpu_addr) { in radeon_fence_read() 90 seq = le32_to_cpu(*drv->cpu_addr); in radeon_fence_read() 811 rdev->fence_drv[ring].cpu_addr = &rdev->wb.wb[index/4]; in radeon_fence_driver_start_ring() 818 rdev->fence_drv[ring].cpu_addr = rdev->uvd.cpu_addr + index; in radeon_fence_driver_start_ring() 831 rdev->fence_drv[ring].cpu_addr = &rdev->wb.wb[index/4]; in radeon_fence_driver_start_ring() 837 ring, rdev->fence_drv[ring].gpu_addr, rdev->fence_drv[ring].cpu_addr); in radeon_fence_driver_start_ring() 856 rdev->fence_drv[ring].cpu_addr = NULL; in radeon_fence_driver_init_ring()
|
D | radeon_vce.c | 223 void *cpu_addr; in radeon_vce_resume() local 235 r = radeon_bo_kmap(rdev->vce.vcpu_bo, &cpu_addr); in radeon_vce_resume() 242 memset(cpu_addr, 0, radeon_bo_size(rdev->vce.vcpu_bo)); in radeon_vce_resume() 244 r = vce_v1_0_load_fw(rdev, cpu_addr); in radeon_vce_resume() 246 memcpy(cpu_addr, rdev->vce_fw->data, rdev->vce_fw->size); in radeon_vce_resume()
|
D | radeon_uvd.c | 167 r = radeon_bo_kmap(rdev->uvd.vcpu_bo, &rdev->uvd.cpu_addr); in radeon_uvd_init() 245 memcpy_toio((void __iomem *)rdev->uvd.cpu_addr, rdev->uvd_fw->data, rdev->uvd_fw->size); in radeon_uvd_resume() 250 ptr = rdev->uvd.cpu_addr; in radeon_uvd_resume() 735 uint32_t *msg = rdev->uvd.cpu_addr + offs; in radeon_uvd_get_create_msg() 771 uint32_t *msg = rdev->uvd.cpu_addr + offs; in radeon_uvd_get_destroy_msg()
|
/drivers/of/ |
D | of_pci.c | 215 range.cpu_addr, range.cpu_addr + range.size - 1, in of_pci_get_host_bridge_resources() 222 if (range.cpu_addr == OF_BAD_ADDR || range.size == 0) in of_pci_get_host_bridge_resources() 247 *io_base = range.cpu_addr; in of_pci_get_host_bridge_resources()
|
D | address.c | 266 range->cpu_addr = of_translate_address(parser->node, in of_pci_range_parser_one() 275 u64 pci_addr, cpu_addr, size; in of_pci_range_parser_one() local 280 cpu_addr = of_translate_address(parser->node, in of_pci_range_parser_one() 287 cpu_addr != range->cpu_addr + range->size) in of_pci_range_parser_one() 323 err = pci_register_io_range(range->cpu_addr, range->size); in of_pci_range_to_resource() 326 port = pci_address_to_pio(range->cpu_addr); in of_pci_range_to_resource() 334 upper_32_bits(range->cpu_addr)) { in of_pci_range_to_resource() 339 res->start = range->cpu_addr; in of_pci_range_to_resource()
|
/drivers/isdn/hardware/eicon/ |
D | divasmain.c | 358 void *cpu_addr; in diva_init_dma_map() local 362 if (!(cpu_addr = diva_pci_alloc_consistent(pdev, in diva_init_dma_map() 369 diva_init_dma_map_entry(pmap, i, cpu_addr, in diva_init_dma_map() 373 i, (unsigned long) cpu_addr, in diva_init_dma_map() 390 void *cpu_addr; in diva_free_dma_map() local 395 diva_get_dma_map_entry(pmap, i, &cpu_addr, &phys_addr); in diva_free_dma_map() 396 if (!cpu_addr) { in diva_free_dma_map() 404 (unsigned long) cpu_addr, (dword) dma_handle, in diva_free_dma_map()
|
/drivers/media/pci/smipcie/ |
D | smipcie-main.c | 323 port->cpu_addr[0], (finishedData / 188)); in smi_dma_xfer() 346 port->cpu_addr[1], (finishedData / 188)); in smi_dma_xfer() 362 if (port->cpu_addr[0]) { in smi_port_dma_free() 364 port->cpu_addr[0], port->dma_addr[0]); in smi_port_dma_free() 365 port->cpu_addr[0] = NULL; in smi_port_dma_free() 367 if (port->cpu_addr[1]) { in smi_port_dma_free() 369 port->cpu_addr[1], port->dma_addr[1]); in smi_port_dma_free() 370 port->cpu_addr[1] = NULL; in smi_port_dma_free() 410 port->cpu_addr[0] = pci_alloc_consistent(port->dev->pci_dev, in smi_port_init() 413 if (!port->cpu_addr[0]) { in smi_port_init() [all …]
|
/drivers/scsi/ |
D | 3w-xxxx.c | 834 unsigned long *cpu_addr = NULL; in tw_allocate_memory() local 838 cpu_addr = pci_alloc_consistent(tw_dev->tw_pci_dev, size*TW_Q_LENGTH, &dma_handle); in tw_allocate_memory() 839 if (cpu_addr == NULL) { in tw_allocate_memory() 844 …if ((unsigned long)cpu_addr % (tw_dev->tw_pci_dev->device == TW_DEVICE_ID ? TW_ALIGNMENT_6000 : TW… in tw_allocate_memory() 846 pci_free_consistent(tw_dev->tw_pci_dev, size*TW_Q_LENGTH, cpu_addr, dma_handle); in tw_allocate_memory() 850 memset(cpu_addr, 0, size*TW_Q_LENGTH); in tw_allocate_memory() 856 …tw_dev->command_packet_virtual_address[i] = (unsigned long *)((unsigned char *)cpu_addr + (i*size)… in tw_allocate_memory() 860 tw_dev->alignment_virtual_address[i] = (unsigned long *)((unsigned char *)cpu_addr + (i*size)); in tw_allocate_memory() 881 unsigned long *cpu_addr; in tw_chrdev_ioctl() local 912 …cpu_addr = dma_alloc_coherent(&tw_dev->tw_pci_dev->dev, data_buffer_length_adjusted+sizeof(TW_New_… in tw_chrdev_ioctl() [all …]
|
D | 3w-sas.c | 650 unsigned long *cpu_addr; in twl_allocate_memory() local 653 cpu_addr = pci_zalloc_consistent(tw_dev->tw_pci_dev, size * TW_Q_LENGTH, in twl_allocate_memory() 655 if (!cpu_addr) { in twl_allocate_memory() 664 tw_dev->command_packet_virt[i] = (TW_Command_Full *)((unsigned char *)cpu_addr + (i*size)); in twl_allocate_memory() 668 tw_dev->generic_buffer_virt[i] = (unsigned long *)((unsigned char *)cpu_addr + (i*size)); in twl_allocate_memory() 672 … tw_dev->sense_buffer_virt[i] = (TW_Command_Apache_Header *)((unsigned char *)cpu_addr + (i*size)); in twl_allocate_memory() 722 unsigned long *cpu_addr, data_buffer_length_adjusted = 0, flags = 0; in twl_chrdev_ioctl() local 755 …cpu_addr = dma_alloc_coherent(&tw_dev->tw_pci_dev->dev, data_buffer_length_adjusted+sizeof(TW_Ioct… in twl_chrdev_ioctl() 756 if (!cpu_addr) { in twl_chrdev_ioctl() 761 tw_ioctl = (TW_Ioctl_Buf_Apache *)cpu_addr; in twl_chrdev_ioctl() [all …]
|
D | 3w-9xxx.c | 524 unsigned long *cpu_addr; in twa_allocate_memory() local 527 cpu_addr = pci_alloc_consistent(tw_dev->tw_pci_dev, size*TW_Q_LENGTH, &dma_handle); in twa_allocate_memory() 528 if (!cpu_addr) { in twa_allocate_memory() 533 if ((unsigned long)cpu_addr % (TW_ALIGNMENT_9000)) { in twa_allocate_memory() 535 pci_free_consistent(tw_dev->tw_pci_dev, size*TW_Q_LENGTH, cpu_addr, dma_handle); in twa_allocate_memory() 539 memset(cpu_addr, 0, size*TW_Q_LENGTH); in twa_allocate_memory() 545 tw_dev->command_packet_virt[i] = (TW_Command_Full *)((unsigned char *)cpu_addr + (i*size)); in twa_allocate_memory() 549 tw_dev->generic_buffer_virt[i] = (unsigned long *)((unsigned char *)cpu_addr + (i*size)); in twa_allocate_memory() 643 unsigned long *cpu_addr, data_buffer_length_adjusted = 0, flags = 0; in twa_chrdev_ioctl() local 682 …cpu_addr = dma_alloc_coherent(&tw_dev->tw_pci_dev->dev, data_buffer_length_adjusted+sizeof(TW_Ioct… in twa_chrdev_ioctl() [all …]
|
/drivers/net/caif/ |
D | caif_spi.c | 87 static inline void dma_free(void *cpu_addr, dma_addr_t handle) in dma_free() argument 89 kfree(cpu_addr); in dma_free() 100 static inline void dma_free(void *cpu_addr, dma_addr_t handle) in dma_free() argument 102 dma_free_coherent(NULL, SPI_DMA_BUF_LEN, cpu_addr, handle); in dma_free()
|
/drivers/crypto/ |
D | img-hash.c | 123 void __iomem *cpu_addr; member 203 writel_relaxed(buffer[count], hdev->cpu_addr); in img_hash_xmit_cpu() 915 hdev->cpu_addr = devm_ioremap_resource(dev, hash_res); in img_hash_probe() 916 if (IS_ERR(hdev->cpu_addr)) { in img_hash_probe() 918 err = PTR_ERR(hdev->cpu_addr); in img_hash_probe()
|
/drivers/xen/ |
D | swiotlb-xen.c | 697 void *cpu_addr, dma_addr_t dma_addr, size_t size, in xen_swiotlb_dma_mmap() argument 702 return __generic_dma_ops(dev)->mmap(dev, vma, cpu_addr, in xen_swiotlb_dma_mmap() 705 return dma_common_mmap(dev, vma, cpu_addr, dma_addr, size); in xen_swiotlb_dma_mmap()
|