[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230905115013.1572240-1-mshavit@google.com>
Date: Tue, 5 Sep 2023 19:49:11 +0800
From: Michael Shavit <mshavit@...gle.com>
To: iommu@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Cc: will@...nel.org, robin.murphy@....com, nicolinc@...dia.com,
jean-philippe@...aro.org, jgg@...dia.com, tina.zhang@...el.com,
Michael Shavit <mshavit@...gle.com>,
Jason Gunthorpe <jgg@...pe.ca>, Joerg Roedel <joro@...tes.org>,
Kevin Tian <kevin.tian@...el.com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Lu Baolu <baolu.lu@...ux.intel.com>,
Mark Brown <broonie@...nel.org>,
Tomas Krcka <krckatom@...zon.de>,
Yicong Yang <yangyicong@...ilicon.com>
Subject: [PATCH v1 0/3] Clean-up arm-smmu-v3-sva.c: remove arm_smmu_bond
This small series was originally part of a larger effort to support
set_dev_pasid in arm-smmu-v3.c and a related SVA refactoring. But it can
also stand on its own as an initial and prepatory clean-up.
The crux of this series relies on the observation that SVA won't
allocate multiple SVA domains for the same device and mm pair. There's
therefore no reason for the driver to try to normalize data allocated
for a device/mm pair across set_dev_pasid calls. This simplification
then allows set_dev_pasid to use the SVA iommu_domain to hold
information instead of allocating a "bond" to represent the attachement.
Note that long term, we'll likely want to represent the SVA domain using
the same arm_smmu_domain struct used in arm-smmu-v3. This series serves
as an interim step to make those later refactors easier to reason about.
Note that arm-smmu-v3-sva performs a second level of normalization by
mapping multiple bonds (now SVA domains) attached to devices with the
same SMMU (if those devices have the same RID domain attached) to a
single arm_smmu_mmu_notifier. This is not affected by these patches.
Michael Shavit (3):
iommu/arm-smmu-v3-sva: Remove unused iommu_sva handle
iommu/arm-smmu-v3-sva: Remove bond refcount
iommu/arm-smmu-v3-sva: Remove arm_smmu_bond
.../iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c | 90 ++++++-------------
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 1 -
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 2 +-
3 files changed, 28 insertions(+), 65 deletions(-)
base-commit: 6eaae198076080886b9e7d57f4ae06fa782f90ef
--
2.42.0.283.g2d96d420d3-goog
Powered by blists - more mailing lists