Hi Jonathan,
On 1/5/26 16:34, Jonathan Cameron wrote:
On Fri, 19 Dec 2025 18:11:05 +0000
Ben Horgan [off-list ref] wrote:
quoted
In the test__props_mismatch() kunit test we rely on the struct mpam_props
being packed to ensure memcmp doesn't consider packing. Making it packed
reduces the alignment of the features bitmap and so breaks a requirement
for the use of atomics. As we don't rely on the set/clear of these bits
being atomic, just make them non-atomic.
oh. That's a bit horrible.
Whilst I guess no one is likely to 'upgrade' these it feels odd enough that
I'd be tempted to leave a breadcrumb of a comment next to them on why
they must be the non atomic versions.
Sure, I've added the comment:
The non-atomic get/set operations are used because if struct mpam_props
is packed, the alignment requirements for atomics aren't met.
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Jonathan
quoted
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Thanks,
Ben