]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
arm64: Use page_to_pvh() when the vm_page_t is known
authorAlan Cox <alc@FreeBSD.org>
Mon, 21 Jun 2021 07:45:21 +0000 (02:45 -0500)
committerAlan Cox <alc@FreeBSD.org>
Mon, 21 Jun 2021 22:25:06 +0000 (17:25 -0500)
commit6f6a166eaf5e59dedb761ea6152417433a841e3b
tree56269cda8bee99cc2fca3f7e6233616eb7ce75e2
parentbf7b542e0216e6bd3bcd5ff46e376643d41f4f9f
arm64: Use page_to_pvh() when the vm_page_t is known

When support for a sparse pv_table was added, the implementation of
pa_to_pvh() changed from a simple constant-time calculation to iterating
over the array vm_phys_segs[].  To mitigate this issue, an alternative
function, page_to_pvh(), was introduced that still runs in constant time
but requires the vm_page_t to be known.  However, three cases where the
vm_page_t is known were not converted to page_to_pvh().  This change
converts those three cases.

Reviewed by: kib, markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D30832
sys/arm64/arm64/pmap.c