aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-11-16 16:19:32 -0500
committerDavid S. Miller <davem@davemloft.net>2014-11-16 16:19:32 -0500
commit5a2b59d3993e8ca4f7788a48a23e5cb303f26954 (patch)
tree6924ab034074c2071e4fcd04ce5d66f08f79988f /arch
parent1a17fdc4f4ed06b63fac1937470378a5441a663a (diff)
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. Reported-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/include/uapi/asm/swab.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/sparc/include/uapi/asm/swab.h b/arch/sparc/include/uapi/asm/swab.h
index a34ad079487e..4c7c12d69bea 100644
--- a/arch/sparc/include/uapi/asm/swab.h
+++ b/arch/sparc/include/uapi/asm/swab.h
@@ -9,9 +9,9 @@ static inline __u16 __arch_swab16p(const __u16 *addr)
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_swab16p 17#define __arch_swab16p __arch_swab16p
@@ -20,9 +20,9 @@ static inline __u32 __arch_swab32p(const __u32 *addr)
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_swab32p 28#define __arch_swab32p __arch_swab32p
@@ -31,9 +31,9 @@ static inline __u64 __arch_swab64p(const __u64 *addr)
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_swab64p 39#define __arch_swab64p __arch_swab64p