Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/amdgpu: insert pause mnemonic only on x86 / x86_64 platforms
@ 2026-10-02 19:14 Dmitry Baryshkov
  2026-10-02 20:35 ` ✓ Xe.CI.BAT: success for " Patchwork
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Dmitry Baryshkov @ 2026-10-02 19:14 UTC (permalink / raw)
  To: igt-dev

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>
---
 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 418db286f81f..494934c1c321 100644
--- a/tests/amdgpu/amd_basic.c
+++ b/tests/amdgpu/amd_basic.c
@@ -705,8 +705,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
 	}
 }
 
-- 
2.53.0


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

end of thread, other threads:[~2026-10-22 13:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-02 19:14 [PATCH i-g-t] tests/amdgpu: insert pause mnemonic only on x86 / x86_64 platforms Dmitry Baryshkov
2026-10-02 20:35 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-10-02 20:45 ` ✓ i915.CI.BAT: " Patchwork
2026-10-02 22:26 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-10-03 18:32 ` ✗ i915.CI.Full: " Patchwork
2026-10-06 14:29 ` [PATCH i-g-t] " Kamil Konieczny
2026-10-06 23:08   ` vitaly prosyak
2026-10-20 19:31     ` Kamil Konieczny
2026-10-21 14:58       ` vitaly prosyak
2026-10-22 13:13         ` Kamil Konieczny
2026-10-08 14:21 ` Kamil Konieczny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox