HomeFreeBSD

arm64: Use page_to_pvh() when the vm_page_t is known

Description

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

Details

Provenance
alcAuthored on Jun 21 2021, 7:45 AM
Reviewer
kib
Differential Revision
D30832: arm64: Use page_to_pvh() instead of pa_to_pvh() when the vm_page_t is known
Parents
rGbf7b542e0216: sdhci_fdt: Add gpio_if.h to the source
Branches
Unknown
Tags
Unknown