mirror of https://gitee.com/openkylin/linux.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 <catalin.marinas@arm.com> Reported-by: Matthew Leach <matthew.leach@arm.com> Acked-by: Will Deacon <will.deacon@arm.com>
This commit is contained in:
parent
710be9ac4e
commit
4a12cae7ef
|
@ -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 }
|
||||
|
|
Loading…
Reference in New Issue