Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Feb 2023 11:56:43 GMT
From:      =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= <dumbbell@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: a88628ff0cca - stable/13 - linuxkpi: Define `totalram_pages()`
Message-ID:  <202302161156.31GBuhMl056609@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by dumbbell (ports committer):

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

commit a88628ff0ccae15eb8fb87a4b8f75c1f2766e4f4
Author:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
AuthorDate: 2023-02-08 17:52:43 +0000
Commit:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
CommitDate: 2023-02-16 11:55:22 +0000

    linuxkpi: Define `totalram_pages()`
    
    It returns `physmem`.
    
    Reviewed by:    manu
    Approved by:    manu
    Differential Revision:  https://reviews.freebsd.org/D38531
    
    (cherry picked from commit 53da54b936e646ba1216c0cc19582dad058ca5d0)
---
 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 9eb5ce7c5280..c1011b56fe24 100644
--- a/sys/compat/linuxkpi/common/include/linux/mm.h
+++ b/sys/compat/linuxkpi/common/include/linux/mm.h
@@ -340,6 +340,12 @@ unlock_page(struct page *page)
 extern int is_vmalloc_addr(const void *addr);
 void si_meminfo(struct sysinfo *si);
 
+static inline unsigned long
+totalram_pages(void)
+{
+	return ((unsigned long)physmem);
+}
+
 #define	unmap_mapping_range(...)	lkpi_unmap_mapping_range(__VA_ARGS__)
 void lkpi_unmap_mapping_range(void *obj, loff_t const holebegin __unused,
     loff_t const holelen, int even_cows __unused);



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