Implement si_meminfo() in the LinuxKPI.
Submitted by: Johannes Lundberg <johalun0@gmail.com> MFC after: 1 week Sponsored by: Limelight Networks Sponsored by: Mellanox Technologies
This commit is contained in:
parent
0f69aa3ba1
commit
36d6e32f90
@ -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_ */
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user