git: cb8bfc4db8ca - main - LinuxKPI: Move page_address definition from linux/gfp.h to linux/mm.h
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 06 Jun 2024 20:42:57 UTC
The branch main has been updated by wulf:
URL: https://cgit.FreeBSD.org/src/commit/?id=cb8bfc4db8ca8f4ed03406a554e77a013696c8e0
commit cb8bfc4db8ca8f4ed03406a554e77a013696c8e0
Author: Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2024-06-06 20:42:06 +0000
Commit: Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2024-06-06 20:42:06 +0000
LinuxKPI: Move page_address definition from linux/gfp.h to linux/mm.h
To match Linux. Some future changes may depend on proper location.
Sponsored by: Serenity Cyber Security, LLC
MFC after: 1 week
Reviewed by: bz, emaste
Differential Revision: https://reviews.freebsd.org/D45448
---
sys/compat/linuxkpi/common/include/linux/gfp.h | 9 ---------
sys/compat/linuxkpi/common/include/linux/mm.h | 8 ++++++++
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/sys/compat/linuxkpi/common/include/linux/gfp.h b/sys/compat/linuxkpi/common/include/linux/gfp.h
index 8a0ce489f19f..bd8fa1a18372 100644
--- a/sys/compat/linuxkpi/common/include/linux/gfp.h
+++ b/sys/compat/linuxkpi/common/include/linux/gfp.h
@@ -84,15 +84,6 @@ struct page_frag_cache {
int pagecnt_bias;
};
-/*
- * Resolve a page into a virtual address:
- *
- * NOTE: This function only works for pages allocated by the kernel.
- */
-void *linux_page_address(struct page *);
-
-#define page_address(page) linux_page_address(page)
-
/*
* Page management for unmapped pages:
*/
diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h
index 109bfffe7d6a..41af4be4c015 100644
--- a/sys/compat/linuxkpi/common/include/linux/mm.h
+++ b/sys/compat/linuxkpi/common/include/linux/mm.h
@@ -178,6 +178,14 @@ get_order(unsigned long size)
return (order);
}
+/*
+ * Resolve a page into a virtual address:
+ *
+ * NOTE: This function only works for pages allocated by the kernel.
+ */
+void *linux_page_address(struct page *);
+#define page_address(page) linux_page_address(page)
+
static inline void *
lowmem_page_address(struct page *page)
{