Place the code introduced in r268660 into a separate function that can be
called from uiomove_fromphys. Make the kva pages per-cpu in order to reduce
contention and allow parallel operations on pages not covered by the DMAP.
Also introduce a safety catch in PHYS_TO_DMAP and DMAP_TO_PHYS.
Sponsored by: Citrix Systems R&D
amd64/amd64/pmap.c:
- Introduce a boot-time hook to initialize the per-cpu variables.
- Factor out the code to deal with non DMAP addresses from pmap_copy_pages and place it in pmap_get_vaddr.
amd64/amd64/uio_machdep.c:
- Use pmap_get_vaddr in order to correctly deal with physical addresses not covered by the DMAP.
amd64/include/pmap.h:
- Add the prototypes for the new functions.
amd64/include/vmparam.h:
- Add safety catches to make sure PHYS_TO_DMAP and DMAP_TO_PHYS are only used with addresses covered by the DMAP.