From: Catalin Marinas Date: Fri, 25 Oct 2013 14:48:33 +0000 (+0100) Subject: arm64: Fix the endianness of arch_spinlock_t X-Git-Tag: firefly_0821_release~176^2~5049^2~18 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4a12cae7ef2612eb094c4b48e8b37cf837e3df55;p=firefly-linux-kernel-4.4.55.git arm64: Fix the endianness of arch_spinlock_t The owner and next members of the arch_spinlock_t structure need to be swapped when compiling for big endian. Signed-off-by: Catalin Marinas Reported-by: Matthew Leach Acked-by: Will Deacon --- diff --git a/arch/arm64/include/asm/spinlock_types.h b/arch/arm64/include/asm/spinlock_types.h index 87692750ed94..b8d383665f56 100644 --- a/arch/arm64/include/asm/spinlock_types.h +++ b/arch/arm64/include/asm/spinlock_types.h @@ -23,8 +23,13 @@ #define TICKET_SHIFT 16 typedef struct { +#ifdef __AARCH64EB__ + u16 next; + u16 owner; +#else u16 owner; u16 next; +#endif } __aligned(4) arch_spinlock_t; #define __ARCH_SPIN_LOCK_UNLOCKED { 0 , 0 }