mirror of
https://github.com/opnsense/src.git
synced 2026-02-18 18:20:26 -05:00
LinuxKPI: replace vtophys+PHYS_TO_VM_PAGE with virt_to_page
Rather than using the FreeBSD internal calls vtophys() and PHYS_TO_VM_PAGE() use the already existing LinuxKPI abstraction for this called virt_to_page(). This reduces the amount of compat code to maintain and will allow further work on struct [vm_]page. This should be a NOP. Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41257
This commit is contained in:
parent
d1ea07642c
commit
dcb0c54968
1 changed files with 2 additions and 2 deletions
|
|
@ -138,7 +138,7 @@ linux_alloc_pages(gfp_t flags, unsigned int order)
|
|||
if (vaddr == 0)
|
||||
return (NULL);
|
||||
|
||||
page = PHYS_TO_VM_PAGE(vtophys((void *)vaddr));
|
||||
page = virt_to_page((void *)vaddr);
|
||||
|
||||
KASSERT(vaddr == (vm_offset_t)page_address(page),
|
||||
("Page address mismatch"));
|
||||
|
|
@ -526,7 +526,7 @@ linuxkpi_page_frag_free(void *addr)
|
|||
{
|
||||
vm_page_t page;
|
||||
|
||||
page = PHYS_TO_VM_PAGE(vtophys(addr));
|
||||
page = virt_to_page(addr);
|
||||
linux_free_pages(page, 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue