igt-gpu-tools: fix build on non-x86 platforms
PATCH v5 1/1 igt-gpu-tools: fix build on non-x86 platforms
From: Dmitry Baryshkov <[email protected]>
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'
---
v5: Move Upstream-Status to the carried patch
...t-pause-mnemonic-only-on-x86-x86_64-.patch | 37 +++++++++++++++++++ .../igt-gpu-tools/igt-gpu-tools_2.6.bb | 1 + 2 files changed, 38 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
meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools/0001-lib-amdgpu-insert-pause-mnemonic-only-on-x86-x86_64-.patch new file +37 -0
@@ -0,0 +1,37 @@ +From dc072dc0fc680a055d0cdf5adfdccbab6d0566d6 Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov <[email protected]> +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: Backport [https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/commit/125c0289617f3c7ba7ee376ea1d8aabd2ff5afdc] + +Signed-off-by: Dmitry Baryshkov <[email protected]> +--- + 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 + } + } +
meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_2.6.bb +1 -0
@@ -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"
Signature · 1 line
2.56.0
Jose,
Thanks for the fix. When people were discussing it on the YP patch review call today, the question arose: Why didn't the YP autobuilder catch this error and are there more inline assembly issues that we are not testing and catching at build time ?
Can you look into that or explain why it's not worth doing so?
Thanks,
../Randy
Quoted 86 lines · Jose Quaresma via lists.openembedded.org
From: Dmitry Baryshkov<[email protected]>
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.oAssembler messages:
{standard input}:3702: Error: unknown mnemonicpause' --pause'Signed-off-by Dmitry Baryshkov<[email protected]>Signed-off-by Jose Quaresma<[email protected]>---
v5: Move Upstream-Status to the carried patch
...t-pause-mnemonic-only-on-x86-x86_64-.patch | 37 +++++++++++++++++++ .../igt-gpu-tools/igt-gpu-tools_2.6.bb | 1 + 2 files changed, 38 insertions(+)create mode 100644
meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools/0001-lib-amdgpu-insert-pause-mnemonic-only-on-x86-x86_64-.patchmeta/recipes-graphics/igt-gpu-tools/igt-gpu-tools/0001-lib-amdgpu-insert-pause-mnemonic-only-on-x86-x86_64-.patch new file +37
-0@@ -0,0 +1,37 @@ +From dc072dc0fc680a055d0cdf5adfdccbab6d0566d6 Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov<[email protected]> +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: Backport [https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/commit/125c0289617f3c7ba7ee376ea1d8aabd2ff5afdc] + +Signed-off-by: Dmitry Baryshkov<[email protected]> +--- + 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 + } + } +meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_2.6.bb +1
-1@@ -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" -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group.
View/Reply Online (#248920):https://lists.openembedded.org/g/openembedded-core/message/248920 Mute This Topic:https://lists.openembedded.org/mt/121991366/3616765
Group Owner:[email protected] Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 2 lines
# Randy MacLeod # Wind River Linux
Hi Randy,
Quoted 8 lines · Randy MacLeod
Jose,
Thanks for the fix. When people were discussing it on the YP patch review call today,
the question arose: Why didn't the YP autobuilder catch this error and are there more
inline assembly issues that we are not testing and catching at build time ?
Taking a quick look at the layer, I observe that this tool is not a dependency of any other
package, nor is it included in any image.
However, it should be included in the bitbake world building. I don't know if it will be excluded due to some setting.
Quoted 3 lines
Can you look into that or explain why it's not worth doing so?
I would very much like to be able to help with this part, but my knowledge regarding
autobuilder is very limited.
Jose
Quoted 100 lines
Thanks,
../RandyOn 2026-10-29 05:37, Jose Quaresma via lists.openembedded.org wrote:
From: Dmitry Baryshkov <[email protected]> <[email protected]>
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.oAssembler messages:
{standard input}:3702: Error: unknown mnemonicpause' --pause'Signed-off-by Dmitry Baryshkov <[email protected]> <[email protected]>Signed-off-by Jose Quaresma <[email protected]> <[email protected]>---
v5: Move Upstream-Status to the carried patch
...t-pause-mnemonic-only-on-x86-x86_64-.patch | 37 +++++++++++++++++++ .../igt-gpu-tools/igt-gpu-tools_2.6.bb | 1 + 2 files changed, 38 insertions(+) create mode 100644 meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools/0001-lib-amdgpu-insert-pause-mnemonic-only-on-x86-x86_64-.patchmeta/recipes-graphics/igt-gpu-tools/igt-gpu-tools/0001-lib-amdgpu-insert-pause-mnemonic-only-on-x86-x86_64-.patch new file +37
-0@@ -0,0 +1,37 @@ +From dc072dc0fc680a055d0cdf5adfdccbab6d0566d6 Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov <[email protected]> <[email protected]> +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: Backport [https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/commit/125c0289617f3c7ba7ee376ea1d8aabd2ff5afdc] + +Signed-off-by: Dmitry Baryshkov <[email protected]> <[email protected]> +--- + 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 + } + } +meta/recipes-graphics/igt-gpu-tools/igt-gpu-tools_2.6.bb +1
-1@@ -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} <http://gitlab.freedesktop.org/drm/igt-gpu-tools.git;protocol=https;branch=master;tag=v$%7BPV%7D> \ + 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" -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group.
View/Reply Online (#248920): https://lists.openembedded.org/g/openembedded-core/message/248920
Mute This Topic: https://lists.openembedded.org/mt/121991366/3616765
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=---
# Randy MacLeod
# Wind River Linux
Hi Jose,
Add Ajay, explained below.
Quoted 14 lines · Jose Quaresma
Hi Randy,
On Tue, Nov 3, 2026 at 10:04 PM Randy MacLeod <[email protected]> wrote:
Jose,
Thanks for the fix. When people were discussing it on the YP patch review call today,
the question arose: Why didn't the YP autobuilder catch this error and are there more
inline assembly issues that we are not testing and catching at build time ?
Quoted 5 lines
Taking a quick look at the layer, I observe that this tool is not a dependency of any other package, nor is it included in any image.
However, it should be included in the bitbake world building. I don't know if it will be excluded due to some setting.
Yeah, that's a bit odd.
Quoted 6 lines
Can you look into that or explain why it's not worth doing so?
I would very much like to be able to help with this part, but my knowledge regarding autobuilder is very limited.
Understood.
Ajay and I are hoping to make use of, and ideally add to, the YP AB tests so we will try to consider that as we ramp up that work over the coming months.
Thanks again,
../Randy
Quoted 102 lines
Jose
Thanks, ../Randy On 2026-10-29 05:37, Jose Quaresma via lists.openembedded.org <https://urldefense.com/v3/__http://lists.openembedded.org__;!!AjveYdw8EvQ!Y1KNjcfrqKOJg8dyHnKeTia9K_6kTfsfJHGUrnLTN_4W2ErtNcU508mS5-JSMPP44e1V4Zh_TjJwpW94TwU0Ph7_avOUN81Tmt0$> wrote:Quoted 78 lines
From: Dmitry Baryshkov<[email protected]> 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<[email protected]> Signed-off-by: Jose Quaresma<[email protected]> --- v5: Move Upstream-Status to the carried patch ...t-pause-mnemonic-only-on-x86-x86_64-.patch | 37 +++++++++++++++++++ .../igt-gpu-tools/igt-gpu-tools_2.6.bb | 1 + 2 files changed, 38 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 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..38582bf1d4 --- /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,37 @@ +From dc072dc0fc680a055d0cdf5adfdccbab6d0566d6 Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov<[email protected]> +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: Backport [https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/commit/125c0289617f3c7ba7ee376ea1d8aabd2ff5afdc] + +Signed-off-by: Dmitry Baryshkov<[email protected]> +--- + 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"Quoted 8 lines
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#248920):https://lists.openembedded.org/g/openembedded-core/message/248920 Mute This Topic:https://lists.openembedded.org/mt/121991366/3616765 Group Owner:[email protected] Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=---
# Randy MacLeod
# Wind River Linux
Signature · 2 lines
# Randy MacLeod # Wind River Linux
Quoted 12 lines · Randy MacLeod via openembedded-core
Thanks for the fix. When people were discussing it on the YP patch review
Quoted 6 lines
call today,
the question arose: Why didn't the YP autobuilder catch this error and are there more
inline assembly issues that we are not testing and catching at build time ?Taking a quick look at the layer, I observe that this tool is not a dependency of any other
package, nor is it included in any image.
Quoted 6 lines
However, it should be included in the bitbake world building. I don't know if it will be excluded due to some setting.
Yeah, that's a bit odd.
If I remember right world builds are only targeting x86 and 32 bit x86. Arm (or risc-v) builds only build particular images, and that's perhaps why this fail wasn't exposed by the AB.
Alex