HomeFreeBSD

uma: Make the cache alignment mask unsigned

Description

uma: Make the cache alignment mask unsigned

In uma_set_align_mask(), ensure that the passed value doesn't have its
highest bit set, which would lead to problems since keg/zone alignment
is internally stored as signed integers. Such big values do not make
sense anyway and indicate some programming error. A future commit will
introduce checks for this case and other ones.

Reviewed by: kib, markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42262

(cherry picked from commit 3d8f548b9e5772ff6890bdc01f7ba7b76203857d)

Approved by: markj (mentor)

Details

Provenance
olceAuthored on Oct 13 2023, 12:49 PM
Reviewer
kib
Differential Revision
D42262: uma: Make the cache alignment mask unsigned
Parents
rGf056e19abe20: arm: Simplify get_cachetype_cp15()
Branches
Unknown
Tags
Unknown