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
This commit is contained in:
Jean-Sébastien Pédron 2023-02-08 18:52:43 +01:00
parent 3102ea3b15
commit 53da54b936
No known key found for this signature in database
GPG Key ID: 39E99761A5FD94CC
2 changed files with 7 additions and 1 deletions

View File

@ -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);

View File

@ -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,