[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <397def6c-d730-4e10-8a8b-c7c30c07281f@arm.com>
Date: Tue, 6 Jan 2026 11:11:19 +0000
From: Ben Horgan <ben.horgan@....com>
To: Jonathan Cameron <jonathan.cameron@...wei.com>
Cc: amitsinght@...vell.com, baisheng.gao@...soc.com,
baolin.wang@...ux.alibaba.com, carl@...amperecomputing.com,
dave.martin@....com, david@...nel.org, dfustini@...libre.com,
fenghuay@...dia.com, gshan@...hat.com, james.morse@....com,
kobak@...dia.com, lcherian@...vell.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
peternewman@...gle.com, punit.agrawal@....qualcomm.com,
quic_jiles@...cinc.com, reinette.chatre@...el.com, rohit.mathew@....com,
scott@...amperecomputing.com, sdonthineni@...dia.com,
tan.shaopeng@...itsu.com, xhao@...ux.alibaba.com, catalin.marinas@....com,
will@...nel.org, corbet@....net, maz@...nel.org, oupton@...nel.org,
joey.gouly@....com, suzuki.poulose@....com, kvmarm@...ts.linux.dev
Subject: Re: [PATCH v2 03/45] arm_mpam: Use non-atomic bitops when modifying
feature bitmap
Hi Jonathan,
On 1/5/26 16:34, Jonathan Cameron wrote:
> On Fri, 19 Dec 2025 18:11:05 +0000
> Ben Horgan <ben.horgan@....com> wrote:
>
>> 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@...wei.com>
>
> Jonathan
>
>
>>
>> Signed-off-by: Ben Horgan <ben.horgan@....com>
Thanks,
Ben
Powered by blists - more mailing lists