git: 82f8db9d3fdd - releng/13.2 - LinuxKPI: mm.h: implement virt_to_head_page()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 23 Feb 2023 19:34:24 UTC
The branch releng/13.2 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=82f8db9d3fddea4eb71e87febe51d808bd9bd219 commit 82f8db9d3fddea4eb71e87febe51d808bd9bd219 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2023-01-28 16:00:55 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2023-02-23 19:31:37 +0000 LinuxKPI: mm.h: implement virt_to_head_page() Implement virt_to_head_page(). Sponsored by: The FreeBSD Foundation Reviewed by: markj Approved by: re (cperciva) Differential Revision: https://reviews.freebsd.org/D38240 (cherry picked from commit 70b97048a051958be37b650b8a67c89203fd6b70) (cherry picked from commit 1984e6e4f1583ad1a44b6913e8722121fabe8967) --- sys/compat/linuxkpi/common/include/linux/mm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index 4afc1a953f8e..572bdd8e9ddc 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -41,6 +41,7 @@ #include <linux/list.h> #include <linux/mmap_lock.h> #include <linux/shrinker.h> +#include <linux/page.h> #include <asm/pgtable.h> @@ -149,6 +150,13 @@ struct sysinfo { uint32_t mem_unit; }; +static inline struct page * +virt_to_head_page(const void *p) +{ + + return (virt_to_page(p)); +} + /* * Compute log2 of the power of two rounded up count of pages * needed for size bytes.