diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2024-02-26 20:07:19 +0300 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2024-02-29 18:12:22 +0300 |
commit | d2e053d73247b68144c7f44d002ebf56acaf2d48 (patch) | |
tree | 3f672b0bba0df1cfca40499f604de320556fecde /tools/perf/scripts/python/stackcollapse.py | |
parent | 8c73c32c83ce7f3c31864cb044abd3daefacd996 (diff) | |
download | linux-d2e053d73247b68144c7f44d002ebf56acaf2d48.tar.xz |
iommu/arm-smmu-v3: Put writing the context descriptor in the right order
Get closer to the IOMMU API ideal that changes between domains can be
hitless. The ordering for the CD table entry is not entirely clean from
this perspective.
When switching away from a STE with a CD table programmed in it we should
write the new STE first, then clear any old data in the CD entry.
If we are programming a CD table for the first time to a STE then the CD
entry should be programmed before the STE is loaded.
If we are replacing a CD table entry when the STE already points at the CD
entry then we just need to do the make/break sequence.
Lift this code out of arm_smmu_detach_dev() so it can all be sequenced
properly. The only other caller is arm_smmu_release_device() and it is
going to free the cdtable anyhow, so it doesn't matter what is in it.
Reviewed-by: Michael Shavit <mshavit@google.com>
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Mostafa Saleh <smostafa@google.com>
Tested-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Tested-by: Moritz Fischer <moritzf@google.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/8-v6-96275f25c39d+2d4-smmuv3_newapi_p1_jgg@nvidia.com
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions