[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aQzKjZci6kgMTziA@finisterre.sirena.org.uk>
Date: Thu, 6 Nov 2025 16:19:25 +0000
From: Mark Brown <broonie@...nel.org>
To: André Almeida <andrealmeid@...lia.com>
Cc: Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>, Mark Rutland <mark.rutland@....com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
kernel-dev@...lia.com, Ryan Houdek <houdek.ryan@...-emu.org>,
Billy Laws <blaws05@...il.com>
Subject: Re: [RFC PATCH 1/1] arch: arm64: Implement unaligned atomic emulation
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;
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists