hc
2024-01-31 f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2
kernel/arch/arm/lib/csumpartial.S
....@@ -1,11 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * linux/arch/arm/lib/csumpartial.S
34 *
45 * Copyright (C) 1995-1998 Russell King
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
96 */
107 #include <linux/linkage.h>
118 #include <asm/assembler.h>
....@@ -40,9 +37,9 @@
4037 /* we must have at least one byte. */
4138 tst buf, #1 @ odd address?
4239 movne sum, sum, ror #8
43
- ldrneb td0, [buf], #1
40
+ ldrbne td0, [buf], #1
4441 subne len, len, #1
45
- adcnes sum, sum, td0, put_byte_1
42
+ adcsne sum, sum, td0, put_byte_1
4643
4744 .Lless4: tst len, #6
4845 beq .Lless8_byte
....@@ -68,8 +65,8 @@
6865 bne .Lless8_wordlp
6966
7067 .Lless8_byte: tst len, #1 @ odd number of bytes
71
- ldrneb td0, [buf], #1 @ include last byte
72
- adcnes sum, sum, td0, put_byte_0 @ update checksum
68
+ ldrbne td0, [buf], #1 @ include last byte
69
+ adcsne sum, sum, td0, put_byte_0 @ update checksum
7370
7471 .Ldone: adc r0, sum, #0 @ collect up the last carry
7572 ldr td0, [sp], #4
....@@ -78,17 +75,17 @@
7875 ldr pc, [sp], #4 @ return
7976
8077 .Lnot_aligned: tst buf, #1 @ odd address
81
- ldrneb td0, [buf], #1 @ make even
78
+ ldrbne td0, [buf], #1 @ make even
8279 subne len, len, #1
83
- adcnes sum, sum, td0, put_byte_1 @ update checksum
80
+ adcsne sum, sum, td0, put_byte_1 @ update checksum
8481
8582 tst buf, #2 @ 32-bit aligned?
8683 #if __LINUX_ARM_ARCH__ >= 4
87
- ldrneh td0, [buf], #2 @ make 32-bit aligned
84
+ ldrhne td0, [buf], #2 @ make 32-bit aligned
8885 subne len, len, #2
8986 #else
90
- ldrneb td0, [buf], #1
91
- ldrneb ip, [buf], #1
87
+ ldrbne td0, [buf], #1
88
+ ldrbne ip, [buf], #1
9289 subne len, len, #2
9390 #ifndef __ARMEB__
9491 orrne td0, td0, ip, lsl #8
....@@ -96,7 +93,7 @@
9693 orrne td0, ip, td0, lsl #8
9794 #endif
9895 #endif
99
- adcnes sum, sum, td0 @ update checksum
96
+ adcsne sum, sum, td0 @ update checksum
10097 ret lr
10198
10299 ENTRY(csum_partial)