linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/10] Tidy some minor things in the stream table/cd table area
@ 2024-06-11  0:31 Jason Gunthorpe
  2024-06-11  0:31 ` [PATCH v2 01/10] iommu/arm-smmu-v3: Do not zero the strtab twice Jason Gunthorpe
                   ` (11 more replies)
  0 siblings, 12 replies; 34+ messages in thread
From: Jason Gunthorpe @ 2024-06-11  0:31 UTC (permalink / raw)
  To: iommu, Joerg Roedel, linux-arm-kernel, Robin Murphy, Will Deacon
  Cc: Michael Shavit, Nicolin Chen, patches, Ryan Roberts,
	Mostafa Saleh

Will pointed out that two places referring to the CD/STE struct did not
get the new types. While auditing this code a few more oddities were
noticed. Based on a feedback from Mostafa and Nicolin a few more things
were fixed up too

- Use types for all the HW structures everywhere even for the L1
  descriptors that are just a single 8 bytes. This helps with clarity of
  what everthing is pointing at
- Use indexing helpers for the STE/CD two level calculations
- Use sizeof(struct X) instead of open coded math on constants. The sizeof
  naturally follows the type of the related variable in almost all cases
- Remove redundant dma_addr_t's and save some memory
- Remove redundant devm usage
- Use the modern rbtree API

Parts of this have been sitting in my tree for a while now, it grew a bit
since v1, but nothing is particularly profound here. Enough is merged now
that they can be cleanly based and are seperate from my other series.

v2:
 - Add a patch to add structs for the L1/L2 HW layouts and use their
   sizeof and type instead of constants and generic __le64 *.
 - Add a patch for L1/L2 indexing helpers for clarity
 - Reorder patches
 - Redo the union layout in the cfg for both cases
 - Fully remove some more defines
v1: https://lore.kernel.org/r/0-v1-1b720dce51d1+4f44-smmuv3_tidy_jgg@nvidia.com

Jason Gunthorpe (10):
  iommu/arm-smmu-v3: Do not zero the strtab twice
  iommu/arm-smmu-v3: Shrink the strtab l1_desc array
  iommu/arm-smmu-v3: Add arm_smmu_strtab_l1/2_idx()
  iommu/arm-smmu-v3: Add types for each level of the 2 level stream
    table
  iommu/arm-smmu-v3: Reorganize struct arm_smmu_strtab_cfg
  iommu/arm-smmu-v3: Remove strtab_base/cfg
  iommu/arm-smmu-v3: Do not use devm for the cd table allocations
  iommu/arm-smmu-v3: Shrink the cdtab l1_desc array
  iommu/arm-smmu-v3: Add types for each level of the CD table
  iommu/arm-smmu-v3: Reorganize struct arm_smmu_ctx_desc_cfg

 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 319 +++++++++-----------
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 103 +++++--
 2 files changed, 211 insertions(+), 211 deletions(-)


base-commit: b9f4172f83796c9f0b84e92c912732251bd79b57
-- 
2.45.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2024-07-09 23:54 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-11  0:31 [PATCH v2 00/10] Tidy some minor things in the stream table/cd table area Jason Gunthorpe
2024-06-11  0:31 ` [PATCH v2 01/10] iommu/arm-smmu-v3: Do not zero the strtab twice Jason Gunthorpe
2024-06-11  0:50   ` Nicolin Chen
2024-06-11 23:52   ` Daniel Mentz
2024-06-12 11:46     ` Jason Gunthorpe
2024-06-11  0:31 ` [PATCH v2 02/10] iommu/arm-smmu-v3: Shrink the strtab l1_desc array Jason Gunthorpe
2024-06-11  0:55   ` Nicolin Chen
2024-06-11  0:31 ` [PATCH v2 03/10] iommu/arm-smmu-v3: Add arm_smmu_strtab_l1/2_idx() Jason Gunthorpe
2024-06-11  2:00   ` Nicolin Chen
2024-06-12  0:30   ` Daniel Mentz
2024-06-12 12:09     ` Jason Gunthorpe
2024-06-12  0:37   ` Daniel Mentz
2024-06-12 11:49     ` Jason Gunthorpe
2024-06-11  0:31 ` [PATCH v2 04/10] iommu/arm-smmu-v3: Add types for each level of the 2 level stream table Jason Gunthorpe
2024-06-11  2:13   ` Nicolin Chen
2024-06-11  0:31 ` [PATCH v2 05/10] iommu/arm-smmu-v3: Reorganize struct arm_smmu_strtab_cfg Jason Gunthorpe
2024-06-11  2:31   ` Nicolin Chen
2024-07-02 18:46   ` Will Deacon
2024-07-09 19:42     ` Jason Gunthorpe
2024-06-11  0:31 ` [PATCH v2 06/10] iommu/arm-smmu-v3: Remove strtab_base/cfg Jason Gunthorpe
2024-06-11  2:36   ` Nicolin Chen
2024-06-11  0:31 ` [PATCH v2 07/10] iommu/arm-smmu-v3: Do not use devm for the cd table allocations Jason Gunthorpe
2024-06-11  2:39   ` Nicolin Chen
2024-06-11  0:31 ` [PATCH v2 08/10] iommu/arm-smmu-v3: Shrink the cdtab l1_desc array Jason Gunthorpe
2024-06-11  3:02   ` Nicolin Chen
2024-07-02 18:46   ` Will Deacon
2024-07-09 19:52     ` Jason Gunthorpe
2024-07-09 23:53     ` Jason Gunthorpe
2024-06-11  0:31 ` [PATCH v2 09/10] iommu/arm-smmu-v3: Add types for each level of the CD table Jason Gunthorpe
2024-06-11  3:12   ` Nicolin Chen
2024-06-11  0:31 ` [PATCH v2 10/10] iommu/arm-smmu-v3: Reorganize struct arm_smmu_ctx_desc_cfg Jason Gunthorpe
2024-06-11  3:25   ` Nicolin Chen
2024-06-11  3:27 ` [PATCH v2 00/10] Tidy some minor things in the stream table/cd table area Nicolin Chen
2024-07-02 18:43 ` 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).