From: Rosen Penev Date: Sat, 30 May 2026 00:36:25 +0000 (-0700) Subject: ata: pata_ep93xx: avoid asm on non ARM X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cde1e86eec1c5de7b83bfb4e3ae26755e61a54d2;p=thirdparty%2Fkernel%2Flinux.git ata: pata_ep93xx: avoid asm on non ARM The raw ARM asm delay loop prevents COMPILE_TEST builds on non-ARM architectures. Guard it with CONFIG_ARM and provide a cpu_relax() fallback for compilation on other architectures. Signed-off-by: Rosen Penev Signed-off-by: Niklas Cassel --- diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c index b2b9e0058333e..f7e87d6af2641 100644 --- a/drivers/ata/pata_ep93xx.c +++ b/drivers/ata/pata_ep93xx.c @@ -204,6 +204,7 @@ static void ep93xx_pata_enable_pio(void __iomem *base, int pio_mode) */ static void ep93xx_pata_delay(unsigned long count) { +#ifdef CONFIG_ARM __asm__ volatile ( "0:\n" "mov r0, r0\n" @@ -212,6 +213,10 @@ static void ep93xx_pata_delay(unsigned long count) : "=r" (count) : "0" (count) ); +#else + while (count--) + cpu_relax(); +#endif } static unsigned long ep93xx_pata_wait_for_iordy(void __iomem *base,