Commit 4a12cae7 authored by Catalin Marinas's avatar Catalin Marinas

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: default avatarCatalin Marinas <catalin.marinas@arm.com>
Reported-by: default avatarMatthew Leach <matthew.leach@arm.com>
Acked-by: default avatarWill Deacon <will.deacon@arm.com>
parent 710be9ac
...@@ -23,8 +23,13 @@ ...@@ -23,8 +23,13 @@
#define TICKET_SHIFT 16 #define TICKET_SHIFT 16
typedef struct { typedef struct {
#ifdef __AARCH64EB__
u16 next;
u16 owner;
#else
u16 owner; u16 owner;
u16 next; u16 next;
#endif
} __aligned(4) arch_spinlock_t; } __aligned(4) arch_spinlock_t;
#define __ARCH_SPIN_LOCK_UNLOCKED { 0 , 0 } #define __ARCH_SPIN_LOCK_UNLOCKED { 0 , 0 }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment