Skip to content

iommu/arm-smmu-v3: Two vsmmu impl_ops cleanups

Nicolin Chen linux-arm-kernel linux-iommu linux-tegra lkml 4 versions – Applied

Status from this message: Applied, thanks

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 1 replyApplied
  2. v32 patches 13 repliesSuperseded
  3. v22 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches2 repliesSuperseded

Changes in v4 from the cover letter

* Add Reviewed-by from Pranjal
* Update inline comments

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/2iommu/arm-smmu-v3: Do not bother impl_ops if IOMMU_VIOMMU_TYPE_ARM_SMMUV3drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-iommufd.c drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c+30 -110 replies
2/2iommu/arm-smmu-v3: Replace vsmmu_size/type with get_viommu_sizedrivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-iommufd.c drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h +1 more+20 -150 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchWill DeaconPranjal Shrivastava
1/2A-b R-b
2/2A-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/2] iommu/arm-smmu-v3: Two vsmmu impl_ops cleanups

Since the vsmmu and cmdqv patches were accepeted via the iommufd tree, this is based on Jason's for-next tree.

Per request from Will following the accepted latest vcmdq series to clean up the impl_ops:

https://lore.kernel.org/linux-iommu/aHE4Y-fbucm-j-yi@willie-the-truck/
"
It would be nice to avoid adding data members to the ops structure, if at all possible. The easiest thing would probably be to add a function for getting the vsmmu size and then pushing the two checks against 'vsmmu_type' down into the impl_ops callbacks so that:

1. If the type is IOMMU_VIOMMU_TYPE_ARM_SMMUV3, we don't bother with the impl_ops at all in arm_vsmmu_init() and arm_smmu_get_viommu_size()

2. Otherwise, we pass the type into the impl_ops and they can check it

Of course, that can be a patch on top of the series as there's no point respinning the whole just for this.
"

Add two clean up patches with the first one doing 1 and 2 to prioritize IOMMU_VIOMMU_TYPE_ARM_SMMUV3 always, and the second one dropping static vsmmu_type and vsmmu_size data members.

Changelog
v4:
* Add Reviewed-by from Pranjal
* Update inline comments
v3:
https://lore.kernel.org/all/[email protected]/
* Add Acked-by from Will
* Use logical "!=" instead of arithmetic "^"
v2:
https://lore.kernel.org/all/[email protected]/
* Add Acked-by from Will
* Move get_viommu_size and vsmmu_init validation to arm_smmu_impl_probe()
v1:
https://lore.kernel.org/all/[email protected]/

Nicolin Chen (2):
iommu/arm-smmu-v3: Do not bother impl_ops if
IOMMU_VIOMMU_TYPE_ARM_SMMUV3
iommu/arm-smmu-v3: Replace vsmmu_size/type with get_viommu_size

 .../arm/arm-smmu-v3/arm-smmu-v3-iommufd.c     | 20 +++++++++----------
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c   | 14 +++++++++++++
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h   |  3 +--
 .../iommu/arm/arm-smmu-v3/tegra241-cmdqv.c    | 17 ++++++++++++++--
 4 files changed, 39 insertions(+), 15 deletions(-)

base-commit: ab6bc44159d8f0c4ee757e0ce041fa9033e0ead8

Signature · 1 line
2.43.0