projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
35e71f9
)
xtensa: Fix checksum header file
author
Chris Zankel
<chris@zankel.net>
Thu, 16 Apr 2009 07:28:09 +0000
(
00:28
-0700)
committer
Chris Zankel
<chris@zankel.net>
Tue, 12 May 2009 04:48:23 +0000
(21:48 -0700)
We need to add a "memory" dependency (barrier) in assembly macros
that access (read or write) memory. Otherwise, the compiler might
ill-optimize the order of memory accesses.
Signed-off-by: Chris Zankel <chris@zankel.net>
arch/xtensa/include/asm/checksum.h
patch
|
blob
|
blame
|
history
diff --git
a/arch/xtensa/include/asm/checksum.h
b/arch/xtensa/include/asm/checksum.h
index f84d3f00774ae9805ec7039d307a9dc680629f3b..e4d831a307720c4c70b6390c139a0bed9a401ef1 100644
(file)
--- a/
arch/xtensa/include/asm/checksum.h
+++ b/
arch/xtensa/include/asm/checksum.h
@@
-113,7
+113,8
@@
static __inline__ __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
are modified, we must also specify them as outputs, or gcc
will assume they contain their original values. */
: "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (tmp), "=&r" (endaddr)
- : "1" (iph), "2" (ihl));
+ : "1" (iph), "2" (ihl)
+ : "memory");
return csum_fold(sum);
}
@@
-227,7
+228,8
@@
static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
"1:\t"
: "=r" (sum), "=&r" (__dummy)
: "r" (saddr), "r" (daddr),
- "r" (htonl(len)), "r" (htonl(proto)), "0" (sum));
+ "r" (htonl(len)), "r" (htonl(proto)), "0" (sum)
+ : "memory");
return csum_fold(sum);
}