[RFC PATCH 1/1] arch: arm64: Implement unaligned atomic emulation
Mark Brown
broonie at kernel.org
Thu Nov 6 08:19:25 PST 2025
On Thu, Nov 06, 2025 at 01:07:35PM -0300, André Almeida wrote:
> +int set_unalign_atomic_ctl(unsigned int val)
> +{
> + unsigned long valid_mask = PR_ARM64_UNALIGN_ATOMIC_EMULATE;
> + if (val & ~valid_mask)
> + return -EINVAL;
> +
> + /*
> + * TODO: check if this is running in a ARM v8.1 or greater.
> + * Refuse otherwise.
> + */
The code should check for the specific feature you're relying on, not
the architecture level which isn't really a technically discoverable
thing, something like:
if (!cpus_have_final_cap(ARM64_HAS_LDAPR))
return -EINVAL;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20251106/7c430fee/attachment.sig>
More information about the linux-arm-kernel
mailing list