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
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42262

(cherry picked from commit 3d8f548b9e5772ff6890bdc01f7ba7b76203857d)

Details

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