aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Kondratyev <wulf@FreeBSD.org>2024-06-26 20:51:04 +0000
committerVladimir Kondratyev <wulf@FreeBSD.org>2024-08-01 21:09:41 +0000
commit3eb02936927e0977ef6d17fb47187aa4d9309c76 (patch)
treebbde123586b0e67ec6769cc4ff8bb4fdb1f94a0a
parentf1f6228a6658dd6a3409ee159628713e1aeef2a4 (diff)
LinuxKPI: Remove vmas argument from get_user_pages on KPI layer
To chase Linux kernel 6.5 Sponsored by: Serenity CyberSecurity, LLC MFC after: 1 week Reviewed by: manu, emaste Differential Revision: https://reviews.freebsd.org/D45614 (cherry picked from commit e1b0f431a109683ca7c232fb9282f3afabfdf12d)
-rw-r--r--sys/compat/linuxkpi/common/include/linux/mm.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h
index e2bda799dc77..56c849b02c32 100644
--- a/sys/compat/linuxkpi/common/include/linux/mm.h
+++ b/sys/compat/linuxkpi/common/include/linux/mm.h
@@ -279,14 +279,27 @@ extern long
get_user_pages(unsigned long start, unsigned long nr_pages,
unsigned int gup_flags, struct page **,
struct vm_area_struct **);
+#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 60500
+#define get_user_pages(start, nr_pages, gup_flags, pages) \
+ get_user_pages(start, nr_pages, gup_flags, pages, NULL)
+#endif
+#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 60500
+static inline long
+pin_user_pages(unsigned long start, unsigned long nr_pages,
+ unsigned int gup_flags, struct page **pages)
+{
+ return (get_user_pages(start, nr_pages, gup_flags, pages));
+}
+#else
static inline long
pin_user_pages(unsigned long start, unsigned long nr_pages,
unsigned int gup_flags, struct page **pages,
struct vm_area_struct **vmas)
{
- return get_user_pages(start, nr_pages, gup_flags, pages, vmas);
+ return (get_user_pages(start, nr_pages, gup_flags, pages, vmas));
}
+#endif
extern int
__get_user_pages_fast(unsigned long start, int nr_pages, int write,