Home
last modified time | relevance | path

Searched refs:pgsize_bitmap (Results 1 – 25 of 41) sorted by relevance

12

/linux-6.1.9/drivers/iommu/
Dio-pgtable-arm.c475 if (WARN_ON(!pgsize || (pgsize & cfg->pgsize_bitmap) != pgsize)) in arm_lpae_map_pages()
673 if (WARN_ON(!pgsize || (pgsize & cfg->pgsize_bitmap) != pgsize || !pgcount)) in arm_lpae_unmap_pages()
739 if (cfg->pgsize_bitmap & PAGE_SIZE) in arm_lpae_restrict_pgsizes()
741 else if (cfg->pgsize_bitmap & ~PAGE_MASK) in arm_lpae_restrict_pgsizes()
742 granule = 1UL << __fls(cfg->pgsize_bitmap & ~PAGE_MASK); in arm_lpae_restrict_pgsizes()
743 else if (cfg->pgsize_bitmap & PAGE_MASK) in arm_lpae_restrict_pgsizes()
744 granule = 1UL << __ffs(cfg->pgsize_bitmap & PAGE_MASK); in arm_lpae_restrict_pgsizes()
765 cfg->pgsize_bitmap &= page_sizes; in arm_lpae_restrict_pgsizes()
778 if (!(cfg->pgsize_bitmap & (SZ_4K | SZ_16K | SZ_64K))) in arm_lpae_alloc_pgtable()
791 pg_shift = __ffs(cfg->pgsize_bitmap); in arm_lpae_alloc_pgtable()
[all …]
Dio-pgtable-dart.c130 size_t sz = data->iop.cfg.pgsize_bitmap; in dart_init_pte()
247 if (WARN_ON(pgsize != cfg->pgsize_bitmap)) in dart_map_pages()
307 if (WARN_ON(pgsize != cfg->pgsize_bitmap || !pgcount)) in dart_unmap_pages()
358 iova &= (data->iop.cfg.pgsize_bitmap - 1); in dart_iova_to_phys()
372 pg_shift = __ffs(cfg->pgsize_bitmap); in dart_alloc_pgtable()
412 if (!(cfg->pgsize_bitmap == SZ_4K || cfg->pgsize_bitmap == SZ_16K)) in apple_dart_alloc_pgtable()
Dvirtio-iommu.c48 u64 pgsize_bitmap; member
389 unsigned long granule = 1UL << __ffs(vdomain->domain.pgsize_bitmap); in viommu_domain_map_identity()
668 viommu_page_size = 1UL << __ffs(viommu->pgsize_bitmap); in viommu_domain_finalise()
683 domain->pgsize_bitmap = viommu->pgsize_bitmap; in viommu_domain_finalise()
1105 &viommu->pgsize_bitmap); in viommu_probe()
1107 if (!viommu->pgsize_bitmap) { in viommu_probe()
1145 viommu_ops.pgsize_bitmap = viommu->pgsize_bitmap; in viommu_probe()
1165 dev_info(dev, "page mask: %#llx\n", viommu->pgsize_bitmap); in viommu_probe()
Dmsm_iommu.c345 .pgsize_bitmap = msm_iommu_ops.pgsize_bitmap, in msm_iommu_domain_config()
358 msm_iommu_ops.pgsize_bitmap = priv->cfg.pgsize_bitmap; in msm_iommu_domain_config()
677 .pgsize_bitmap = MSM_IOMMU_PGSIZES,
Dio-pgtable-arm-v7s.c859 cfg->pgsize_bitmap &= SZ_4K | SZ_64K | SZ_1M | SZ_16M; in arm_v7s_alloc_pgtable()
922 WARN_ON(!(size & cfg_cookie->pgsize_bitmap)); in dummy_tlb_flush()
953 .pgsize_bitmap = SZ_4K | SZ_64K | SZ_1M | SZ_16M, in arm_v7s_do_selftests()
985 for_each_set_bit(i, &cfg.pgsize_bitmap, BITS_PER_LONG) { in arm_v7s_do_selftests()
1007 size = 1UL << __ffs(cfg.pgsize_bitmap); in arm_v7s_do_selftests()
1025 for_each_set_bit(i, &cfg.pgsize_bitmap, BITS_PER_LONG) { in arm_v7s_do_selftests()
Dmtk_iommu.c588 dom->domain.pgsize_bitmap = m4u_dom->cfg.pgsize_bitmap; in mtk_iommu_domain_finalise()
596 .pgsize_bitmap = mtk_iommu_ops.pgsize_bitmap, in mtk_iommu_domain_finalise()
616 dom->domain.pgsize_bitmap = dom->cfg.pgsize_bitmap; in mtk_iommu_domain_finalise()
936 .pgsize_bitmap = SZ_4K | SZ_64K | SZ_1M | SZ_16M,
Dapple-dart.c430 .pgsize_bitmap = dart->pgsize, in apple_dart_finalize_domain()
444 domain->pgsize_bitmap = pgtbl_cfg.pgsize_bitmap; in apple_dart_finalize_domain()
779 .pgsize_bitmap = -1UL, /* Restricted during dart probe */
Diommu.c873 BUG_ON(!domain->pgsize_bitmap); in iommu_create_device_direct_mappings()
875 pg_size = 1UL << __ffs(domain->pgsize_bitmap); in iommu_create_device_direct_mappings()
1912 domain->pgsize_bitmap = bus->iommu_ops->pgsize_bitmap; in __iommu_domain_alloc()
2183 pgsizes = domain->pgsize_bitmap & GENMASK(__fls(size), 0); in iommu_pgsize()
2199 pgsizes = domain->pgsize_bitmap & ~GENMASK(pgsize_idx, 0); in iommu_pgsize()
2263 domain->pgsize_bitmap == 0UL)) in __iommu_map()
2270 min_pagesz = 1 << __ffs(domain->pgsize_bitmap); in __iommu_map()
2363 domain->pgsize_bitmap == 0UL)) in __iommu_unmap()
2370 min_pagesz = 1 << __ffs(domain->pgsize_bitmap); in __iommu_unmap()
Ds390-iommu.c367 .pgsize_bitmap = S390_IOMMU_PGSIZES,
Dtegra-gart.c273 .pgsize_bitmap = GART_IOMMU_PGSIZES,
Dipmmu-vmsa.c438 domain->cfg.pgsize_bitmap = SZ_1G | SZ_2M | SZ_4K; in ipmmu_domain_init_context()
877 .pgsize_bitmap = SZ_1G | SZ_2M | SZ_4K,
/linux-6.1.9/drivers/gpu/drm/nouveau/nvkm/engine/device/
Dtegra.c105 unsigned long pgsize_bitmap; in nvkm_device_tegra_probe_iommu() local
132 pgsize_bitmap = tdev->iommu.domain->pgsize_bitmap; in nvkm_device_tegra_probe_iommu()
133 if (pgsize_bitmap & PAGE_SIZE) { in nvkm_device_tegra_probe_iommu()
136 tdev->iommu.pgshift = fls(pgsize_bitmap & ~PAGE_MASK); in nvkm_device_tegra_probe_iommu()
/linux-6.1.9/drivers/gpu/drm/msm/
Dmsm_iommu.c24 unsigned long pgsize_bitmap; /* Bitmap of page sizes in use */ member
44 pgsizes = pagetable->pgsize_bitmap & GENMASK(__fls(size), 0); in calc_pgsize()
60 pgsizes = pagetable->pgsize_bitmap & ~GENMASK(pgsize_idx, 0); in calc_pgsize()
280 pagetable->pgsize_bitmap = ttbr0_cfg.pgsize_bitmap; in msm_iommu_pagetable_create()
/linux-6.1.9/drivers/iommu/amd/
Dio_pgtable_v2.c257 if (WARN_ON(!pgsize || (pgsize & cfg->pgsize_bitmap) != pgsize) || !pgcount) in iommu_v2_map_pages()
305 if (WARN_ON(!pgsize || (pgsize & cfg->pgsize_bitmap) != pgsize || !pgcount)) in iommu_v2_unmap_pages()
399 cfg->pgsize_bitmap = AMD_IOMMU_PGSIZES_V2, in v2_alloc_pgtable()
Dio_pgtable.c522 cfg->pgsize_bitmap = AMD_IOMMU_PGSIZES, in v1_alloc_pgtable()
/linux-6.1.9/drivers/iommu/arm/arm-smmu/
Darm-smmu-nvidia.c282 smmu->pgsize_bitmap = PAGE_SIZE; in nvidia_smmu_init_context()
283 pgtbl_cfg->pgsize_bitmap = smmu->pgsize_bitmap; in nvidia_smmu_init_context()
Darm-smmu.c750 .pgsize_bitmap = smmu->pgsize_bitmap, in arm_smmu_init_domain_context()
774 domain->pgsize_bitmap = pgtbl_cfg.pgsize_bitmap; in arm_smmu_init_domain_context()
1576 .pgsize_bitmap = -1UL, /* Restricted during device attach */
1848 smmu->pgsize_bitmap |= SZ_4K | SZ_64K | SZ_1M | SZ_16M; in arm_smmu_device_cfg_probe()
1851 smmu->pgsize_bitmap |= SZ_4K | SZ_2M | SZ_1G; in arm_smmu_device_cfg_probe()
1853 smmu->pgsize_bitmap |= SZ_16K | SZ_32M; in arm_smmu_device_cfg_probe()
1855 smmu->pgsize_bitmap |= SZ_64K | SZ_512M; in arm_smmu_device_cfg_probe()
1857 if (arm_smmu_ops.pgsize_bitmap == -1UL) in arm_smmu_device_cfg_probe()
1858 arm_smmu_ops.pgsize_bitmap = smmu->pgsize_bitmap; in arm_smmu_device_cfg_probe()
1860 arm_smmu_ops.pgsize_bitmap |= smmu->pgsize_bitmap; in arm_smmu_device_cfg_probe()
[all …]
Dqcom_iommu.c242 .pgsize_bitmap = qcom_iommu_ops.pgsize_bitmap, in qcom_iommu_init_domain()
260 domain->pgsize_bitmap = pgtbl_cfg.pgsize_bitmap; in qcom_iommu_init_domain()
586 .pgsize_bitmap = SZ_4K | SZ_64K | SZ_1M | SZ_16M,
/linux-6.1.9/drivers/gpu/drm/arm/
Dmalidp_planes.c318 return mmu_dom->pgsize_bitmap; in malidp_get_pgsize_bitmap()
433 (struct malidp_plane_state *ms, u32 *pgsize_bitmap) in malidp_mmu_prefetch_select_mode() argument
438 pgsizes = *pgsize_bitmap & MALIDP_MMU_PREFETCH_FULL_PGSIZES; in malidp_mmu_prefetch_select_mode()
444 *pgsize_bitmap = largest_pgsize; in malidp_mmu_prefetch_select_mode()
452 pgsizes = *pgsize_bitmap & MALIDP_MMU_PREFETCH_PARTIAL_PGSIZES; in malidp_mmu_prefetch_select_mode()
458 *pgsize_bitmap = 1 << __ffs(pgsizes); in malidp_mmu_prefetch_select_mode()
461 *pgsize_bitmap = 0; in malidp_mmu_prefetch_select_mode()
/linux-6.1.9/drivers/vfio/
Dvfio_iommu_type1.c73 uint64_t pgsize_bitmap; member
278 unsigned long pgshift = __ffs(iommu->pgsize_bitmap); in vfio_iommu_populate_bitmap_full()
931 unsigned long pgshift = __ffs(iommu->pgsize_bitmap); in vfio_iommu_type1_pin_pages()
1190 iommu->pgsize_bitmap = ULONG_MAX; in vfio_update_pgsize_bitmap()
1193 iommu->pgsize_bitmap &= domain->domain->pgsize_bitmap; in vfio_update_pgsize_bitmap()
1203 if (iommu->pgsize_bitmap & ~PAGE_MASK) { in vfio_update_pgsize_bitmap()
1204 iommu->pgsize_bitmap &= PAGE_MASK; in vfio_update_pgsize_bitmap()
1205 iommu->pgsize_bitmap |= PAGE_SIZE; in vfio_update_pgsize_bitmap()
1346 pgshift = __ffs(iommu->pgsize_bitmap); in vfio_dma_do_unmap()
1595 pgsize = (size_t)1 << __ffs(iommu->pgsize_bitmap); in vfio_dma_do_map()
[all …]
/linux-6.1.9/drivers/iommu/arm/arm-smmu-v3/
Darm-smmu-v3.c1881 tg = __ffs(smmu_domain->domain.pgsize_bitmap); in __arm_smmu_tlb_inv_range()
2209 .pgsize_bitmap = smmu->pgsize_bitmap, in arm_smmu_domain_finalise()
2221 domain->pgsize_bitmap = pgtbl_cfg.pgsize_bitmap; in arm_smmu_domain_finalise()
2304 stu = __ffs(smmu->pgsize_bitmap); in arm_smmu_enable_ats()
2856 .pgsize_bitmap = -1UL, /* Restricted during device attach */
3567 smmu->pgsize_bitmap |= SZ_64K | SZ_512M; in arm_smmu_device_hw_probe()
3569 smmu->pgsize_bitmap |= SZ_16K | SZ_32M; in arm_smmu_device_hw_probe()
3571 smmu->pgsize_bitmap |= SZ_4K | SZ_2M | SZ_1G; in arm_smmu_device_hw_probe()
3596 smmu->pgsize_bitmap |= 1ULL << 42; /* 4TB */ in arm_smmu_device_hw_probe()
3606 if (arm_smmu_ops.pgsize_bitmap == -1UL) in arm_smmu_device_hw_probe()
[all …]
/linux-6.1.9/drivers/media/platform/nvidia/tegra-vde/
Diommu.c91 order = __ffs(vde->domain->pgsize_bitmap); in tegra_vde_iommu_init()
/linux-6.1.9/include/linux/
Dio-pgtable.h96 unsigned long pgsize_bitmap; member
Diommu.h93 unsigned long pgsize_bitmap; /* Bitmap of page sizes in use */ member
262 unsigned long pgsize_bitmap; member
/linux-6.1.9/include/uapi/linux/
Dvfio.h1191 __u64 pgsize_bitmap; member

12