diff options
author | Vasant Hegde <vasant.hegde@amd.com> | 2024-10-30 09:35:51 +0300 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2024-10-30 13:06:44 +0300 |
commit | d6b47dec368400a62d2b9d44c8e136fc15eac72c (patch) | |
tree | 8ab77bacd5cacee5631d2a689d153f643fa65a9a /tools/perf/scripts/python/mem-phys-addr.py | |
parent | 07bbd660dbd6ff03907d9ddbdfe9deabbd18ac4d (diff) | |
download | linux-d6b47dec368400a62d2b9d44c8e136fc15eac72c.tar.xz |
iommu/amd: Reduce domain lock scope in attach device path
Currently attach device path takes protection domain lock followed by
dev_data lock. Most of the operations in this function is specific to
device data except pdom_attach_iommu() where it updates protection
domain structure. Hence reduce the scope of protection domain lock.
Note that this changes the locking order. Now it takes device lock
before taking doamin lock (group->mutex -> dev_data->lock ->
pdom->lock). dev_data->lock is used only in device attachment path.
So changing order is fine. It will not create any issue.
Finally move numa node assignment to pdom_attach_iommu().
Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20241030063556.6104-8-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