/Linux-v4.19/arch/powerpc/include/asm/ |
D | iommu.h | 40 #define IOMMU_PAGE_SIZE(tblptr) (ASM_CONST(1) << (tblptr)->it_page_shift) 41 #define IOMMU_PAGE_MASK(tblptr) (~((1 << (tblptr)->it_page_shift) - 1)) 121 unsigned long it_page_shift;/* table iommu page size */ member 138 return __ilog2((size - 1) >> tbl->it_page_shift) + 1; in get_iommu_order() 312 (iommu_tce_check_ioba((tbl)->it_page_shift, \ 316 (iommu_tce_check_ioba((tbl)->it_page_shift, \ 319 iommu_tce_check_gpa((tbl)->it_page_shift, (gpa)))
|
/Linux-v4.19/arch/powerpc/kernel/ |
D | iommu.c | 253 1 << tbl->it_page_shift); in iommu_range_alloc() 255 boundary_size = ALIGN(1UL << 32, 1 << tbl->it_page_shift); in iommu_range_alloc() 259 boundary_size >> tbl->it_page_shift, align_mask); in iommu_range_alloc() 321 ret = entry << tbl->it_page_shift; /* Set the return dma address */ in iommu_alloc() 353 entry = dma_addr >> tbl->it_page_shift; in iommu_free_check() 402 entry = dma_addr >> tbl->it_page_shift; in __iommu_free() 471 if (tbl->it_page_shift < PAGE_SHIFT && slen >= PAGE_SIZE && in ppc_iommu_map_sg() 473 align = PAGE_SHIFT - tbl->it_page_shift; in ppc_iommu_map_sg() 475 mask >> tbl->it_page_shift, align); in ppc_iommu_map_sg() 491 dma_addr = entry << tbl->it_page_shift; in ppc_iommu_map_sg() [all …]
|
D | dma-iommu.c | 87 if (tbl->it_offset > (mask >> tbl->it_page_shift)) { in dma_iommu_dma_supported() 90 mask, tbl->it_offset << tbl->it_page_shift); in dma_iommu_dma_supported()
|
/Linux-v4.19/drivers/vfio/ |
D | vfio_iommu_spapr_tce.c | 238 unsigned long entry = ioba >> tbl->it_page_shift; in tce_iommu_find_table() 453 tbl->it_page_shift, &hpa, &mem); in tce_iommu_unuse_page_v2() 526 if (!tce_page_is_contained(page, tbl->it_page_shift)) { in tce_iommu_build() 537 __func__, entry << tbl->it_page_shift, in tce_iommu_build() 569 tce, tbl->it_page_shift, &hpa, &mem); in tce_iommu_build_v2() 574 if (!tce_page_is_contained(page, tbl->it_page_shift)) { in tce_iommu_build_v2() 592 __func__, entry << tbl->it_page_shift, in tce_iommu_build_v2() 699 *start_addr = tbl->it_offset << tbl->it_page_shift; in tce_iommu_create_window() 912 param.iova >> tbl->it_page_shift, in tce_iommu_ioctl() 914 param.size >> tbl->it_page_shift, in tce_iommu_ioctl() [all …]
|
/Linux-v4.19/arch/powerpc/kvm/ |
D | book3s_64_vio.c | 179 if ((tbltmp->it_page_shift <= stt->page_shift) && in kvm_spapr_tce_attach_iommu_group() 180 (tbltmp->it_offset << tbltmp->it_page_shift == in kvm_spapr_tce_attach_iommu_group() 182 (tbltmp->it_size << tbltmp->it_page_shift >= in kvm_spapr_tce_attach_iommu_group() 378 const unsigned long pgsize = 1ULL << tbl->it_page_shift; in kvmppc_tce_iommu_mapped_dec() 421 unsigned long subpages = 1ULL << (stt->page_shift - tbl->it_page_shift); in kvmppc_tce_iommu_unmap() 446 mem = mm_iommu_lookup(kvm->mm, ua, 1ULL << tbl->it_page_shift); in kvmppc_tce_iommu_do_map() 451 if (WARN_ON_ONCE(mm_iommu_ua_to_hpa(mem, ua, tbl->it_page_shift, &hpa))) in kvmppc_tce_iommu_do_map() 477 unsigned long subpages = 1ULL << (stt->page_shift - tbl->it_page_shift); in kvmppc_tce_iommu_map()
|
D | book3s_64_vio_hv.c | 225 const unsigned long pgsize = 1ULL << tbl->it_page_shift; in kvmppc_rm_tce_iommu_mapped_dec() 272 unsigned long subpages = 1ULL << (stt->page_shift - tbl->it_page_shift); in kvmppc_rm_tce_iommu_unmap() 297 mem = mm_iommu_lookup_rm(kvm->mm, ua, 1ULL << tbl->it_page_shift); in kvmppc_rm_tce_iommu_do_map() 301 if (WARN_ON_ONCE_RM(mm_iommu_ua_to_hpa_rm(mem, ua, tbl->it_page_shift, in kvmppc_rm_tce_iommu_do_map() 332 unsigned long subpages = 1ULL << (stt->page_shift - tbl->it_page_shift); in kvmppc_rm_tce_iommu_map()
|
/Linux-v4.19/arch/powerpc/platforms/powernv/ |
D | pci-ioda-tce.c | 26 tbl->it_page_shift = page_shift; in pnv_pci_setup_iommu_table() 27 tbl->it_offset = dma_offset >> tbl->it_page_shift; in pnv_pci_setup_iommu_table() 92 u64 rpn = __pa(uaddr) >> tbl->it_page_shift; in pnv_tce_build() 100 ((rpn + i) << tbl->it_page_shift); in pnv_tce_build()
|
D | npu-dma.c | 208 const __u64 start_addr = tbl->it_offset << tbl->it_page_shift; in pnv_npu_set_window() 209 const __u64 win_size = tbl->it_size << tbl->it_page_shift; in pnv_npu_set_window()
|
D | pci-ioda.c | 2119 unsigned int shift = tbl->it_page_shift; in pnv_pci_ioda2_tce_invalidate() 2366 pe->table_group.tce32_start = tbl->it_offset << tbl->it_page_shift; in pnv_pci_ioda1_setup_dma_pe() 2367 pe->table_group.tce32_size = tbl->it_size << tbl->it_page_shift; in pnv_pci_ioda1_setup_dma_pe() 2401 const __u64 start_addr = tbl->it_offset << tbl->it_page_shift; in pnv_pci_ioda2_set_window() 2402 const __u64 win_size = tbl->it_size << tbl->it_page_shift; in pnv_pci_ioda2_set_window()
|
/Linux-v4.19/arch/powerpc/platforms/pasemi/ |
D | iommu.c | 147 iommu_table_iobmap.it_page_shift = IOBMAP_PAGE_SHIFT; in iommu_table_iobmap_setup() 151 0x80000000 >> iommu_table_iobmap.it_page_shift; in iommu_table_iobmap_setup()
|
/Linux-v4.19/arch/powerpc/platforms/pseries/ |
D | iommu.c | 524 tbl->it_page_shift = IOMMU_PAGE_SHIFT_4K; in iommu_table_setparms() 527 tbl->it_offset = phb->dma_window_base_cur >> tbl->it_page_shift; in iommu_table_setparms() 538 tbl->it_size = phb->dma_window_size >> tbl->it_page_shift; in iommu_table_setparms() 561 tbl->it_page_shift = IOMMU_PAGE_SHIFT_4K; in iommu_table_setparms_lpar() 565 tbl->it_offset = offset >> tbl->it_page_shift; in iommu_table_setparms_lpar() 566 tbl->it_size = size >> tbl->it_page_shift; in iommu_table_setparms_lpar() 663 unsigned long ioba = (unsigned long) index << tbl->it_page_shift; in tce_exchange_pseries()
|
D | vio.c | 1202 tbl->it_page_shift = IOMMU_PAGE_SHIFT_4K; in vio_build_iommu_table() 1203 tbl->it_size = size >> tbl->it_page_shift; in vio_build_iommu_table() 1205 tbl->it_offset = offset >> tbl->it_page_shift; in vio_build_iommu_table()
|
/Linux-v4.19/arch/powerpc/platforms/cell/ |
D | iommu.c | 201 for (i = 0; i < npages; i++, uaddr += (1 << tbl->it_page_shift)) in tce_build_cell() 496 window->table.it_page_shift = IOMMU_PAGE_SHIFT_4K; in cell_iommu_setup_window() 498 (offset >> window->table.it_page_shift) + pte_offset; in cell_iommu_setup_window() 499 window->table.it_size = size >> window->table.it_page_shift; in cell_iommu_setup_window()
|
/Linux-v4.19/arch/powerpc/sysdev/ |
D | dart_iommu.c | 348 iommu_table_dart.it_page_shift = IOMMU_PAGE_SHIFT_4K; in iommu_table_dart_setup()
|