patch-2.4.22 linux-2.4.22/arch/arm/lib/csumpartial.S

Next file: linux-2.4.22/arch/arm/lib/delay.S
Previous file: linux-2.4.22/arch/arm/lib/backtrace.S
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/arch/arm/lib/csumpartial.S linux-2.4.22/arch/arm/lib/csumpartial.S
@@ -49,8 +49,9 @@
 		/* we are now half-word aligned */
 
 .less8_wordlp:
-#ifdef __ARM_ARCH_4__
-		ldrh	td0, [buf], #2
+#if __LINUX_ARM_ARCH__ >= 4
+		ldrh	td0, [buf]
+		add	buf, buf, #2
 		sub	len, len, #2
 #else
 		ldrb	td0, [buf], #1
@@ -79,8 +80,9 @@
 		adcnes	sum, sum, td0, lsl #8	@ update checksum
 
 		tst	buf, #2			@ 32-bit aligned?
-#ifdef __ARM_ARCH_4__
-		ldrneh	td0, [buf], #2		@ make 32-bit aligned
+#if __LINUX_ARM_ARCH__ >= 4
+		ldrneh	td0, [buf]		@ make 32-bit aligned
+		add	buf, buf, #2
 		subne	len, len, #2
 #else
 		ldrneb	td0, [buf], #1

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)