Page MenuHomeFreeBSD

powerpc/booke: Use power-of-two mappings in 64-bit pmap_mapdev
ClosedPublic

Authored by jhibbits on Apr 1 2020, 2:12 AM.
Tags
None
Referenced Files
F169804924: D24248.id70422.diff
Wed, Sep 2, 3:09 PM
F169707410: D24248.diff
Wed, Sep 2, 8:34 AM
Unknown Object (File)
Tue, Sep 1, 7:10 AM
Unknown Object (File)
Mon, Aug 31, 7:11 PM
Unknown Object (File)
Mon, Aug 31, 3:25 PM
Unknown Object (File)
Mon, Aug 31, 8:46 AM
Unknown Object (File)
Mon, Aug 31, 7:46 AM
Unknown Object (File)
Sat, Aug 29, 3:29 PM
Subscribers

Details

Summary

This reduces the precious TLB1 entry consumption (64 possible in
existing 64-bit cores), by adjusting the size and alignment of a device
mapping to a power of 2, to encompass the full mapping and its
surroundings.

One caveat with this: If a mapping really is smaller than a power of 2,
it's possible to get a machine check or hang if the 'missing' physical
space is accessed. In practice this should not be an issue for users,
as devices overwhelmingly have physical spaces on power-of-two sizes and
alignments, and any design that includes devices which don't follow this
can be addressed by undefining the POW2_MAPPINGS guard.

Diff Detail

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

Event Timeline

Works for me on RB800 and X5000.

sys/powerpc/booke/pmap.c
2625 ↗(On Diff #70085)

Does this need ::: "memory" or does clang pick up on the side effects already?

This revision is now accepted and ready to land.Apr 10 2020, 9:37 PM