[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aMnTm59nrA5lBxN5@willie-the-truck>
Date: Tue, 16 Sep 2025 22:16:11 +0100
From: Will Deacon <will@...nel.org>
To: Mark Brown <broonie@...nel.org>
Cc: Catalin Marinas <catalin.marinas@....com>,
Jonathan Corbet <corbet@....net>, Marc Zyngier <maz@...nel.org>,
Oliver Upton <oliver.upton@...ux.dev>,
Joey Gouly <joey.gouly@....com>,
Suzuki K Poulose <suzuki.poulose@....com>,
Shuah Khan <shuah@...nel.org>, linux-arm-kernel@...ts.infradead.org,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
kvmarm@...ts.linux.dev, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v3 3/3] kselftest/arm64: Add lsfe to the hwcaps test
On Mon, Aug 18, 2025 at 08:21:20PM +0100, Mark Brown wrote:
> This feature has no traps associated with it so the SIGILL is not reliable.
>
> Signed-off-by: Mark Brown <broonie@...nel.org>
> ---
> tools/testing/selftests/arm64/abi/hwcap.c | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/tools/testing/selftests/arm64/abi/hwcap.c b/tools/testing/selftests/arm64/abi/hwcap.c
> index 002ec38a8bbb..941890f69df6 100644
> --- a/tools/testing/selftests/arm64/abi/hwcap.c
> +++ b/tools/testing/selftests/arm64/abi/hwcap.c
> @@ -17,6 +17,8 @@
> #include <asm/sigcontext.h>
> #include <asm/unistd.h>
>
> +#include <linux/auxvec.h>
> +
> #include "../../kselftest.h"
>
> #define TESTS_PER_HWCAP 3
> @@ -169,6 +171,18 @@ static void lse128_sigill(void)
> : "cc", "memory");
> }
>
> +static void lsfe_sigill(void)
> +{
> + float __attribute__ ((aligned (16))) mem = 0;
> + register float *memp asm ("x0") = &mem;
> +
> + /* LDFADD H0, H0, [X0] */
> + asm volatile(".inst 0x7c200000"
> + : "+r" (memp)
Doesn't this corrupt H0 without the compiler knowing? It's probably
easier to use STFADD.
> + :
> + : "cc", "memory");
Why do you need the "cc" clobber?
Will
Powered by blists - more mailing lists