linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kselftest/arm64: Fix hwcaps selftest build
@ 2023-08-16 18:39 Mark Brown
  2023-08-18 18:04 ` Will Deacon
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2023-08-16 18:39 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Shuah Khan
  Cc: linux-arm-kernel, linux-kselftest, linux-kernel, Mark Brown

The hwcaps selftest currently relies on the assembler being able to
assemble the crc32w instruction but this is not in the base v8.0 so is not
accepted by the standard GCC configurations used by many distributions.
Switch to manually encoding to fix the build.

Fixes: 09d2e95a04ad ("kselftest/arm64: add crc32 feature to hwcap test")
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 tools/testing/selftests/arm64/abi/hwcap.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/arm64/abi/hwcap.c b/tools/testing/selftests/arm64/abi/hwcap.c
index 112b6a219382..3b26a3660292 100644
--- a/tools/testing/selftests/arm64/abi/hwcap.c
+++ b/tools/testing/selftests/arm64/abi/hwcap.c
@@ -42,7 +42,8 @@ static void atomics_sigill(void)
 
 static void crc32_sigill(void)
 {
-	asm volatile("crc32w w0, w0, w1");
+	/* CRC32W W0, W0, W1 */
+	asm volatile(".inst 0x1ac14800" : : : );
 }
 
 static void cssc_sigill(void)

---
base-commit: 358b763ee64b11f45287c286e1f6145729ed49ab
change-id: 20230816-arm64-fix-crc32-build-9d4c94f2e60e

Best regards,
-- 
Mark Brown <broonie@kernel.org>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kselftest/arm64: Fix hwcaps selftest build
  2023-08-16 18:39 [PATCH] kselftest/arm64: Fix hwcaps selftest build Mark Brown
@ 2023-08-18 18:04 ` Will Deacon
  0 siblings, 0 replies; 2+ messages in thread
From: Will Deacon @ 2023-08-18 18:04 UTC (permalink / raw)
  To: Shuah Khan, Catalin Marinas, Mark Brown
  Cc: kernel-team, Will Deacon, linux-kernel, linux-kselftest,
	linux-arm-kernel

On Wed, 16 Aug 2023 19:39:32 +0100, Mark Brown wrote:
> The hwcaps selftest currently relies on the assembler being able to
> assemble the crc32w instruction but this is not in the base v8.0 so is not
> accepted by the standard GCC configurations used by many distributions.
> Switch to manually encoding to fix the build.
> 
> 

Applied to arm64 (for-next/selftests), thanks!

[1/1] kselftest/arm64: Fix hwcaps selftest build
      https://git.kernel.org/arm64/c/94f23ac36f8b

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-18 18:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-16 18:39 [PATCH] kselftest/arm64: Fix hwcaps selftest build Mark Brown
2023-08-18 18:04 ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).