summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/mem-phys-addr.py
diff options
context:
space:
mode:
authorVasant Hegde <vasant.hegde@amd.com>2024-10-30 09:35:54 +0300
committerJoerg Roedel <jroedel@suse.de>2024-10-30 13:06:46 +0300
commit0b136493d3ffa1358783dcf5b9f866ceef2ff122 (patch)
tree09c5e14b88db688d087a4f559f248ddb6c4f57dd /tools/perf/scripts/python/mem-phys-addr.py
parente843aedbeb82b17a5fe6172449bff133fc8b68a1 (diff)
downloadlinux-0b136493d3ffa1358783dcf5b9f866ceef2ff122.tar.xz
iommu/amd: Reorder attach device code
Ideally in attach device path, it should take dev_data lock before making changes to device data including IOPF enablement. So far dev_data was using spinlock and it was hitting lock order issue when it tries to enable IOPF. Hence Commit 526606b0a199 ("iommu/amd: Fix Invalid wait context issue") moved IOPF enablement outside dev_data->lock. Previous patch converted dev_data lock to mutex. Now its safe to call amd_iommu_iopf_add_device() with dev_data->mutex. Hence move back PCI device capability enablement (ATS, PRI, PASID) and IOPF enablement code inside the lock. Also in attach_device(), update 'dev_data->domain' at the end so that error handling becomes simple. Signed-off-by: Vasant Hegde <vasant.hegde@amd.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/20241030063556.6104-11-vasant.hegde@amd.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions