diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2024-04-30 19:21:36 +0200 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2024-05-01 16:33:52 +0200 |
commit | af8f0b83ea2bcc7cd365c32044f31bdadc07c351 (patch) | |
tree | 0ef8d78bcde39dc80f98c22232d2db7cded45088 /drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c | |
parent | iommu/arm-smmu-v3: Move the CD generation for S1 domains into a function (diff) | |
download | linux-af8f0b83ea2bcc7cd365c32044f31bdadc07c351.tar.xz linux-af8f0b83ea2bcc7cd365c32044f31bdadc07c351.zip |
iommu/arm-smmu-v3: Consolidate clearing a CD table entry
A cleared entry is all 0's. Make arm_smmu_clear_cd() do this sequence.
If we are clearing an entry and for some reason it is not already
allocated in the CD table then something has gone wrong.
Remove case (5) from arm_smmu_write_ctx_desc().
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Tested-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Reviewed-by: Michael Shavit <mshavit@google.com>
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Moritz Fischer <moritzf@google.com>
Reviewed-by: Mostafa Saleh <smostafa@google.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/4-v9-5040dc602008+177d7-smmuv3_newapi_p2_jgg@nvidia.com
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c')
-rw-r--r-- | drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c index d159f6048093..7cf286f7a009 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c @@ -569,7 +569,7 @@ void arm_smmu_sva_remove_dev_pasid(struct iommu_domain *domain, mutex_lock(&sva_lock); - arm_smmu_write_ctx_desc(master, id, NULL); + arm_smmu_clear_cd(master, id); list_for_each_entry(t, &master->bonds, list) { if (t->mm == mm) { |