History

sparc64: Fix constraints on swab helpers.

We are reading the memory location, so we have to have a memory constraint in there purely for the sake of showing the data flow to the compiler.

David S. Miller committed 12 years ago

Commit 5a2b59d1 parent 1a17fdc1 file · +6 −6Browse files

Unified · Split

arch/sparc/include/uapi/asm/swab.h+6−6
@@ -9,9 +9,9 @@ static inline __u16 __arch_swab16p(const __u16 *addr) · 8 unmodified lines
9{9{
10 __u16 ret;10 __u16 ret;
11 11
12 __asm__ __volatile__ ("lduha [%1] %2, %0"12 __asm__ __volatile__ ("lduha [%2] %3, %0"
13 : "=r" (ret)13 : "=r" (ret)
14 : "r" (addr), "i" (ASI_PL));14 : "m" (*addr), "r" (addr), "i" (ASI_PL));
15 return ret;15 return ret;
16}16}
17#define __arch_swab16p __arch_swab16p17#define __arch_swab16p __arch_swab16p
@@ -20,9 +20,9 @@ static inline __u32 __arch_swab32p(const __u32 *addr) · 2 unmodified lines
20{20{
21 __u32 ret;21 __u32 ret;
22 22
23 __asm__ __volatile__ ("lduwa [%1] %2, %0"23 __asm__ __volatile__ ("lduwa [%2] %3, %0"
24 : "=r" (ret)24 : "=r" (ret)
25 : "r" (addr), "i" (ASI_PL));25 : "m" (*addr), "r" (addr), "i" (ASI_PL));
26 return ret;26 return ret;
27}27}
28#define __arch_swab32p __arch_swab32p28#define __arch_swab32p __arch_swab32p
@@ -31,9 +31,9 @@ static inline __u64 __arch_swab64p(const __u64 *addr) · 2 unmodified lines
31{31{
32 __u64 ret;32 __u64 ret;
33 33
34 __asm__ __volatile__ ("ldxa [%1] %2, %0"34 __asm__ __volatile__ ("ldxa [%2] %3, %0"
35 : "=r" (ret)35 : "=r" (ret)
36 : "r" (addr), "i" (ASI_PL));36 : "m" (*addr), "r" (addr), "i" (ASI_PL));
37 return ret;37 return ret;
38}38}
39#define __arch_swab64p __arch_swab64p39#define __arch_swab64p __arch_swab64p