iommu/iova: Move fast alloc size roundup into alloc_iova_fast()
authorJohn Garry via iommu <iommu@lists.linux-foundation.org>
Tue, 7 Dec 2021 11:17:26 +0000 (19:17 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 17 Dec 2021 08:10:40 +0000 (09:10 +0100)
commit972bf252f86062e50f9c9ea81f84f5df0e9f1302
treea5299fc64027e6a620a9aa378b887053c8d78f70
parent9abe2ac834851a7d0b0756e295cf7a292c45ca53
iommu/iova: Move fast alloc size roundup into alloc_iova_fast()

It really is a property of the IOVA rcache code that we need to alloc a
power-of-2 size, so relocate the functionality to resize into
alloc_iova_fast(), rather than the callsites.

Signed-off-by: John Garry <john.garry@huawei.com>
Acked-by: Will Deacon <will@kernel.org>
Reviewed-by: Xie Yongji <xieyongji@bytedance.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/1638875846-23993-1-git-send-email-john.garry@huawei.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/dma-iommu.c
drivers/iommu/iova.c
drivers/vdpa/vdpa_user/iova_domain.c