aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-cris/arch-v10
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-cris/arch-v10')
-rw-r--r--include/asm-cris/arch-v10/checksum.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/asm-cris/arch-v10/checksum.h b/include/asm-cris/arch-v10/checksum.h
index 633f234f336b..b8000c5d7fe1 100644
--- a/include/asm-cris/arch-v10/checksum.h
+++ b/include/asm-cris/arch-v10/checksum.h
@@ -8,11 +8,11 @@
8 * to split all of those into 16-bit components, then add. 8 * to split all of those into 16-bit components, then add.
9 */ 9 */
10 10
11static inline unsigned int 11static inline __wsum
12csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len, 12csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
13 unsigned short proto, unsigned int sum) 13 unsigned short proto, __wsum sum)
14{ 14{
15 int res; 15 __wsum res;
16 __asm__ ("add.d %2, %0\n\t" 16 __asm__ ("add.d %2, %0\n\t"
17 "ax\n\t" 17 "ax\n\t"
18 "add.d %3, %0\n\t" 18 "add.d %3, %0\n\t"
@@ -21,7 +21,7 @@ csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len,
21 "ax\n\t" 21 "ax\n\t"
22 "addq 0, %0\n" 22 "addq 0, %0\n"
23 : "=r" (res) 23 : "=r" (res)
24 : "0" (sum), "r" (daddr), "r" (saddr), "r" ((ntohs(len) << 16) + (proto << 8))); 24 : "0" (sum), "r" (daddr), "r" (saddr), "r" ((len + proto) << 8));
25 25
26 return res; 26 return res;
27} 27}