Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Feb 2023 23:44:46 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 1984e6e4f158 - stable/13 - LinuxKPI: mm.h: implement virt_to_head_page()
Message-ID:  <202302172344.31HNikqe025037@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=1984e6e4f1583ad1a44b6913e8722121fabe8967

commit 1984e6e4f1583ad1a44b6913e8722121fabe8967
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-17 23:42:14 +0000

    LinuxKPI: mm.h: implement virt_to_head_page()
    
    Implement virt_to_head_page().
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      3 days
    Reviewed by:    markj
    Differential Revision: https://reviews.freebsd.org/D38240
    
    (cherry picked from commit 70b97048a051958be37b650b8a67c89203fd6b70)
---
 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 c1011b56fe24..49c961886678 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>
 
@@ -151,6 +152,13 @@ struct sysinfo {
 	uint32_t mem_unit;	/* Memory unit size in bytes */
 };
 
+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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302172344.31HNikqe025037>