linux-sunxi.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/7] Remove ops.pgsize_bitmap
@ 2025-06-09 20:41 Jason Gunthorpe
  2025-06-09 20:41 ` [PATCH v2 1/7] qiommu/arm-smmu-v3: Remove iommu_ops pgsize_bitmap Jason Gunthorpe
                   ` (8 more replies)
  0 siblings, 9 replies; 19+ messages in thread
From: Jason Gunthorpe @ 2025-06-09 20:41 UTC (permalink / raw)
  To: Alexandre Ghiti, Alim Akhtar, Alyssa Rosenzweig,
	AngeloGioacchino Del Regno, Albert Ou, asahi, Baolin Wang,
	David Woodhouse, Gerald Schaefer, Heiko Stuebner, iommu,
	Janne Grunau, Jean-Philippe Brucker, Jernej Skrabec,
	Jonathan Hunter, Joerg Roedel, 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, Sven Peter, Thierry Reding,
	Krishna Reddy, virtualization, Chen-Yu Tsai, Will Deacon, Yong Wu,
	Chunyan Zhang
  Cc: Lu Baolu, Kevin Tian, patches, Niklas Schnelle, Sven Peter,
	Tomasz Jeznach

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.

v2:
 - Rebase on v6.16-rc1
v1: https://patch.msgid.link/r/0-v1-7c5282b0c334+2db-iommu_rm_ops_pgsize_jgg@nvidia.com

Jason Gunthorpe (7):
  qiommu/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: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
-- 
2.43.0


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

end of thread, other threads:[~2025-06-27 12:59 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-09 20:41 [PATCH v2 0/7] Remove ops.pgsize_bitmap Jason Gunthorpe
2025-06-09 20:41 ` [PATCH v2 1/7] qiommu/arm-smmu-v3: Remove iommu_ops pgsize_bitmap Jason Gunthorpe
2025-06-09 22:15   ` Nicolin Chen
2025-06-09 23:11     ` Jason Gunthorpe
2025-06-09 20:41 ` [PATCH v2 2/7] iommu/arm-smmu: " Jason Gunthorpe
2025-06-09 20:41 ` [PATCH v2 3/7] iommu: Remove ops.pgsize_bitmap from drivers that don't use it Jason Gunthorpe
2025-06-09 20:41 ` [PATCH v2 4/7] iommu: Remove iommu_ops pgsize_bitmap from simple drivers Jason Gunthorpe
2025-06-10  3:47   ` Chen-Yu Tsai
2025-06-10  9:11   ` Thierry Reding
2025-06-11  9:40   ` AngeloGioacchino Del Regno
2025-06-11  9:46   ` Marek Szyprowski
2025-06-09 20:41 ` [PATCH v2 5/7] iommu/mtk: Remove iommu_ops pgsize_bitmap Jason Gunthorpe
2025-06-11  9:40   ` AngeloGioacchino Del Regno
2025-06-09 20:41 ` [PATCH v2 6/7] iommu/qcom: " Jason Gunthorpe
2025-06-09 20:41 ` [PATCH v2 7/7] iommu: Remove ops->pgsize_bitmap Jason Gunthorpe
2025-06-27  8:28   ` Joerg Roedel
2025-06-27 12:59     ` Jason Gunthorpe
2025-06-09 22:45 ` [PATCH v2 0/7] Remove ops.pgsize_bitmap Nicolin Chen
2025-06-27  6:56 ` Joerg Roedel

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).