patch-2.2.0-pre2 linux/include/asm-ppc/checksum.h

Next file: linux/include/asm-ppc/ide.h
Previous file: linux/include/asm-i386/uaccess.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.0-pre1/linux/include/asm-ppc/checksum.h linux/include/asm-ppc/checksum.h
@@ -83,13 +83,13 @@
 						   unsigned int sum) 
 {
     __asm__("
-	add %0,%0,%1
-	add %0,%0,%2
-	add %0,%0,%0
-	addi %0,%0,0
+	addc %0,%0,%1
+	adde %0,%0,%2
+	adde %0,%0,%3
+	addze %0,%0
 	"
 	: "=r" (sum)
-	: "r" (daddr), "r"(saddr), "r"((ntohs(len)<<16)+proto*256), "0"(sum));
+	: "r" (daddr), "r"(saddr), "r"((proto<<16)+len), "0"(sum));
     return sum;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov