From 10bf671754cbf7780f5fff19a987644e305c647f Mon Sep 17 00:00:00 2001 From: Raphael Poggi Date: Mon, 4 Jul 2016 13:52:55 +0200 Subject: arm: include: swab: use rigth assembly for armv8 Signed-off-by: Raphael Poggi Signed-off-by: Sascha Hauer --- arch/arm/include/asm/swab.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch') diff --git a/arch/arm/include/asm/swab.h b/arch/arm/include/asm/swab.h index 9997ad20ef..3795437831 100644 --- a/arch/arm/include/asm/swab.h +++ b/arch/arm/include/asm/swab.h @@ -33,7 +33,11 @@ static inline __attribute_const__ __u16 __arch_swab16(__u16 x) static inline __attribute_const__ __u32 __arch_swab32(__u32 x) { +#if __LINUX_ARM_ARCH__ == 8 + __asm__ ("rev %w0, %w1" : "=r" (x) : "r" (x)); +#else __asm__ ("rev %0, %1" : "=r" (x) : "r" (x)); +#endif return x; } #define __arch_swab32 __arch_swab32 -- cgit v1.2.3