patches.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] Remove ops.pgsize_bitmap
@ 2025-04-29 14:34 Jason Gunthorpe
  2025-04-29 14:34 ` [PATCH 1/7] iommu/arm-smmu-v3: Remove iommu_ops pgsize_bitmap Jason Gunthorpe
                   ` (8 more replies)
  0 siblings, 9 replies; 16+ messages in thread
From: Jason Gunthorpe @ 2025-04-29 14:34 UTC (permalink / raw)
  To: Alexandre Ghiti, Alim Akhtar, Alyssa Rosenzweig,
	AngeloGioacchino Del Regno, Albert Ou, asahi, Baolin Wang,
	Lu Baolu, David Woodhouse, Gerald Schaefer, Heiko Stuebner, iommu,
	Janne Grunau, Jean-Philippe Brucker, Jernej Skrabec,
	Jonathan Hunter, Joerg Roedel, Kevin Tian, Krzysztof Kozlowski,
	linux-arm-kernel, linux-arm-msm, linux-mediatek, linux-riscv,
	linux-rockchip, linux-s390, linux-samsung-soc, linux-sunxi,
	linux-tegra, Marek Szyprowski, Matthias Brugger, Matthew Rosato,
	Neal Gompa, Orson Zhai, Palmer Dabbelt, Paul Walmsley, Rob Clark,
	Robin Murphy, Samuel Holland, Niklas Schnelle, Sven Peter,
	Thierry Reding, Tomasz Jeznach, Krishna Reddy, virtualization,
	Chen-Yu Tsai, Will Deacon, Yong Wu, Chunyan Zhang
  Cc: patches

Now that all drivers are using domain_alloc_paging() and dev is never
NULL, we can have all drivers correctly set domain.pgsize_bitmap during
their allocation function.

There are a few oddities that have accumulated here over past changes:

 - Some drivers always set domain.pgsize_bitmap during their
   domain_alloc_paging() call but still provide a value in ops. This is dead
   code, delete it.

 - Some drivers calculate a system global pgsize_bitmap in the ops, but
   it is now trivial to use the per-instance value instead. In several
   cases this is dead code, delete it. This also allows
   constifying the ops in these drivers as a hardening measure

 - Some drivers have a fixed pgsize_bitmap, put it next to setting up the
   geometry in their domain_alloc_paging() functions.

 - Finally a few drivers still use ops because they have a delayed
   finalize operation. Set the constant pgsize_bitmap in the
   domain_alloc_paging().

Then remove ops.pgsize_bitmap.

This is based on iommu next, and must go after the virtio
domain_alloc_paging() conversion.

Jason Gunthorpe (7):
  iommu/arm-smmu-v3: Remove iommu_ops pgsize_bitmap
  iommu/arm-smmu: Remove iommu_ops pgsize_bitmap
  iommu: Remove ops.pgsize_bitmap from drivers that don't use it
  iommu: Remove iommu_ops pgsize_bitmap from simple drivers
  iommu/mtk: Remove iommu_ops pgsize_bitmap
  iommu/qcom: Remove iommu_ops pgsize_bitmap
  iommu: Remove ops->pgsize_bitmap

 drivers/iommu/apple-dart.c                  |  1 -
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 10 ++--------
 drivers/iommu/arm/arm-smmu/arm-smmu.c       | 12 +++++-------
 drivers/iommu/arm/arm-smmu/qcom_iommu.c     |  6 ++----
 drivers/iommu/exynos-iommu.c                |  3 ++-
 drivers/iommu/intel/iommu.c                 |  1 -
 drivers/iommu/iommu.c                       |  7 -------
 drivers/iommu/iommufd/selftest.c            |  1 -
 drivers/iommu/ipmmu-vmsa.c                  |  4 ++--
 drivers/iommu/mtk_iommu.c                   |  9 +++------
 drivers/iommu/mtk_iommu_v1.c                |  3 ++-
 drivers/iommu/omap-iommu.c                  |  3 ++-
 drivers/iommu/riscv/iommu.c                 |  1 -
 drivers/iommu/rockchip-iommu.c              |  3 ++-
 drivers/iommu/s390-iommu.c                  |  2 +-
 drivers/iommu/sprd-iommu.c                  |  3 ++-
 drivers/iommu/sun50i-iommu.c                |  3 ++-
 drivers/iommu/tegra-smmu.c                  |  3 ++-
 drivers/iommu/virtio-iommu.c                |  6 ++----
 include/linux/iommu.h                       |  2 --
 20 files changed, 31 insertions(+), 52 deletions(-)


base-commit: 44e9f08cac9f7cc49e14f141b556409c805912ec
-- 
2.43.0


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-05-29 20:46 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-29 14:34 [PATCH 0/7] Remove ops.pgsize_bitmap Jason Gunthorpe
2025-04-29 14:34 ` [PATCH 1/7] iommu/arm-smmu-v3: Remove iommu_ops pgsize_bitmap Jason Gunthorpe
2025-04-29 14:34 ` [PATCH 2/7] iommu/arm-smmu: " Jason Gunthorpe
2025-04-29 14:34 ` [PATCH 3/7] iommu: Remove ops.pgsize_bitmap from drivers that don't use it Jason Gunthorpe
2025-04-30  2:32   ` Baolu Lu
2025-05-01 19:07   ` Sven Peter
2025-05-29 20:46   ` Tomasz Jeznach
2025-04-29 14:34 ` [PATCH 4/7] iommu: Remove iommu_ops pgsize_bitmap from simple drivers Jason Gunthorpe
2025-04-30 13:15   ` Niklas Schnelle
2025-04-30 13:21     ` Jason Gunthorpe
2025-04-29 14:34 ` [PATCH 5/7] iommu/mtk: Remove iommu_ops pgsize_bitmap Jason Gunthorpe
2025-04-29 14:34 ` [PATCH 6/7] iommu/qcom: " Jason Gunthorpe
2025-04-29 14:34 ` [PATCH 7/7] iommu: Remove ops->pgsize_bitmap Jason Gunthorpe
2025-04-30  2:34   ` Baolu Lu
2025-04-30  9:16 ` [PATCH 0/7] Remove ops.pgsize_bitmap Tian, Kevin
2025-05-15 16:33 ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).