Page MenuHomeFreeBSD

pmap_mapdev: Consistently use vm_paddr_t for the first argument.
ClosedPublic

Authored by jhb on Jul 26 2022, 10:37 PM.
Tags
None
Referenced Files
F81961524: D35961.diff
Tue, Apr 23, 7:31 PM
Unknown Object (File)
Jan 14 2024, 10:30 AM
Unknown Object (File)
Dec 26 2023, 5:11 AM
Unknown Object (File)
Sep 18 2023, 3:48 PM
Unknown Object (File)
Aug 13 2023, 8:32 AM
Unknown Object (File)
May 22 2023, 6:13 PM
Unknown Object (File)
Apr 26 2023, 4:24 AM
Unknown Object (File)
Apr 8 2023, 11:01 AM

Details

Summary

The devmap variants used vm_offset_t for some reason, and a few places
explicitly cast bus addresses to vm_offset_t. (Probably those casts
along with similar casts for vm_size_t should just be removed and
instead permit the compiler to DTRT.)

Sponsored by: DARPA

Diff Detail

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

Event Timeline

jhb requested review of this revision.Jul 26 2022, 10:37 PM
This revision is now accepted and ready to land.Jul 27 2022, 3:19 PM
sys/kern/subr_devmap.c
273

This can probably be reverted back to trunc_page? I think I was just overly cautious.

293

It might be a nice followup if pmap_mapdev() on aarch64 and risc-v just called pmap_mapdev_attr() so we could avoid code duplication.

sys/kern/subr_devmap.c
273

I can't see any reason not to use trunc_page() with a vm_paddr_t...