Page MenuHomeFreeBSD

Prepare for adding psind == 1 support to armv6's pmap_enter()
ClosedPublic

Authored by alc on Jul 25 2018, 6:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 13, 4:04 PM
Unknown Object (File)
Thu, Oct 9, 1:41 AM
Unknown Object (File)
Thu, Sep 25, 11:43 PM
Unknown Object (File)
Sun, Sep 21, 7:59 AM
Unknown Object (File)
Sep 16 2025, 10:04 AM
Unknown Object (File)
Sep 13 2025, 2:43 AM
Unknown Object (File)
Sep 10 2025, 3:43 AM
Unknown Object (File)
Sep 10 2025, 2:08 AM
Subscribers

Details

Summary

Precompute the new PTE before entering the critical section.

Eliminate duplication of the pmap and pv list unlock operations in pmap_enter() by implementing a single return path. Otherwise, the duplication will only increase with the upcoming support for psind == 1.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Could you re-upload the patch with more context, please?

Provide full context, i.e., the entire function.

arm/arm/pmap-v6.c
4073 ↗(On Diff #45855)

This should be return (rv); now, for 'goto out' to work ?

arm/arm/pmap-v6.c
4073 ↗(On Diff #45855)

Indeed. Thank you.

Correct the return value.

alc marked 2 inline comments as done.Jul 26 2018, 6:55 PM
arm/arm/pmap-v6.c
3991 ↗(On Diff #45887)

In a separate change, someone should replace the pte2_is_managed() here and a couple other places by a PG_UNMANAGED test on m. Unlike x86, armv6 doesn't have an actual PTE2_MANAGED bit in the PTE, so this winds up being a more expensive PHYS_TO_VM_PAGE() just to get the vm_page_t and a PG_UNMANAGED test on that page. When, in several instance, we already have the vm_page_t.

mmel added a subscriber: mmel.

Applied, booted new kernel and make buildworld passed without problem.
LGTM.
Thanks for your ARM effort.

This revision is now accepted and ready to land.Jul 29 2018, 9:51 AM
This revision was automatically updated to reflect the committed changes.