diff options
| author | Steve Sistare <[email protected]> | 2024-11-13 19:51:34 +0000 |
|---|---|---|
| committer | Jason Gunthorpe <[email protected]> | 2024-11-14 16:47:16 +0000 |
| commit | 10caa8b45119fa19fa98ea304d49f7e1283062fc (patch) | |
| tree | 389d49dbbfd3cea0ab3255bcb8e1c592dc951a33 | |
| parent | iommu/arm-smmu-v3: Support IOMMU_HWPT_INVALIDATE using a VIOMMU object (diff) | |
| download | kernel-10caa8b45119fa19fa98ea304d49f7e1283062fc.tar.gz kernel-10caa8b45119fa19fa98ea304d49f7e1283062fc.zip | |
iommufd: Export do_update_pinned
Export do_update_pinned. No functional change.
Link: https://patch.msgid.link/r/[email protected]
Signed-off-by: Steve Sistare <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Reviewed-by: Kevin Tian <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
| -rw-r--r-- | drivers/iommu/iommufd/io_pagetable.h | 5 | ||||
| -rw-r--r-- | drivers/iommu/iommufd/pages.c | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/drivers/iommu/iommufd/io_pagetable.h b/drivers/iommu/iommufd/io_pagetable.h index 9b40b2237932..f5f20fa639ef 100644 --- a/drivers/iommu/iommufd/io_pagetable.h +++ b/drivers/iommu/iommufd/io_pagetable.h @@ -252,4 +252,9 @@ struct iopt_pages_access { unsigned int users; }; +struct pfn_reader_user; + +int iopt_pages_update_pinned(struct iopt_pages *pages, unsigned long npages, + bool inc, struct pfn_reader_user *user); + #endif diff --git a/drivers/iommu/iommufd/pages.c b/drivers/iommu/iommufd/pages.c index 8f249169831a..3427749bc5ce 100644 --- a/drivers/iommu/iommufd/pages.c +++ b/drivers/iommu/iommufd/pages.c @@ -985,8 +985,8 @@ static int update_mm_locked_vm(struct iopt_pages *pages, unsigned long npages, return rc; } -static int do_update_pinned(struct iopt_pages *pages, unsigned long npages, - bool inc, struct pfn_reader_user *user) +int iopt_pages_update_pinned(struct iopt_pages *pages, unsigned long npages, + bool inc, struct pfn_reader_user *user) { int rc = 0; @@ -1020,8 +1020,8 @@ static void update_unpinned(struct iopt_pages *pages) return; if (pages->npinned == pages->last_npinned) return; - do_update_pinned(pages, pages->last_npinned - pages->npinned, false, - NULL); + iopt_pages_update_pinned(pages, pages->last_npinned - pages->npinned, + false, NULL); } /* @@ -1051,7 +1051,7 @@ static int pfn_reader_user_update_pinned(struct pfn_reader_user *user, npages = pages->npinned - pages->last_npinned; inc = true; } - return do_update_pinned(pages, npages, inc, user); + return iopt_pages_update_pinned(pages, npages, inc, user); } /* |
