iommu/iova: Simplify domain destruction
authorRobin Murphy <robin.murphy@arm.com>
Tue, 19 Sep 2017 13:48:39 +0000 (14:48 +0100)
committerJoerg Roedel <jroedel@suse.de>
Thu, 28 Sep 2017 12:57:15 +0000 (14:57 +0200)
commit7595dc588a39c37091ddf65f6c0a3cd40f128e7a
treed7b15dd852595d6af6a15336b80f9e69e3ac7f3b
parent973f5fbedb0721ab964386a5fe5120998e71580c
iommu/iova: Simplify domain destruction

All put_iova_domain() should have to worry about is freeing memory - by
that point the domain must no longer be live, so the act of cleaning up
doesn't need to be concurrency-safe or maintain the rbtree in a
self-consistent state. There's no need to waste time with locking or
emptying the rcache magazines, and we can just use the postorder
traversal helper to clear out the remaining rbtree entries in-place.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iova.c