1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef __UNICORE_CHECKSUM_H__
15#define __UNICORE_CHECKSUM_H__
16
17
18
19
20
21
22static inline __wsum
23csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
24 unsigned short proto, __wsum sum)
25{
26 __asm__(
27 "add.a %0, %1, %2\n"
28 "addc.a %0, %0, %3\n"
29 "addc.a %0, %0, %4 << #8\n"
30 "addc.a %0, %0, %5\n"
31 "addc %0, %0, #0\n"
32 : "=&r"(sum)
33 : "r" (sum), "r" (daddr), "r" (saddr), "r" (len), "Ir" (htons(proto))
34 : "cc");
35 return sum;
36}
37#define csum_tcpudp_nofold csum_tcpudp_nofold
38
39#include <asm-generic/checksum.h>
40
41#endif
42