Commit 37ed364
iommu/arm-smmu-v3-sva: Remove bond refcount
Always allocate a new arm_smmu_bond in __arm_smmu_sva_bind and remove
the bond refcount since arm_smmu_bond can never be shared across calls
to __arm_smmu_sva_bind.
The iommu framework will not allocate multiple SVA domains for the same
(device/mm) pair, nor will it call set_dev_pasid for a device if a
domain is already attached on the given pasid. There's also a one-to-one
mapping between MM and PASID. __arm_smmu_sva_bind is therefore never
called with the same (device/mm) pair, and so there's no reason to try
and normalize allocations of the arm_smmu_bond struct for a (device/mm)
pair across set_dev_pasid.
Signed-off-by: Michael Shavit <mshavit@google.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20230905194849.v1.2.Id3ab7cf665bcead097654937233a645722a4cce3@changeid
Signed-off-by: Will Deacon <will@kernel.org>1 parent d912aed commit 37ed364
1 file changed
Lines changed: 1 addition & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
| |||
386 | 385 | | |
387 | 386 | | |
388 | 387 | | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | 388 | | |
398 | 389 | | |
399 | 390 | | |
400 | 391 | | |
401 | 392 | | |
402 | | - | |
403 | 393 | | |
404 | 394 | | |
405 | 395 | | |
| |||
578 | 568 | | |
579 | 569 | | |
580 | 570 | | |
581 | | - | |
| 571 | + | |
582 | 572 | | |
583 | 573 | | |
584 | 574 | | |
| |||
0 commit comments