git: 153446ecd740 - main - linuxkpi: Add `split_page()`

From: Jean-Sébastien Pédron <dumbbell_at_FreeBSD.org>
Date: Mon, 07 Sep 2026 18:37:24 UTC
The branch main has been updated by dumbbell:

URL: https://cgit.FreeBSD.org/src/commit/?id=153446ecd740702af00cf9b09d8cd39f6d397dd3

commit 153446ecd740702af00cf9b09d8cd39f6d397dd3
Author:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
AuthorDate: 2026-08-15 18:31:46 +0000
Commit:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
CommitDate: 2026-09-07 18:27:30 +0000

    linuxkpi: Add `split_page()`
    
    This function is supposed to split large pages into an array of
    `PAGE_SIZE`-sized pages, with correct refcounting. This is apparently
    used to allow some drivers to free a part of a large page only.
    
    I don't think we use large pages in linuxkpi. Therefore, this new
    function is curently a no-op.
    
    The DRM drivers TTM memory manager started to use it in Linux 6.15.
    
    Reviewed by:    bz
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D58762
---
 sys/compat/linuxkpi/common/include/linux/mm.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h
index 0f5cb4552710..1732e21de5cf 100644
--- a/sys/compat/linuxkpi/common/include/linux/mm.h
+++ b/sys/compat/linuxkpi/common/include/linux/mm.h
@@ -418,6 +418,12 @@ unlock_page(struct page *page)
 	vm_page_xunbusy(page);
 }
 
+static inline void
+split_page(struct page *page, unsigned int order)
+{
+	pr_debug("%s: TODO\n", __func__);
+}
+
 extern int is_vmalloc_addr(const void *addr);
 void si_meminfo(struct sysinfo *si);