HomeFreeBSD

amd64 pmap: simplify vtopte() and vtopde()

Description

amd64 pmap: simplify vtopte() and vtopde()

Pre-calculate masks and page table/page directory bases, for LA48 and
LA57 cases, trading a conditional for the memory accesses.

This shaves 672 bytes of .text, by the cost of 32 .data bytes. Note
that eliminated code contained one conditional, and several costly
movabs instructions, which are traded by two memory fetches per
vtop{t,d}e() inlines.

Reviewed by: markj
Discussed with: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D33776

Details

Provenance
kibAuthored on Jan 5 2022, 12:26 AM
Reviewer
markj
Differential Revision
D33776: amd64 pmap: simplify vtopte() and vtopde()
Parents
rGaaaa4fb54e5c: msdosfs: use mntfs vnode for pm_devvp
Branches
Unknown
Tags
Unknown