diff options
Diffstat (limited to 'arch/arm/lib')
-rw-r--r-- | arch/arm/lib/bitops.h | 4 | ||||
-rw-r--r-- | arch/arm/lib/csumpartial.S | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/lib/bitops.h b/arch/arm/lib/bitops.h index f35d91fbe117..b8c14e936697 100644 --- a/arch/arm/lib/bitops.h +++ b/arch/arm/lib/bitops.h | |||
@@ -34,7 +34,7 @@ | |||
34 | and r2, r0, #7 | 34 | and r2, r0, #7 |
35 | mov r3, #1 | 35 | mov r3, #1 |
36 | mov r3, r3, lsl r2 | 36 | mov r3, r3, lsl r2 |
37 | save_and_disable_irqs ip, r2 | 37 | save_and_disable_irqs ip |
38 | ldrb r2, [r1, r0, lsr #3] | 38 | ldrb r2, [r1, r0, lsr #3] |
39 | \instr r2, r2, r3 | 39 | \instr r2, r2, r3 |
40 | strb r2, [r1, r0, lsr #3] | 40 | strb r2, [r1, r0, lsr #3] |
@@ -54,7 +54,7 @@ | |||
54 | add r1, r1, r0, lsr #3 | 54 | add r1, r1, r0, lsr #3 |
55 | and r3, r0, #7 | 55 | and r3, r0, #7 |
56 | mov r0, #1 | 56 | mov r0, #1 |
57 | save_and_disable_irqs ip, r2 | 57 | save_and_disable_irqs ip |
58 | ldrb r2, [r1] | 58 | ldrb r2, [r1] |
59 | tst r2, r0, lsl r3 | 59 | tst r2, r0, lsl r3 |
60 | \instr r2, r2, r0, lsl r3 | 60 | \instr r2, r2, r0, lsl r3 |
diff --git a/arch/arm/lib/csumpartial.S b/arch/arm/lib/csumpartial.S index cb5e3708f118..fe797cf320bb 100644 --- a/arch/arm/lib/csumpartial.S +++ b/arch/arm/lib/csumpartial.S | |||
@@ -39,6 +39,7 @@ td3 .req lr | |||
39 | 39 | ||
40 | /* we must have at least one byte. */ | 40 | /* we must have at least one byte. */ |
41 | tst buf, #1 @ odd address? | 41 | tst buf, #1 @ odd address? |
42 | movne sum, sum, ror #8 | ||
42 | ldrneb td0, [buf], #1 | 43 | ldrneb td0, [buf], #1 |
43 | subne len, len, #1 | 44 | subne len, len, #1 |
44 | adcnes sum, sum, td0, put_byte_1 | 45 | adcnes sum, sum, td0, put_byte_1 |
@@ -103,6 +104,9 @@ ENTRY(csum_partial) | |||
103 | cmp len, #8 @ Ensure that we have at least | 104 | cmp len, #8 @ Ensure that we have at least |
104 | blo .less8 @ 8 bytes to copy. | 105 | blo .less8 @ 8 bytes to copy. |
105 | 106 | ||
107 | tst buf, #1 | ||
108 | movne sum, sum, ror #8 | ||
109 | |||
106 | adds sum, sum, #0 @ C = 0 | 110 | adds sum, sum, #0 @ C = 0 |
107 | tst buf, #3 @ Test destination alignment | 111 | tst buf, #3 @ Test destination alignment |
108 | blne .not_aligned @ aligh destination, return here | 112 | blne .not_aligned @ aligh destination, return here |