lkml.org 
[lkml]   [2023]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 09/16] iommu/iommufd: use page allocation function provided by iommu-pages.h
Date
Convert iommu/iommufd/* files to use the new page allocation functions
provided in iommu-pages.h.

Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
---
drivers/iommu/iommufd/iova_bitmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iommu/iommufd/iova_bitmap.c b/drivers/iommu/iommufd/iova_bitmap.c
index 0a92c9eeaf7f..6b8575b93f17 100644
--- a/drivers/iommu/iommufd/iova_bitmap.c
+++ b/drivers/iommu/iommufd/iova_bitmap.c
@@ -253,7 +253,7 @@ struct iova_bitmap *iova_bitmap_alloc(unsigned long iova, size_t length,
bitmap->iova = iova;
bitmap->length = length;
mapped->iova = iova;
- mapped->pages = (struct page **)__get_free_page(GFP_KERNEL);
+ mapped->pages = iommu_alloc_page(GFP_KERNEL);
if (!mapped->pages) {
rc = -ENOMEM;
goto err;
@@ -284,7 +284,7 @@ void iova_bitmap_free(struct iova_bitmap *bitmap)
iova_bitmap_put(bitmap);

if (mapped->pages) {
- free_page((unsigned long)mapped->pages);
+ iommu_free_page(mapped->pages);
mapped->pages = NULL;
}

--
2.43.0.rc2.451.g8631bc7472-goog
\
 
 \ /
  Last update: 2023-11-28 21:51    [W:0.215 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site