diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2023-07-17 15:12:08 -0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2023-07-26 10:20:06 -0300 |
commit | ea2d6124b52389aa837403f5debf73620d3f441f (patch) | |
tree | dca9b008395dc718b4d958510f1c7e068d93e64d /tools/perf/scripts/python/flamegraph.py | |
parent | 31422dff187b243c58f3a97d16bbe9e9ada639fe (diff) |
iommufd: Reorganize iommufd_device_attach into iommufd_device_change_pt
The code flow for first time attaching a PT and replacing a PT is very
similar except for the lowest do_attach step.
Reorganize this so that the do_attach step is a function pointer.
Replace requires destroying the old HWPT once it is replaced. This
destruction cannot be done under all the locks that are held in the
function pointer, so the signature allows returning a HWPT which will be
destroyed by the caller after everything is unlocked.
Link: https://lore.kernel.org/r/12-v8-6659224517ea+532-iommufd_alloc_jgg@nvidia.com
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions