LinuxKPI: mm.h: implement virt_to_head_page()
Implement virt_to_head_page(). Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D38240
This commit is contained in:
parent
c755a7cc1e
commit
70b97048a0
@ -41,6 +41,7 @@
|
||||
#include <linux/list.h>
|
||||
#include <linux/mmap_lock.h>
|
||||
#include <linux/shrinker.h>
|
||||
#include <linux/page.h>
|
||||
|
||||
#include <asm/pgtable.h>
|
||||
|
||||
@ -151,6 +152,13 @@ struct sysinfo {
|
||||
uint32_t mem_unit; /* Memory unit size in bytes */
|
||||
};
|
||||
|
||||
static inline struct page *
|
||||
virt_to_head_page(const void *p)
|
||||
{
|
||||
|
||||
return (virt_to_page(p));
|
||||
}
|
||||
|
||||
/*
|
||||
* Compute log2 of the power of two rounded up count of pages
|
||||
* needed for size bytes.
|
||||
|
Loading…
x
Reference in New Issue
Block a user