diff options
author | Mike Marshall | 2016-01-15 14:22:14 -0500 |
---|---|---|
committer | Mike Marshall | 2016-01-15 14:22:14 -0500 |
commit | 5e1f3938f9e4ef539031d639879cb1cea870fab5 (patch) | |
tree | b262a7c002b05b7bc800a106d6ca6777dabe15bf /arch/arm64/include/asm/barrier.h | |
parent | 1808f8cc6cb2842c53147eccfd5e88044d0d22a6 (diff) | |
parent | afd2ff9b7e1b367172f18ba7f693dfb62bdcb2dc (diff) |
Orangefs: merge with V4.4
Merge tag 'v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into current
Linux 4.4
Diffstat (limited to 'arch/arm64/include/asm/barrier.h')
-rw-r--r-- | arch/arm64/include/asm/barrier.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/arm64/include/asm/barrier.h b/arch/arm64/include/asm/barrier.h index 624f9679f4b0..9622eb48f894 100644 --- a/arch/arm64/include/asm/barrier.h +++ b/arch/arm64/include/asm/barrier.h @@ -64,27 +64,31 @@ do { \ #define smp_load_acquire(p) \ ({ \ - typeof(*p) ___p1; \ + union { typeof(*p) __val; char __c[1]; } __u; \ compiletime_assert_atomic_type(*p); \ switch (sizeof(*p)) { \ case 1: \ asm volatile ("ldarb %w0, %1" \ - : "=r" (___p1) : "Q" (*p) : "memory"); \ + : "=r" (*(__u8 *)__u.__c) \ + : "Q" (*p) : "memory"); \ break; \ case 2: \ asm volatile ("ldarh %w0, %1" \ - : "=r" (___p1) : "Q" (*p) : "memory"); \ + : "=r" (*(__u16 *)__u.__c) \ + : "Q" (*p) : "memory"); \ break; \ case 4: \ asm volatile ("ldar %w0, %1" \ - : "=r" (___p1) : "Q" (*p) : "memory"); \ + : "=r" (*(__u32 *)__u.__c) \ + : "Q" (*p) : "memory"); \ break; \ case 8: \ asm volatile ("ldar %0, %1" \ - : "=r" (___p1) : "Q" (*p) : "memory"); \ + : "=r" (*(__u64 *)__u.__c) \ + : "Q" (*p) : "memory"); \ break; \ } \ - ___p1; \ + __u.__val; \ }) #define read_barrier_depends() do { } while(0) |