diff options
author | Jean-Sébastien Pédron <dumbbell@FreeBSD.org> | 2023-02-08 17:52:43 +0000 |
---|---|---|
committer | Jean-Sébastien Pédron <dumbbell@FreeBSD.org> | 2023-02-14 22:01:06 +0000 |
commit | 53da54b936e646ba1216c0cc19582dad058ca5d0 (patch) | |
tree | 89e07e20a0fbd23cc2094eef473b649cbc44b539 | |
parent | 3102ea3b15b6c3ed1ea50716d65980b680375ebc (diff) | |
download | src-53da54b936e646ba1216c0cc19582dad058ca5d0.tar.gz src-53da54b936e646ba1216c0cc19582dad058ca5d0.zip |
linuxkpi: Define `totalram_pages()`
It returns `physmem`.
`__FreeBSD_version` is bumped to 1400080. We need that to remove a copy
of this function in the i915 DRM driver, maintained outside of base.
Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38531
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/mm.h | 6 | ||||
-rw-r--r-- | sys/sys/param.h | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index 2dcf32cbe84a..8dab5b9daa76 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -348,6 +348,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); diff --git a/sys/sys/param.h b/sys/sys/param.h index b2c2b1a04b4b..751020f6d087 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -76,7 +76,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1400079 +#define __FreeBSD_version 1400080 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, |