diff options
Diffstat (limited to 'arch/blackfin/include/asm/checksum.h')
-rw-r--r-- | arch/blackfin/include/asm/checksum.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/arch/blackfin/include/asm/checksum.h b/arch/blackfin/include/asm/checksum.h index f67289a0d8d2..793581fc9556 100644 --- a/arch/blackfin/include/asm/checksum.h +++ b/arch/blackfin/include/asm/checksum.h | |||
@@ -63,23 +63,23 @@ static inline __wsum | |||
63 | csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, | 63 | csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, |
64 | unsigned short proto, __wsum sum) | 64 | unsigned short proto, __wsum sum) |
65 | { | 65 | { |
66 | 66 | unsigned int carry; | |
67 | __asm__ ("%0 = %0 + %1;\n\t" | 67 | |
68 | "CC = AC0;\n\t" | 68 | __asm__ ("%0 = %0 + %2;\n\t" |
69 | "if !CC jump 4;\n\t" | 69 | "CC = AC0;\n\t" |
70 | "%0 = %0 + %4;\n\t" | 70 | "%1 = CC;\n\t" |
71 | "%0 = %0 + %2;\n\t" | 71 | "%0 = %0 + %1;\n\t" |
72 | "CC = AC0;\n\t" | 72 | "%0 = %0 + %3;\n\t" |
73 | "if !CC jump 4;\n\t" | 73 | "CC = AC0;\n\t" |
74 | "%0 = %0 + %4;\n\t" | 74 | "%1 = CC;\n\t" |
75 | "%0 = %0 + %3;\n\t" | 75 | "%0 = %0 + %1;\n\t" |
76 | "CC = AC0;\n\t" | 76 | "%0 = %0 + %4;\n\t" |
77 | "if !CC jump 4;\n\t" | 77 | "CC = AC0;\n\t" |
78 | "%0 = %0 + %4;\n\t" | 78 | "%1 = CC;\n\t" |
79 | "NOP;\n\t" | 79 | "%0 = %0 + %1;\n\t" |
80 | : "=d" (sum) | 80 | : "=d" (sum), "=&d" (carry) |
81 | : "d" (daddr), "d" (saddr), "d" ((ntohs(len)<<16)+proto*256), "d" (1), "0"(sum) | 81 | : "d" (daddr), "d" (saddr), "d" ((len + proto) << 8), "0"(sum) |
82 | : "CC"); | 82 | : "CC"); |
83 | 83 | ||
84 | return (sum); | 84 | return (sum); |
85 | } | 85 | } |