mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-22 03:04:34 +01:00
LinuxKPI: Add page_to_virt function
Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45843
This commit is contained in:
parent
742088d9fb
commit
80aa295a52
@ -72,6 +72,7 @@ pgprot2cachemode(pgprot_t prot)
|
||||
return (VM_MEMATTR_DEFAULT);
|
||||
}
|
||||
|
||||
#define page_to_virt(page) linux_page_address(page)
|
||||
#define virt_to_page(x) PHYS_TO_VM_PAGE(vtophys(x))
|
||||
#define page_to_pfn(pp) (VM_PAGE_TO_PHYS(pp) >> PAGE_SHIFT)
|
||||
#define pfn_to_page(pfn) (PHYS_TO_VM_PAGE((pfn) << PAGE_SHIFT))
|
||||
|
Loading…
Reference in New Issue
Block a user