Skip to content

iommu/tegra-smmu: Add pagetable mappings to debugfs

Nicolin Chen linux-iommu linux-tegra lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest6 patches 13 repliesIn review
  2. v76 patches 4 repliesSuperseded

Changes in v8 from the cover letter · 24 lines

* No changes for PATCH 1-4
* PATCH-5:
* * bypassed "group->as == as" to fix KMSG bug reported by Dmitry
* PATCH-6:
* * changed to use u32 casting for IOVA outputs
* * squashed Dmitry's change to list all swgroup names in the same group_soc since they share the same as pointer
v7: https://lore.kernel.org/linux-iommu/[email protected]/T/
* Added "Acked-by" from Thierry to PATCH1,4,5
* No other changes for PATCH1,3,4,5
* PATCH-2: dropped "s/soc/group_soc" change
* PATCH-6:
* * avoided forward declaration
* * dropped castings in pd_pt_index_iova()
* * used "'-' : 'S'" for non-secure attribute
* * changed multi-line outputs to single-line format
v6: https://lore.kernel.org/linux-iommu/20210915043806.GA19185@Asurada-Nvidia/t/
* Added PATCH1-3 for better naming conventions
* Added PATCH4-5 to embed previous struct tegra_smmu_group_debug
into struct tegra_smmu_group
* Dropped parentheses at SMMU_PTE_ATTR_SHIFT
* Dropped swgrp->reg print
* Replaced ptb_reg contents with as->attr and as->pd_dma
* Added "index" and "count" in the PD entries for readability
* Removed Dmitry's Tested-by and Reviewed-by for the big change

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6iommu/tegra-smmu: Rename struct iommu_group *group to *grpdrivers/iommu/tegra-smmu.c+8 -80 replies
2/6iommu/tegra-smmu: Rename tegra_smmu_find_group to tegra_smmu_find_group_socdrivers/iommu/tegra-smmu.c+2 -20 replies
3/6iommu/tegra-smmu: Rename struct tegra_smmu_swgroup *group to *swgrpdrivers/iommu/tegra-smmu.c+17 -170 replies
4/6iommu/tegra-smmu: Use swgrp pointer instead of swgroup iddrivers/iommu/tegra-smmu.c+8 -40 replies
5/6iommu/tegra-smmu: Attach as pointer to tegra_smmu_groupdrivers/iommu/tegra-smmu.c+80 -160 replies
6/6iommu/tegra-smmu: Add pagetable mappings to debugfsdrivers/iommu/tegra-smmu.c+185 -013 replies

Reviews trailers per patch

3 of 6 patches have a Reviewed-by or Acked-by.

PatchThierry Reding
1/6A-b
2/6
3/6
4/6A-b
5/6A-b
6/6

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

Read the v8 thread

Cover letter [PATCH v8 0/6] iommu/tegra-smmu: Add pagetable mappings to debugfs

This series of patches adds a new mappings node to debugfs for tegra-smmu driver. The first five patches are all preparational changes for PATCH-6, based on Thierry's review feedback against v5.

Changelog
v8:
* No changes for PATCH 1-4
* PATCH-5:
* * bypassed "group->as == as" to fix KMSG bug reported by Dmitry
* PATCH-6:
* * changed to use u32 casting for IOVA outputs
* * squashed Dmitry's change to list all swgroup names in the same group_soc since they share the same as pointer
v7: https://lore.kernel.org/linux-iommu/[email protected]/T/
* Added "Acked-by" from Thierry to PATCH1,4,5
* No other changes for PATCH1,3,4,5
* PATCH-2: dropped "s/soc/group_soc" change
* PATCH-6:
* * avoided forward declaration
* * dropped castings in pd_pt_index_iova()
* * used "'-' : 'S'" for non-secure attribute
* * changed multi-line outputs to single-line format
v6: https://lore.kernel.org/linux-iommu/20210915043806.GA19185@Asurada-Nvidia/t/
* Added PATCH1-3 for better naming conventions
* Added PATCH4-5 to embed previous struct tegra_smmu_group_debug
into struct tegra_smmu_group
* Dropped parentheses at SMMU_PTE_ATTR_SHIFT
* Dropped swgrp->reg print
* Replaced ptb_reg contents with as->attr and as->pd_dma
* Added "index" and "count" in the PD entries for readability
* Removed Dmitry's Tested-by and Reviewed-by for the big change
from v5 to v6.
v5: https://lore.kernel.org/linux-iommu/[email protected]/
* Fixed a typo in commit message
* Split a long line into two lines
* Rearranged variable defines by length
* Added Tested-by and Reviewed-by from Dmitry
v4: https://lore.kernel.org/lkml/[email protected]/
* Changed %d to %u for unsigned variables
* Fixed print format mismatch warnings on ARM32
v3: https://lore.kernel.org/linux-iommu/20210315031530.GA15245@Asurada-Nvidia/T/
* Fixed PHYS and IOVA print formats
* Changed variables to unsigned int type
* Changed the table outputs to be compact
v2: https://lore.kernel.org/linux-iommu/20210312010932.GB29926@Asurada-Nvidia/T/
* Expanded mutex range to the entire function
* Added as->lock to protect pagetable walkthrough
* Replaced devm_kzalloc with devm_kcalloc for group_debug
* Added "PTE RANGE" and "SIZE" columns to group contiguous mappings
* Dropped as->count check
* Added WARN_ON when as->count mismatches pd[pd_index]
v1: https://lkml.org/lkml/2020/9/26/70

Nicolin Chen (6):
iommu/tegra-smmu: Rename struct iommu_group *group to *grp iommu/tegra-smmu: Rename tegra_smmu_find_group to
tegra_smmu_find_group_soc
iommu/tegra-smmu: Rename struct tegra_smmu_swgroup *group to *swgrp iommu/tegra-smmu: Use swgrp pointer instead of swgroup id iommu/tegra-smmu: Attach as pointer to tegra_smmu_group iommu/tegra-smmu: Add pagetable mappings to debugfs

 drivers/iommu/tegra-smmu.c | 345 ++++++++++++++++++++++++++++++++-----
 1 file changed, 299 insertions(+), 46 deletions(-)
Signature · 1 line
2.17.1