提交 4a12cae7 编写于 作者: C 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: NCatalin Marinas <catalin.marinas@arm.com>
Reported-by: NMatthew Leach <matthew.leach@arm.com>
Acked-by: NWill Deacon <will.deacon@arm.com>
上级 710be9ac
......@@ -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 }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册