diff mbox series

[v3] igt-gpu-tools: fix build on non-x86 platforms

Message ID 20261028101022.3308-2-jose.quaresma@oss.qualcomm.com
State New
Headers show
Series [v3] igt-gpu-tools: fix build on non-x86 platforms | expand

Commit Message

Jose Quaresma Oct. 28, 2026, 10:10 a.m. UTC
From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>

The "pause" assembly mnemonic is only available on IA-32 platforms,
breaking e.g. debug IGT builds on ARM / AArch64. 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>
Signed-off-by: Jose Quaresma <jose.quaresma@oss.qualcomm.com>
---

v3: rebase on 2.6

 ...t-pause-mnemonic-only-on-x86-x86_64-.patch | 36 +++++++++++++++++++
 .../igt-gpu-tools/igt-gpu-tools_2.6.bb        |  1 +
 2 files changed, 37 insertions(+)
 create mode 100644 meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools/0001-lib-amdgpu-insert-pause-mnemonic-only-on-x86-x86_64-.patch

Comments

Alexander Kanavin Oct. 28, 2026, 10:28 a.m. UTC | #1
On Wed, 28 Oct 2026 at 11:11, Jose Quaresma via lists.openembedded.org
<jose.quaresma=oss.qualcomm.com@lists.openembedded.org> wrote:

> +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. 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: Pending [for internal clearance]


So what's taking so long with this 'internal clearance'? Will it be
cleared, and why does it need clearance for upstream submission, but not
for oe-core submission?

Alex
Jose Quaresma Oct. 28, 2026, 4:49 p.m. UTC | #2
On Wed, Oct 28, 2026 at 10:29 AM Alexander Kanavin <alex.kanavin@gmail.com>
wrote:

> On Wed, 28 Oct 2026 at 11:11, Jose Quaresma via lists.openembedded.org
> <jose.quaresma=oss.qualcomm.com@lists.openembedded.org> wrote:
>
>> +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. 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: Pending [for internal clearance]
>
>
> So what's taking so long with this 'internal clearance'? Will it be
> cleared, and why does it need clearance for upstream submission, but not
> for oe-core submission?
>

My fault, forget to update the Upstream-Status to backport as it is already
merged

https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/commit/125c0289617f3c7ba7ee376ea1d8aabd2ff5afdc

Jose


>
> Alex
>
diff mbox series

Patch

diff --git a/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools/0001-lib-amdgpu-insert-pause-mnemonic-only-on-x86-x86_64-.patch b/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools/0001-lib-amdgpu-insert-pause-mnemonic-only-on-x86-x86_64-.patch
new file mode 100644
index 0000000000..1fdaad7b0c
--- /dev/null
+++ b/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools/0001-lib-amdgpu-insert-pause-mnemonic-only-on-x86-x86_64-.patch
@@ -0,0 +1,36 @@ 
+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. 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: Pending [for internal clearance]
+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.6.bb b/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_2.6.bb
index d76c2355a1..a46b002b83 100644
--- a/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_2.6.bb
+++ b/meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_2.6.bb
@@ -12,6 +12,7 @@  inherit meson pkgconfig
 SRCREV = "916c79cfb7675ca01607dcd821f8c49d4f633a6f"
 
 SRC_URI = "git://gitlab.freedesktop.org/drm/igt-gpu-tools.git;protocol=https;branch=master;tag=v${PV} \
+           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"