Page MenuHomeFreeBSD

arm: Make the pmap_kenter signature like arm64
ClosedPublic

Authored by andrew on May 12 2025, 1:04 PM.
Tags
None
Referenced Files
F120280432: D50307.diff
Mon, Jun 16, 5:02 PM
Unknown Object (File)
Sun, Jun 15, 6:25 AM
Unknown Object (File)
Thu, Jun 12, 2:41 AM
Unknown Object (File)
Tue, Jun 10, 4:43 PM
Unknown Object (File)
Sun, Jun 8, 3:40 AM
Unknown Object (File)
Tue, Jun 3, 6:13 PM
Unknown Object (File)
Mon, Jun 2, 9:42 AM
Unknown Object (File)
Sun, Jun 1, 3:28 PM
Subscribers

Details

Summary

To support a common pmap_mapdev_attr change pmap_kenter to include the
size any memory type in the signature.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mhorne added a subscriber: mhorne.

LGTM with one tweak.

sys/arm/arm/mem.c
117–118

Now the relevant range is flushed by pmap_kenter(), so this can be dropped.

This revision is now accepted and ready to land.May 12 2025, 4:00 PM

Split out the mapping part of pmap_kenter to:

  • Remove unneeded tlb flush from mem.c
  • Keep the local only flush in pmap_kenter_temporary
This revision now requires review to proceed.May 12 2025, 4:47 PM
mhorne added inline comments.
sys/arm/arm/pmap-v6.c
1311–1312

It probably makes more sense for this function to be inlined than pmap_kenter()?

Other implementations removed the use of PMAP_INLINE altogether (git log --grep PMAP_INLINE). Not sure what you want to do here, but this question is secondary to the change at hand.

This revision is now accepted and ready to land.May 12 2025, 6:38 PM

Very briefly, I think this clashes with devmap_add_entry(), which is used on armv7 to reduce the TLB load. The pmap_mapdev_attr() function does not respect the required attributes for pages previously mapped by devmap_add_entry(). Imho, we don't have a method for changing page attributes on multiple mapped pages in an architecturally correct way. (And I'm afraid this is true for arm64 , for pages mapped by DMAP and also in some other way).

I'm sorry, I wanted to send it to D50309.