Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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 }