git: 738c02ba24c6 - main - LinuxKPI: add dev_alloc_pages()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 12 Apr 2024 23:16:30 UTC
The branch main has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=738c02ba24c66391870067602f1c9c030d5c5e5d
commit 738c02ba24c66391870067602f1c9c030d5c5e5d
Author: Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2024-04-02 09:44:29 +0000
Commit: Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2024-04-12 23:15:27 +0000
LinuxKPI: add dev_alloc_pages()
Add dev_alloc_pages() though it seems a weird KPI, not passing a dev
despite its name. Used by updated wireless driver.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D44588
---
sys/compat/linuxkpi/common/include/linux/gfp.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sys/compat/linuxkpi/common/include/linux/gfp.h b/sys/compat/linuxkpi/common/include/linux/gfp.h
index c086fb9effe4..f6cce379924d 100644
--- a/sys/compat/linuxkpi/common/include/linux/gfp.h
+++ b/sys/compat/linuxkpi/common/include/linux/gfp.h
@@ -137,6 +137,12 @@ __free_page(struct page *page)
linux_free_pages(page, 0);
}
+static inline struct page *
+dev_alloc_pages(unsigned int order)
+{
+ return (linux_alloc_pages(GFP_ATOMIC, order));
+}
+
/*
* Page management for mapped pages:
*/