Home
last modified time | relevance | path

Searched refs:it_page_shift (Results 1 – 12 of 12) sorted by relevance

/linux-6.6.21/arch/powerpc/include/asm/
Diommu.h27 #define IOMMU_PAGE_SIZE(tblptr) (ASM_CONST(1) << (tblptr)->it_page_shift)
28 #define IOMMU_PAGE_MASK(tblptr) (~((1 << (tblptr)->it_page_shift) - 1))
110 unsigned long it_page_shift;/* table iommu page size */ member
129 return __ilog2((size - 1) >> tbl->it_page_shift) + 1; in get_iommu_order()
296 (iommu_tce_check_ioba((tbl)->it_page_shift, \
300 (iommu_tce_check_ioba((tbl)->it_page_shift, \
303 iommu_tce_check_gpa((tbl)->it_page_shift, (gpa)))
/linux-6.6.21/drivers/vfio/
Dvfio_iommu_spapr_tce.c181 unsigned int it_page_shift) in tce_page_is_contained() argument
186 if (mm_iommu_is_devmem(mm, hpa, it_page_shift, &size)) in tce_page_is_contained()
187 return size == (1UL << it_page_shift); in tce_page_is_contained()
195 return page_shift(compound_head(page)) >= it_page_shift; in tce_page_is_contained()
212 unsigned long entry = ioba >> tbl->it_page_shift; in tce_iommu_find_table()
422 tbl->it_page_shift, &hpa, &mem); in tce_iommu_unuse_page_v2()
517 tbl->it_page_shift)) { in tce_iommu_build()
529 __func__, entry << tbl->it_page_shift, in tce_iommu_build()
562 tce, tbl->it_page_shift, &hpa, &mem); in tce_iommu_build_v2()
567 tbl->it_page_shift)) { in tce_iommu_build_v2()
[all …]
/linux-6.6.21/arch/powerpc/kernel/
Diommu.c61 debugfs_create_ulong("it_page_shift", 0400, liobn_entry, &tbl->it_page_shift); in iommu_debugfs_add()
289 dma_get_seg_boundary_nr_pages(dev, tbl->it_page_shift), in iommu_range_alloc()
361 ret = entry << tbl->it_page_shift; /* Set the return dma address */ in iommu_alloc()
393 entry = dma_addr >> tbl->it_page_shift; in iommu_free_check()
442 entry = dma_addr >> tbl->it_page_shift; in __iommu_free()
511 if (tbl->it_page_shift < PAGE_SHIFT && slen >= PAGE_SIZE && in ppc_iommu_map_sg()
513 align = PAGE_SHIFT - tbl->it_page_shift; in ppc_iommu_map_sg()
515 mask >> tbl->it_page_shift, align); in ppc_iommu_map_sg()
531 dma_addr = entry << tbl->it_page_shift; in ppc_iommu_map_sg()
746 if ((tbl->it_size << tbl->it_page_shift) >= (1UL * 1024 * 1024 * 1024)) in iommu_init_table()
[all …]
Ddma-iommu.c172 if (tbl->it_offset > (mask >> tbl->it_page_shift)) { in dma_iommu_dma_supported()
175 mask, tbl->it_offset << tbl->it_page_shift); in dma_iommu_dma_supported()
202 tbl->it_page_shift - 1); in dma_iommu_get_required_mask()
/linux-6.6.21/arch/powerpc/kvm/
Dbook3s_64_vio.c147 if ((tbltmp->it_page_shift <= stt->page_shift) && in kvm_spapr_tce_attach_iommu_group()
148 (tbltmp->it_offset << tbltmp->it_page_shift == in kvm_spapr_tce_attach_iommu_group()
150 (tbltmp->it_size << tbltmp->it_page_shift >= in kvm_spapr_tce_attach_iommu_group()
392 long shift = stit->tbl->it_page_shift; in kvmppc_tce_validate()
439 unsigned long subpages = 1ULL << (stt->page_shift - tbl->it_page_shift); in kvmppc_clear_tce()
440 unsigned long io_entry = entry << (stt->page_shift - tbl->it_page_shift); in kvmppc_clear_tce()
454 const unsigned long pgsize = 1ULL << tbl->it_page_shift; in kvmppc_tce_iommu_mapped_dec()
497 unsigned long subpages = 1ULL << (stt->page_shift - tbl->it_page_shift); in kvmppc_tce_iommu_unmap()
524 mem = mm_iommu_lookup(kvm->mm, ua, 1ULL << tbl->it_page_shift); in kvmppc_tce_iommu_do_map()
529 if (WARN_ON_ONCE(mm_iommu_ua_to_hpa(mem, ua, tbl->it_page_shift, &hpa))) in kvmppc_tce_iommu_do_map()
[all …]
/linux-6.6.21/arch/powerpc/platforms/powernv/
Dpci-ioda-tce.c54 tbl->it_page_shift = page_shift; in pnv_pci_setup_iommu_table()
55 tbl->it_offset = dma_offset >> tbl->it_page_shift; in pnv_pci_setup_iommu_table()
129 u64 rpn = __pa(uaddr) >> tbl->it_page_shift; in pnv_tce_build()
137 ((rpn + i) << tbl->it_page_shift); in pnv_tce_build()
Dpci-ioda.c1230 unsigned int shift = tbl->it_page_shift; in pnv_pci_ioda2_tce_invalidate()
1286 const __u64 start_addr = tbl->it_offset << tbl->it_page_shift; in pnv_pci_ioda2_set_window()
1287 const __u64 win_size = tbl->it_size << tbl->it_page_shift; in pnv_pci_ioda2_set_window()
1428 res_start = pe->phb->ioda.m32_pci_base >> tbl->it_page_shift; in pnv_pci_ioda2_setup_default_config()
1429 res_end = min(window_size, SZ_4G) >> tbl->it_page_shift; in pnv_pci_ioda2_setup_default_config()
/linux-6.6.21/arch/powerpc/platforms/pasemi/
Diommu.c136 iommu_table_iobmap.it_page_shift = IOBMAP_PAGE_SHIFT; in iommu_table_iobmap_setup()
140 0x80000000 >> iommu_table_iobmap.it_page_shift; in iommu_table_iobmap_setup()
/linux-6.6.21/arch/powerpc/platforms/pseries/
Diommu.c124 const unsigned long tceshift = tbl->it_page_shift; in tce_build_pSeries()
224 const unsigned long tceshift = tbl->it_page_shift; in tce_buildmulti_pSeriesLP()
325 tbl->it_page_shift, npages); in tce_freemulti_pSeriesLP()
331 (u64)tcenum << tbl->it_page_shift, 0, limit); in tce_freemulti_pSeriesLP()
352 (u64)tcenum << tbl->it_page_shift, &tce_ret); in tce_get_pSeriesLP()
533 tbl->it_page_shift = page_shift; in iommu_table_setparms_common()
668 unsigned long ioba = (unsigned long) index << tbl->it_page_shift; in tce_exchange_pseries()
Dvio.c1191 tbl->it_page_shift = IOMMU_PAGE_SHIFT_4K; in vio_build_iommu_table()
1192 tbl->it_size = size >> tbl->it_page_shift; in vio_build_iommu_table()
1194 tbl->it_offset = offset >> tbl->it_page_shift; in vio_build_iommu_table()
/linux-6.6.21/arch/powerpc/platforms/cell/
Diommu.c190 for (i = 0; i < npages; i++, uaddr += (1 << tbl->it_page_shift)) in tce_build_cell()
485 window->table.it_page_shift = IOMMU_PAGE_SHIFT_4K; in cell_iommu_setup_window()
487 (offset >> window->table.it_page_shift) + pte_offset; in cell_iommu_setup_window()
488 window->table.it_size = size >> window->table.it_page_shift; in cell_iommu_setup_window()
/linux-6.6.21/arch/powerpc/sysdev/
Ddart_iommu.c340 iommu_table_dart.it_page_shift = IOMMU_PAGE_SHIFT_4K; in iommu_table_dart_setup()