iommu/iova: Reorganise some code
authorRobin Murphy <robin.murphy@arm.com>
Mon, 5 Feb 2024 15:32:40 +0000 (15:32 +0000)
committerJoerg Roedel <jroedel@suse.de>
Fri, 9 Feb 2024 10:45:47 +0000 (11:45 +0100)
commit7f845d8b2eed0986a03a777d4956b52a57007974
tree3d6fd9d6627d8d60285368c7b1bd91f4a41c3da0
parente7b3533c81386464dfdcb01193075f8a9557083a
iommu/iova: Reorganise some code

The iova_cache_{get,put}() calls really represent top-level lifecycle
management for the whole IOVA library, so it's long been rather
confusing to have them buried right in the middle of the allocator
implementation details. Move them to a more expected position at the end
of the file, where it will then also be easier to expand them. With
this, we can also move the rcache hotplug handler (plus another stray
function) into the rcache portion of the file.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Acked-by: David Rientjes <rientjes@google.com>
Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Link: https://lore.kernel.org/r/d4753562f4faa0e6b3aeebcbf88fdb60cc22d715.1707144953.git.robin.murphy@arm.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iova.c