* [PATCH v2] igt-gpu-tools: fix build on non-x86 platforms
@ 2026-10-02 19:30 Dmitry Baryshkov
2026-10-03 17:32 ` [OE-core] " Mathieu Dubois-Briand
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Baryshkov @ 2026-10-02 19:30 UTC (permalink / raw)
To: openembedded-core
The "pause" assembly mnemonic is only available on IA-32 platforms,
breaking e.g. debug IGT builds on ARM / AArch64. The issue manifests
only with -O1 or -O0, the default -O2 seems to optimize the condition
away.
Guard this inline assembly with the preprocessor checks, making sure
that other platforms don't see the invalid assembly.
FAILED: [code=1] tests/amdgpu/amd_basic.p/amd_basic.c.o
Assembler messages:
{standard input}:3702: Error: unknown mnemonic `pause' -- `pause'
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
...insert-pause-mnemonic-only-on-x86-x86_64-.patch | 39 ++++++++++++++++++++++
.../igt-gpu-tools/igt-gpu-tools_2.5.bb | 1 +
2 files changed, 40 insertions(+)
diff --git a/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools/0001-tests-amdgpu-insert-pause-mnemonic-only-on-x86-x86_64-.patch b/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools/0001-tests-amdgpu-insert-pause-mnemonic-only-on-x86-x86_64-.patch
new file mode 100644
index 000000000000..e9ce806ab171
--- /dev/null
+++ b/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools/0001-tests-amdgpu-insert-pause-mnemonic-only-on-x86-x86_64-.patch
@@ -0,0 +1,39 @@
+From dc072dc0fc680a055d0cdf5adfdccbab6d0566d6 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
+Date: Fri, 26 Jun 2026 22:34:06 +0300
+Subject: [PATCH] lib/amdgpu: insert pause mnemonic only on x86 / x86_64
+ platforms
+
+The "pause" assembly mnemonic is only available on IA-32 platforms,
+breaking e.g. debug IGT builds on ARM / AArch64. The issue manifests
+only with -O1 or -O0, the default -O2 seems to optimize the condition
+away.
+
+Guard this inline assembly with the preprocessor checks, making sure
+that other platforms don't see the invalid assembly.
+
+FAILED: [code=1] tests/amdgpu/amd_basic.p/amd_basic.c.o
+Assembler messages:
+{standard input}:3702: Error: unknown mnemonic `pause' -- `pause'
+
+Upstream-Status: Submitted [https://lore.kernel.org/igt-dev/20261002191401.469214-1-dmitry.baryshkov@oss.qualcomm.com/]
+Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
+---
+ tests/amdgpu/amd_basic.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tests/amdgpu/amd_basic.c b/tests/amdgpu/amd_basic.c
+index 3ad023472136..e5475f337549 100644
+--- a/tests/amdgpu/amd_basic.c
++++ b/tests/amdgpu/amd_basic.c
+@@ -703,8 +703,10 @@ static int wait_for_value64(volatile uint64_t *ptr, uint64_t expected,
+ /* Sleep if interval specified, otherwise tight loop */
+ if (check_interval_ns > 0)
+ nanosleep(&sleep_time, NULL);
++#if defined(x86_64) || defined(i386)
+ else
+ __asm__ __volatile__("pause" ::: "memory"); /* CPU hint for spin-wait */
++#endif
+ }
+ }
+
diff --git a/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_2.5.bb b/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_2.5.bb
index f03bf4663048..1f4353292ff9 100644
--- a/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_2.5.bb
+++ b/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_2.5.bb
@@ -13,6 +13,7 @@ SRCREV = "a8e2cbd2854d7980a9eccecc6e0c801d0824b88f"
SRC_URI = "git://gitlab.freedesktop.org/drm/igt-gpu-tools.git;protocol=https;branch=master;tag=v${PV} \
file://0001-lib-meson.build-do-not-hardcode-the-build-directory-.patch \
+ file://0001-lib-amdgpu-insert-pause-mnemonic-only-on-x86-x86_64-.patch \
"
DEPENDS += "libdrm libpciaccess cairo udev glib-2.0 procps libunwind kmod openssl elfutils alsa-lib json-c bison-native pciutils jansson"
---
base-commit: 8bdc2869a1a9307ee4ad9cc1d662c2fc1ddd9d2c
change-id: 20261002-igt-afbc1c8c48e2
Best regards,
--
With best wishes
Dmitry
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [OE-core] [PATCH v2] igt-gpu-tools: fix build on non-x86 platforms
2026-10-02 19:30 [PATCH v2] igt-gpu-tools: fix build on non-x86 platforms Dmitry Baryshkov
@ 2026-10-03 17:32 ` Mathieu Dubois-Briand
0 siblings, 0 replies; 2+ messages in thread
From: Mathieu Dubois-Briand @ 2026-10-03 17:32 UTC (permalink / raw)
To: dmitry.baryshkov, openembedded-core
On Fri Oct 2, 2026 at 9:30 PM CEST, Dmitry Baryshkov via lists.openembedded.org wrote:
> The "pause" assembly mnemonic is only available on IA-32 platforms,
> breaking e.g. debug IGT builds on ARM / AArch64. The issue manifests
> only with -O1 or -O0, the default -O2 seems to optimize the condition
> away.
>
> Guard this inline assembly with the preprocessor checks, making sure
> that other platforms don't see the invalid assembly.
>
> FAILED: [code=1] tests/amdgpu/amd_basic.p/amd_basic.c.o
> Assembler messages:
> {standard input}:3702: Error: unknown mnemonic `pause' -- `pause'
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
Hi Dmitry,
Thanks for your patch. igt-gpu-tools was recently upgrade to 2.6, and
this patch does not apply cleanly on top of it? Can you send a rebased
version please?
Thanks,
Mathieu
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-03 17:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-02 19:30 [PATCH v2] igt-gpu-tools: fix build on non-x86 platforms Dmitry Baryshkov
2026-10-03 17:32 ` [OE-core] " Mathieu Dubois-Briand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox