aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2013-10-25 15:48:33 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2013-10-25 16:10:22 +0100
commit4a12cae7ef2612eb094c4b48e8b37cf837e3df55 (patch)
tree5e83a91e0358efb93ef29db454487ba7f5b347e5 /arch/arm64
parentarm64: big-endian: write CPU holding pen address as LE (diff)
downloadlinux-dev-4a12cae7ef2612eb094c4b48e8b37cf837e3df55.tar.xz
linux-dev-4a12cae7ef2612eb094c4b48e8b37cf837e3df55.zip
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>
Diffstat (limited to 'arch/arm64')
-rw-r--r--arch/arm64/include/asm/spinlock_types.h5
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 @@
#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 }