Page MenuHomeFreeBSD

subr_devmap: Implement pmap_mapdev with pmap_mapdev_attr
ClosedPublic

Authored by andrew on May 12 2025, 1:05 PM.
Tags
None
Referenced Files
F154066361: D50309.id155328.diff
Sat, Apr 25, 9:49 PM
Unknown Object (File)
Sat, Apr 25, 8:41 AM
Unknown Object (File)
Sat, Apr 25, 8:08 AM
Unknown Object (File)
Fri, Apr 24, 6:39 PM
Unknown Object (File)
Tue, Apr 21, 11:18 PM
Unknown Object (File)
Tue, Apr 21, 9:01 AM
Unknown Object (File)
Thu, Apr 16, 6:18 AM
Unknown Object (File)
Tue, Apr 14, 7:57 AM
Subscribers

Details

Summary

We can now support pmap_mapdev_attr on arm. Switch to use this to
implement pmap_mapdev to reduce duplicate code.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 64126
Build 61010: arc lint + arc unit

Event Timeline

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

Only call devmap_ptov for device mappings

This revision now requires review to proceed.May 13 2025, 10:29 AM
mmel added inline comments.
sys/kern/subr_devmap.c
266

I'm afraid that multiple mappings of the same page with different cache or type properties leads to undefined behavior on most (if not all) architectures. In this case, I don't see a solution other than panic().

KASSERT ma == VM_MEMATTR_DEVICE

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