]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
amd64: Eliminate a redundant test from pmap_enter_object()
authorAlan Cox <alc@FreeBSD.org>
Sat, 24 Jul 2021 03:50:10 +0000 (22:50 -0500)
committerAlan Cox <alc@FreeBSD.org>
Sat, 24 Jul 2021 04:15:42 +0000 (23:15 -0500)
commitb7de535288362b072cf2801007e4d7e0e903d467
treefdbc325b92af99073b1ed19c60e3f6420c88c4b9
parent47aeda7b70555049eccd7f020365aec031f41c62
amd64: Eliminate a redundant test from pmap_enter_object()

The call to pmap_allow_2m_x_page() in pmap_enter_object() is redundant.
Specifically, even without the call to pmap_allow_2m_x_page() in
pmap_enter_object(), pmap_allow_2m_x_page() is eventually called by
pmap_enter_pde(), so the outcome will be the same.  Essentially,
calling pmap_allow_2m_x_page() in pmap_enter_object() amounts to
"optimizing" for the unexpected case.

Reviewed by: kib
MFC after: 1 week
sys/amd64/amd64/pmap.c