Home
last modified time | relevance | path

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

12

/linux-6.12.1/drivers/iommu/iommufd/
Dvfio_compat.c359 unsigned long pgsize_bitmap = ULONG_MAX; in iommufd_get_pagesizes() local
365 pgsize_bitmap &= domain->pgsize_bitmap; in iommufd_get_pagesizes()
368 if (pgsize_bitmap & ~PAGE_MASK) { in iommufd_get_pagesizes()
369 pgsize_bitmap &= PAGE_MASK; in iommufd_get_pagesizes()
370 pgsize_bitmap |= PAGE_SIZE; in iommufd_get_pagesizes()
372 pgsize_bitmap = max(pgsize_bitmap, ioas->iopt.iova_alignment); in iommufd_get_pagesizes()
374 return pgsize_bitmap; in iommufd_get_pagesizes()
Dselftest.c292 mock->domain.pgsize_bitmap = MOCK_IO_PAGE_SIZE; in mock_domain_alloc_paging()
294 mock->domain.pgsize_bitmap |= MOCK_HUGE_PAGE_SIZE; in mock_domain_alloc_paging()
460 if (!(domain->pgsize_bitmap & MOCK_HUGE_PAGE_SIZE)) { in mock_domain_unmap_pages()
551 .pgsize_bitmap = MOCK_IO_PAGE_SIZE,
/linux-6.12.1/drivers/iommu/
Dio-pgtable-dart.c125 size_t sz = data->iop.cfg.pgsize_bitmap; in dart_init_pte()
242 if (WARN_ON(pgsize != cfg->pgsize_bitmap)) in dart_map_pages()
301 if (WARN_ON(pgsize != cfg->pgsize_bitmap || !pgcount)) in dart_unmap_pages()
352 iova &= (data->iop.cfg.pgsize_bitmap - 1); in dart_iova_to_phys()
366 pg_shift = __ffs(cfg->pgsize_bitmap); in dart_alloc_pgtable()
406 if (!(cfg->pgsize_bitmap == SZ_4K || cfg->pgsize_bitmap == SZ_16K)) in apple_dart_alloc_pgtable()
Dio-pgtable-arm.c510 if (WARN_ON(!pgsize || (pgsize & cfg->pgsize_bitmap) != pgsize)) in arm_lpae_map_pages()
703 if (WARN_ON(!pgsize || (pgsize & cfg->pgsize_bitmap) != pgsize || !pgcount)) in arm_lpae_unmap_pages()
854 if (cfg->pgsize_bitmap & PAGE_SIZE) in arm_lpae_restrict_pgsizes()
856 else if (cfg->pgsize_bitmap & ~PAGE_MASK) in arm_lpae_restrict_pgsizes()
857 granule = 1UL << __fls(cfg->pgsize_bitmap & ~PAGE_MASK); in arm_lpae_restrict_pgsizes()
858 else if (cfg->pgsize_bitmap & PAGE_MASK) in arm_lpae_restrict_pgsizes()
859 granule = 1UL << __ffs(cfg->pgsize_bitmap & PAGE_MASK); in arm_lpae_restrict_pgsizes()
880 cfg->pgsize_bitmap &= page_sizes; in arm_lpae_restrict_pgsizes()
893 if (!(cfg->pgsize_bitmap & (SZ_4K | SZ_16K | SZ_64K))) in arm_lpae_alloc_pgtable()
906 pg_shift = __ffs(cfg->pgsize_bitmap); in arm_lpae_alloc_pgtable()
[all …]
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()
1147 &viommu->pgsize_bitmap); in viommu_probe()
1149 if (!viommu->pgsize_bitmap) { in viommu_probe()
1187 viommu_ops.pgsize_bitmap = viommu->pgsize_bitmap; in viommu_probe()
1207 dev_info(dev, "page mask: %#llx\n", viommu->pgsize_bitmap); in viommu_probe()
Dio-pgtable-arm-v7s.c843 cfg->pgsize_bitmap &= SZ_4K | SZ_64K | SZ_1M | SZ_16M; in arm_v7s_alloc_pgtable()
906 WARN_ON(!(size & cfg_cookie->pgsize_bitmap)); in dummy_tlb_flush()
937 .pgsize_bitmap = SZ_4K | SZ_64K | SZ_1M | SZ_16M, in arm_v7s_do_selftests()
970 for_each_set_bit(i, &cfg.pgsize_bitmap, BITS_PER_LONG) { in arm_v7s_do_selftests()
993 size = 1UL << __ffs(cfg.pgsize_bitmap); in arm_v7s_do_selftests()
1012 for_each_set_bit(i, &cfg.pgsize_bitmap, BITS_PER_LONG) { in arm_v7s_do_selftests()
Dmsm_iommu.c342 .pgsize_bitmap = msm_iommu_ops.pgsize_bitmap, in msm_iommu_domain_config()
355 msm_iommu_ops.pgsize_bitmap = priv->cfg.pgsize_bitmap; in msm_iommu_domain_config()
695 .pgsize_bitmap = MSM_IOMMU_PGSIZES,
Diommu.c1096 pg_size = domain->pgsize_bitmap ? 1UL << __ffs(domain->pgsize_bitmap) : 0; in iommu_create_device_direct_mappings()
1971 if (!domain->pgsize_bitmap) in __iommu_domain_alloc()
1972 domain->pgsize_bitmap = ops->pgsize_bitmap; in __iommu_domain_alloc()
2397 pgsizes = domain->pgsize_bitmap & GENMASK(__fls(size), 0); in iommu_pgsize()
2413 pgsizes = domain->pgsize_bitmap & ~GENMASK(pgsize_idx, 0); in iommu_pgsize()
2455 if (WARN_ON(!ops->map_pages || domain->pgsize_bitmap == 0UL)) in __iommu_map()
2459 min_pagesz = 1 << __ffs(domain->pgsize_bitmap); in __iommu_map()
2547 if (WARN_ON(!ops->unmap_pages || domain->pgsize_bitmap == 0UL)) in __iommu_unmap()
2551 min_pagesz = 1 << __ffs(domain->pgsize_bitmap); in __iommu_unmap()
Dmtk_iommu.c650 dom->domain.pgsize_bitmap = share_dom->cfg.pgsize_bitmap; in mtk_iommu_domain_finalise()
658 .pgsize_bitmap = mtk_iommu_ops.pgsize_bitmap, in mtk_iommu_domain_finalise()
678 dom->domain.pgsize_bitmap = dom->cfg.pgsize_bitmap; in mtk_iommu_domain_finalise()
1021 .pgsize_bitmap = SZ_4K | SZ_64K | SZ_1M | SZ_16M,
Dapple-dart.c597 .pgsize_bitmap = dart->pgsize, in apple_dart_finalize_domain()
611 dart_domain->domain.pgsize_bitmap = pgtbl_cfg.pgsize_bitmap; in apple_dart_finalize_domain()
989 .pgsize_bitmap = -1UL, /* Restricted during dart probe */
Dipmmu-vmsa.c433 domain->cfg.pgsize_bitmap = SZ_1G | SZ_2M | SZ_4K; in ipmmu_domain_init_context()
885 .pgsize_bitmap = SZ_1G | SZ_2M | SZ_4K,
/linux-6.12.1/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.12.1/drivers/media/pci/intel/ipu6/
Dipu6-mmu.c531 mmu_info->pgsize_bitmap = SZ_4K; in ipu6_mmu_alloc()
622 static size_t ipu6_mmu_pgsize(unsigned long pgsize_bitmap, in ipu6_mmu_pgsize() argument
639 pgsize &= pgsize_bitmap; in ipu6_mmu_pgsize()
657 min_pagesz = 1 << __ffs(mmu_info->pgsize_bitmap); in ipu6_mmu_unmap()
675 size_t pgsize = ipu6_mmu_pgsize(mmu_info->pgsize_bitmap, in ipu6_mmu_unmap()
700 if (mmu_info->pgsize_bitmap == 0UL) in ipu6_mmu_map()
704 min_pagesz = 1 << __ffs(mmu_info->pgsize_bitmap); in ipu6_mmu_map()
722 size_t pgsize = ipu6_mmu_pgsize(mmu_info->pgsize_bitmap, in ipu6_mmu_map()
Dipu6-mmu.h32 unsigned long pgsize_bitmap; member
/linux-6.12.1/drivers/gpu/drm/msm/
Dmsm_iommu.c26 unsigned long pgsize_bitmap; /* Bitmap of page sizes in use */ member
46 pgsizes = pagetable->pgsize_bitmap & GENMASK(__fls(size), 0); in calc_pgsize()
62 pgsizes = pagetable->pgsize_bitmap & ~GENMASK(pgsize_idx, 0); in calc_pgsize()
308 pagetable->pgsize_bitmap = ttbr0_cfg.pgsize_bitmap; in msm_iommu_pagetable_create()
/linux-6.12.1/drivers/iommu/amd/
Dio_pgtable_v2.c246 if (WARN_ON(!pgsize || (pgsize & cfg->pgsize_bitmap) != pgsize) || !pgcount) in iommu_v2_map_pages()
293 if (WARN_ON(!pgsize || (pgsize & cfg->pgsize_bitmap) != pgsize || !pgcount)) in iommu_v2_unmap_pages()
357 cfg->pgsize_bitmap = AMD_IOMMU_PGSIZES_V2; in v2_alloc_pgtable()
/linux-6.12.1/drivers/gpu/drm/arm/
Dmalidp_planes.c309 return mmu_dom->pgsize_bitmap; in malidp_get_pgsize_bitmap()
424 (struct malidp_plane_state *ms, u32 *pgsize_bitmap) in malidp_mmu_prefetch_select_mode() argument
429 pgsizes = *pgsize_bitmap & MALIDP_MMU_PREFETCH_FULL_PGSIZES; in malidp_mmu_prefetch_select_mode()
435 *pgsize_bitmap = largest_pgsize; in malidp_mmu_prefetch_select_mode()
443 pgsizes = *pgsize_bitmap & MALIDP_MMU_PREFETCH_PARTIAL_PGSIZES; in malidp_mmu_prefetch_select_mode()
449 *pgsize_bitmap = 1 << __ffs(pgsizes); in malidp_mmu_prefetch_select_mode()
452 *pgsize_bitmap = 0; in malidp_mmu_prefetch_select_mode()
/linux-6.12.1/drivers/iommu/arm/arm-smmu/
Darm-smmu-nvidia.c280 smmu->pgsize_bitmap &= GENMASK(PAGE_SHIFT, 0); in nvidia_smmu_init_context()
281 pgtbl_cfg->pgsize_bitmap = smmu->pgsize_bitmap; in nvidia_smmu_init_context()
Darm-smmu.c798 .pgsize_bitmap = smmu->pgsize_bitmap, in arm_smmu_init_domain_context()
822 domain->pgsize_bitmap = pgtbl_cfg.pgsize_bitmap; in arm_smmu_init_domain_context()
1650 .pgsize_bitmap = -1UL, /* Restricted during device attach */
1922 smmu->pgsize_bitmap |= SZ_4K | SZ_64K | SZ_1M | SZ_16M; in arm_smmu_device_cfg_probe()
1925 smmu->pgsize_bitmap |= SZ_4K | SZ_2M | SZ_1G; in arm_smmu_device_cfg_probe()
1927 smmu->pgsize_bitmap |= SZ_16K | SZ_32M; in arm_smmu_device_cfg_probe()
1929 smmu->pgsize_bitmap |= SZ_64K | SZ_512M; in arm_smmu_device_cfg_probe()
1931 if (arm_smmu_ops.pgsize_bitmap == -1UL) in arm_smmu_device_cfg_probe()
1932 arm_smmu_ops.pgsize_bitmap = smmu->pgsize_bitmap; in arm_smmu_device_cfg_probe()
1934 arm_smmu_ops.pgsize_bitmap |= smmu->pgsize_bitmap; in arm_smmu_device_cfg_probe()
[all …]
Dqcom_iommu.c232 .pgsize_bitmap = qcom_iommu_ops.pgsize_bitmap, in qcom_iommu_init_domain()
250 domain->pgsize_bitmap = pgtbl_cfg.pgsize_bitmap; in qcom_iommu_init_domain()
601 .pgsize_bitmap = SZ_4K | SZ_64K | SZ_1M | SZ_16M,
/linux-6.12.1/drivers/vfio/
Dvfio_iommu_type1.c72 uint64_t pgsize_bitmap; member
275 unsigned long pgshift = __ffs(iommu->pgsize_bitmap); in vfio_iommu_populate_bitmap_full()
865 unsigned long pgshift = __ffs(iommu->pgsize_bitmap); in vfio_iommu_type1_pin_pages()
1123 iommu->pgsize_bitmap = ULONG_MAX; in vfio_update_pgsize_bitmap()
1126 iommu->pgsize_bitmap &= domain->domain->pgsize_bitmap; in vfio_update_pgsize_bitmap()
1136 if (iommu->pgsize_bitmap & ~PAGE_MASK) { in vfio_update_pgsize_bitmap()
1137 iommu->pgsize_bitmap &= PAGE_MASK; in vfio_update_pgsize_bitmap()
1138 iommu->pgsize_bitmap |= PAGE_SIZE; in vfio_update_pgsize_bitmap()
1285 pgshift = __ffs(iommu->pgsize_bitmap); in vfio_dma_do_unmap()
1567 pgsize = (size_t)1 << __ffs(iommu->pgsize_bitmap); in vfio_dma_do_map()
[all …]
/linux-6.12.1/drivers/iommu/arm/arm-smmu-v3/
Darm-smmu-v3.c2159 tg = __ffs(smmu_domain->domain.pgsize_bitmap); in __arm_smmu_tlb_inv_range()
2419 .pgsize_bitmap = smmu->pgsize_bitmap, in arm_smmu_domain_finalise()
2454 smmu_domain->domain.pgsize_bitmap = pgtbl_cfg.pgsize_bitmap; in arm_smmu_domain_finalise()
2537 stu = __ffs(smmu->pgsize_bitmap); in arm_smmu_enable_ats()
3311 unsigned int stu = __ffs(smmu->pgsize_bitmap); in arm_smmu_probe_device()
3507 .pgsize_bitmap = -1UL, /* Restricted during device attach */
4280 smmu->pgsize_bitmap |= SZ_64K | SZ_512M; in arm_smmu_device_hw_probe()
4282 smmu->pgsize_bitmap |= SZ_16K | SZ_32M; in arm_smmu_device_hw_probe()
4284 smmu->pgsize_bitmap |= SZ_4K | SZ_2M | SZ_1G; in arm_smmu_device_hw_probe()
4309 smmu->pgsize_bitmap |= 1ULL << 42; /* 4TB */ in arm_smmu_device_hw_probe()
[all …]
Darm-smmu-v3-sva.c215 if (!(smmu->pgsize_bitmap & PAGE_SIZE)) in arm_smmu_sva_supported()
/linux-6.12.1/drivers/media/platform/nvidia/tegra-vde/
Diommu.c91 order = __ffs(vde->domain->pgsize_bitmap); in tegra_vde_iommu_init()
/linux-6.12.1/include/linux/
Dio-pgtable.h99 unsigned long pgsize_bitmap; member

12