[PATCH 3/7] iommu: Remove ops.pgsize_bitmap from drivers that don't use it

Sven Peter sven at svenpeter.dev
Thu May 1 12:07:44 PDT 2025


On Tue, Apr 29, 2025, at 16:34, Jason Gunthorpe wrote:
> These drivers all set the domain->pgsize_bitmap in their
> domain_alloc_paging() functions, so the ops value is never used. Delete
> it.
>
> Signed-off-by: Jason Gunthorpe <jgg at nvidia.com>
> ---
>  drivers/iommu/apple-dart.c       | 1 -
>  drivers/iommu/intel/iommu.c      | 1 -
>  drivers/iommu/iommufd/selftest.c | 1 -
>  drivers/iommu/riscv/iommu.c      | 1 -
>  drivers/iommu/virtio-iommu.c     | 6 ++----
>  5 files changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c
> index 757d24f67ad45a..190f28d7661515 100644
> --- a/drivers/iommu/apple-dart.c
> +++ b/drivers/iommu/apple-dart.c
> @@ -991,7 +991,6 @@ static const struct iommu_ops apple_dart_iommu_ops = {
>  	.of_xlate = apple_dart_of_xlate,
>  	.def_domain_type = apple_dart_def_domain_type,
>  	.get_resv_regions = apple_dart_get_resv_regions,
> -	.pgsize_bitmap = -1UL, /* Restricted during dart probe */
>  	.owner = THIS_MODULE,
>  	.default_domain_ops = &(const struct iommu_domain_ops) {
>  		.attach_dev	= apple_dart_attach_dev_paging,

Reviewed-by: Sven Peter <sven at svenpeter.dev> # for Apple DART



Best,


Sven



More information about the Linux-mediatek mailing list