Historically Linux 'page' was aliased to 'vm_page' which meant that all
"page accesses" went directly to our FreeBSD native system.
This was (any likely is) the most efficient way of doing this but it
means that we cannot (or do not want to) extend vm_page for LinuxKPI
specific fields leaving us in a limbo.
drm-kmod in the past has worked around this by changing code with
FreeBSD specific workarounds.
With the mt76 wireless drivers using page pools we are at a stage
that rather than re-writing the code we bite the bullet and rework
the entire LinuxKPI code to deal with a Linux struct page instead
building a 'shadow table' for mapping vm_page to page and back
in order to still have access to the 'backing store'.
In order to allow for a smoother transition until the initial code
can be reviewed, allow both the old alias and the new struct page
world to be compiled. That way the majority of people will not
be affected by the change at first, and people who want to try mt76
can define PAGE_IS_LKPI_PAGE in page.h (and manually re-compile drm-kmod
if needed).
The first cut of code is likely neither as efficient nor as memory
saving as it could be as we upfront allocate a full 'shadow table'
rather than having a (way) smaller pool and using a mapping or
allocating on demand. First try to make this work, then someone
with a lot more VM knowledge can try to make this work fast and
efficient.
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks