diff options
| author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2019-03-13 19:01:55 +0000 |
|---|---|---|
| committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2019-03-13 19:01:55 +0000 |
| commit | 8734a56285471f0edbffa1af4615bedfa6d9ea10 (patch) | |
| tree | bb96113f085e03fdcd2b1df98bd48e3e3dcb4d8b /sys/compat/linuxkpi | |
| parent | 5746b1cd46e48a024a71e7ddf8538f6ec1d6632a (diff) | |
Notes
Diffstat (limited to 'sys/compat/linuxkpi')
| -rw-r--r-- | sys/compat/linuxkpi/common/include/linux/mm.h | 7 | ||||
| -rw-r--r-- | sys/compat/linuxkpi/common/src/linux_page.c | 8 |
2 files changed, 15 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index 26bd01b6e623..a9168416b286 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -134,6 +134,12 @@ struct vm_operations_struct { int (*access) (struct vm_area_struct *, unsigned long, void *, int, int); }; +struct sysinfo { + uint64_t totalram; + uint64_t totalhigh; + uint32_t mem_unit; +}; + /* * Compute log2 of the power of two rounded up count of pages * needed for size bytes. @@ -268,5 +274,6 @@ vmalloc_to_page(const void *addr) } extern int is_vmalloc_addr(const void *addr); +void si_meminfo(struct sysinfo *si); #endif /* _LINUX_MM_H_ */ diff --git a/sys/compat/linuxkpi/common/src/linux_page.c b/sys/compat/linuxkpi/common/src/linux_page.c index 63564f42a16c..59ed47c175b4 100644 --- a/sys/compat/linuxkpi/common/src/linux_page.c +++ b/sys/compat/linuxkpi/common/src/linux_page.c @@ -63,6 +63,14 @@ __FBSDID("$FreeBSD$"); #include <linux/preempt.h> #include <linux/fs.h> +void +si_meminfo(struct sysinfo *si) +{ + si->totalram = physmem; + si->totalhigh = 0; + si->mem_unit = PAGE_SIZE; +} + void * linux_page_address(struct page *page) { |
