forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/arch/arm/lib/csumpartialcopygeneric.S
....@@ -1,11 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * linux/arch/arm/lib/csumpartialcopygeneric.S
34 *
45 * Copyright (C) 1995-2001 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 <asm/assembler.h>
118
....@@ -89,6 +86,7 @@
8986
9087 FN_ENTRY
9188 save_regs
89
+ mov sum, #-1
9290
9391 cmp len, #8 @ Ensure that we have at least
9492 blo .Lless8 @ 8 bytes to copy.
....@@ -148,9 +146,9 @@
148146 strb r5, [dst], #1
149147 mov r5, r4, get_byte_2
150148 .Lexit: tst len, #1
151
- strneb r5, [dst], #1
149
+ strbne r5, [dst], #1
152150 andne r5, r5, #255
153
- adcnes sum, sum, r5, put_byte_0
151
+ adcsne sum, sum, r5, put_byte_0
154152
155153 /*
156154 * If the dst pointer was not 16-bit aligned, we