]> Pileus Git - ~andy/linux/blobdiff - arch/arm64/include/asm/spinlock_types.h
arm64: Fix the endianness of arch_spinlock_t
[~andy/linux] / arch / arm64 / include / asm / spinlock_types.h
index 9a494346efede851956b6e24b7c20c6f09415733..b8d383665f56b04a2d44d85664660a5d46b6e40e 100644 (file)
 # error "please don't include this file directly"
 #endif
 
-/* We only require natural alignment for exclusive accesses. */
-#define __lock_aligned
+#define TICKET_SHIFT   16
 
 typedef struct {
-       volatile unsigned int lock;
-} arch_spinlock_t;
+#ifdef __AARCH64EB__
+       u16 next;
+       u16 owner;
+#else
+       u16 owner;
+       u16 next;
+#endif
+} __aligned(4) arch_spinlock_t;
 
-#define __ARCH_SPIN_LOCK_UNLOCKED      { 0 }
+#define __ARCH_SPIN_LOCK_UNLOCKED      { 0 , 0 }
 
 typedef struct {
        volatile unsigned int lock;