diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2013-10-25 10:48:33 -0400 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2013-10-25 11:10:22 -0400 |
commit | 4a12cae7ef2612eb094c4b48e8b37cf837e3df55 (patch) | |
tree | 5e83a91e0358efb93ef29db454487ba7f5b347e5 | |
parent | 710be9ac4ea0d2e02a2c4aa625795e65bf3db5b1 (diff) |
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 <catalin.marinas@arm.com>
Reported-by: Matthew Leach <matthew.leach@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
-rw-r--r-- | arch/arm64/include/asm/spinlock_types.h | 5 |
1 files changed, 5 insertions, 0 deletions
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 @@ | |||
23 | #define TICKET_SHIFT 16 | 23 | #define TICKET_SHIFT 16 |
24 | 24 | ||
25 | typedef struct { | 25 | typedef struct { |
26 | #ifdef __AARCH64EB__ | ||
27 | u16 next; | ||
28 | u16 owner; | ||
29 | #else | ||
26 | u16 owner; | 30 | u16 owner; |
27 | u16 next; | 31 | u16 next; |
32 | #endif | ||
28 | } __aligned(4) arch_spinlock_t; | 33 | } __aligned(4) arch_spinlock_t; |
29 | 34 | ||
30 | #define __ARCH_SPIN_LOCK_UNLOCKED { 0 , 0 } | 35 | #define __ARCH_SPIN_LOCK_UNLOCKED { 0 , 0 } |