Skip to content

Commit 99d4c5f

Browse files
author
Alex Shi
committed
Merge tag 'v4.4.42' into linux-linaro-lsk-v4.4
This is the 4.4.42 stable release
2 parents f02e043 + 49c4446 commit 99d4c5f

92 files changed

Lines changed: 903 additions & 410 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION = 4
22
PATCHLEVEL = 4
3-
SUBLEVEL = 41
3+
SUBLEVEL = 42
44
EXTRAVERSION =
55
NAME = Blurry Fish Butt
66

arch/arm/boot/dts/r8a7794.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@
10231023
mstp7_clks: mstp7_clks@e615014c {
10241024
compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-clocks";
10251025
reg = <0 0xe615014c 0 4>, <0 0xe61501c4 0 4>;
1026-
clocks = <&mp_clk>, <&mp_clk>,
1026+
clocks = <&mp_clk>, <&hp_clk>,
10271027
<&zs_clk>, <&p_clk>, <&p_clk>, <&zs_clk>,
10281028
<&zs_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>;
10291029
#clock-cells = <1>;

arch/arm/crypto/aes-ce-glue.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,13 @@ static int ce_aes_expandkey(struct crypto_aes_ctx *ctx, const u8 *in_key,
8787
u32 *rki = ctx->key_enc + (i * kwords);
8888
u32 *rko = rki + kwords;
8989

90+
#ifndef CONFIG_CPU_BIG_ENDIAN
9091
rko[0] = ror32(ce_aes_sub(rki[kwords - 1]), 8);
9192
rko[0] = rko[0] ^ rki[0] ^ rcon[i];
93+
#else
94+
rko[0] = rol32(ce_aes_sub(rki[kwords - 1]), 8);
95+
rko[0] = rko[0] ^ rki[0] ^ (rcon[i] << 24);
96+
#endif
9297
rko[1] = rko[0] ^ rki[1];
9398
rko[2] = rko[1] ^ rki[2];
9499
rko[3] = rko[2] ^ rki[3];

arch/arm/mach-davinci/da850.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,16 @@ static struct clk emac_clk = {
298298
.gpsc = 1,
299299
};
300300

301+
/*
302+
* In order to avoid adding the emac_clk to the clock lookup table twice (and
303+
* screwing up the linked list in the process) create a separate clock for
304+
* mdio inheriting the rate from emac_clk.
305+
*/
306+
static struct clk mdio_clk = {
307+
.name = "mdio",
308+
.parent = &emac_clk,
309+
};
310+
301311
static struct clk mcasp_clk = {
302312
.name = "mcasp",
303313
.parent = &pll0_sysclk2,
@@ -462,7 +472,7 @@ static struct clk_lookup da850_clks[] = {
462472
CLK(NULL, "arm", &arm_clk),
463473
CLK(NULL, "rmii", &rmii_clk),
464474
CLK("davinci_emac.1", NULL, &emac_clk),
465-
CLK("davinci_mdio.0", "fck", &emac_clk),
475+
CLK("davinci_mdio.0", "fck", &mdio_clk),
466476
CLK("davinci-mcasp.0", NULL, &mcasp_clk),
467477
CLK("da8xx_lcdc.0", "fck", &lcdc_clk),
468478
CLK("da830-mmc.0", NULL, &mmcsd0_clk),

arch/arm64/crypto/aes-ce-ccm-core.S

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010

1111
#include <linux/linkage.h>
12+
#include <asm/assembler.h>
1213

1314
.text
1415
.arch armv8-a+crypto
@@ -19,7 +20,7 @@
1920
*/
2021
ENTRY(ce_aes_ccm_auth_data)
2122
ldr w8, [x3] /* leftover from prev round? */
22-
ld1 {v0.2d}, [x0] /* load mac */
23+
ld1 {v0.16b}, [x0] /* load mac */
2324
cbz w8, 1f
2425
sub w8, w8, #16
2526
eor v1.16b, v1.16b, v1.16b
@@ -31,7 +32,7 @@ ENTRY(ce_aes_ccm_auth_data)
3132
beq 8f /* out of input? */
3233
cbnz w8, 0b
3334
eor v0.16b, v0.16b, v1.16b
34-
1: ld1 {v3.2d}, [x4] /* load first round key */
35+
1: ld1 {v3.16b}, [x4] /* load first round key */
3536
prfm pldl1strm, [x1]
3637
cmp w5, #12 /* which key size? */
3738
add x6, x4, #16
@@ -41,17 +42,17 @@ ENTRY(ce_aes_ccm_auth_data)
4142
mov v5.16b, v3.16b
4243
b 4f
4344
2: mov v4.16b, v3.16b
44-
ld1 {v5.2d}, [x6], #16 /* load 2nd round key */
45+
ld1 {v5.16b}, [x6], #16 /* load 2nd round key */
4546
3: aese v0.16b, v4.16b
4647
aesmc v0.16b, v0.16b
47-
4: ld1 {v3.2d}, [x6], #16 /* load next round key */
48+
4: ld1 {v3.16b}, [x6], #16 /* load next round key */
4849
aese v0.16b, v5.16b
4950
aesmc v0.16b, v0.16b
50-
5: ld1 {v4.2d}, [x6], #16 /* load next round key */
51+
5: ld1 {v4.16b}, [x6], #16 /* load next round key */
5152
subs w7, w7, #3
5253
aese v0.16b, v3.16b
5354
aesmc v0.16b, v0.16b
54-
ld1 {v5.2d}, [x6], #16 /* load next round key */
55+
ld1 {v5.16b}, [x6], #16 /* load next round key */
5556
bpl 3b
5657
aese v0.16b, v4.16b
5758
subs w2, w2, #16 /* last data? */
@@ -60,7 +61,7 @@ ENTRY(ce_aes_ccm_auth_data)
6061
ld1 {v1.16b}, [x1], #16 /* load next input block */
6162
eor v0.16b, v0.16b, v1.16b /* xor with mac */
6263
bne 1b
63-
6: st1 {v0.2d}, [x0] /* store mac */
64+
6: st1 {v0.16b}, [x0] /* store mac */
6465
beq 10f
6566
adds w2, w2, #16
6667
beq 10f
@@ -79,7 +80,7 @@ ENTRY(ce_aes_ccm_auth_data)
7980
adds w7, w7, #1
8081
bne 9b
8182
eor v0.16b, v0.16b, v1.16b
82-
st1 {v0.2d}, [x0]
83+
st1 {v0.16b}, [x0]
8384
10: str w8, [x3]
8485
ret
8586
ENDPROC(ce_aes_ccm_auth_data)
@@ -89,27 +90,27 @@ ENDPROC(ce_aes_ccm_auth_data)
8990
* u32 rounds);
9091
*/
9192
ENTRY(ce_aes_ccm_final)
92-
ld1 {v3.2d}, [x2], #16 /* load first round key */
93-
ld1 {v0.2d}, [x0] /* load mac */
93+
ld1 {v3.16b}, [x2], #16 /* load first round key */
94+
ld1 {v0.16b}, [x0] /* load mac */
9495
cmp w3, #12 /* which key size? */
9596
sub w3, w3, #2 /* modified # of rounds */
96-
ld1 {v1.2d}, [x1] /* load 1st ctriv */
97+
ld1 {v1.16b}, [x1] /* load 1st ctriv */
9798
bmi 0f
9899
bne 3f
99100
mov v5.16b, v3.16b
100101
b 2f
101102
0: mov v4.16b, v3.16b
102-
1: ld1 {v5.2d}, [x2], #16 /* load next round key */
103+
1: ld1 {v5.16b}, [x2], #16 /* load next round key */
103104
aese v0.16b, v4.16b
104105
aesmc v0.16b, v0.16b
105106
aese v1.16b, v4.16b
106107
aesmc v1.16b, v1.16b
107-
2: ld1 {v3.2d}, [x2], #16 /* load next round key */
108+
2: ld1 {v3.16b}, [x2], #16 /* load next round key */
108109
aese v0.16b, v5.16b
109110
aesmc v0.16b, v0.16b
110111
aese v1.16b, v5.16b
111112
aesmc v1.16b, v1.16b
112-
3: ld1 {v4.2d}, [x2], #16 /* load next round key */
113+
3: ld1 {v4.16b}, [x2], #16 /* load next round key */
113114
subs w3, w3, #3
114115
aese v0.16b, v3.16b
115116
aesmc v0.16b, v0.16b
@@ -120,47 +121,47 @@ ENTRY(ce_aes_ccm_final)
120121
aese v1.16b, v4.16b
121122
/* final round key cancels out */
122123
eor v0.16b, v0.16b, v1.16b /* en-/decrypt the mac */
123-
st1 {v0.2d}, [x0] /* store result */
124+
st1 {v0.16b}, [x0] /* store result */
124125
ret
125126
ENDPROC(ce_aes_ccm_final)
126127

127128
.macro aes_ccm_do_crypt,enc
128129
ldr x8, [x6, #8] /* load lower ctr */
129-
ld1 {v0.2d}, [x5] /* load mac */
130-
rev x8, x8 /* keep swabbed ctr in reg */
130+
ld1 {v0.16b}, [x5] /* load mac */
131+
CPU_LE( rev x8, x8 ) /* keep swabbed ctr in reg */
131132
0: /* outer loop */
132-
ld1 {v1.1d}, [x6] /* load upper ctr */
133+
ld1 {v1.8b}, [x6] /* load upper ctr */
133134
prfm pldl1strm, [x1]
134135
add x8, x8, #1
135136
rev x9, x8
136137
cmp w4, #12 /* which key size? */
137138
sub w7, w4, #2 /* get modified # of rounds */
138139
ins v1.d[1], x9 /* no carry in lower ctr */
139-
ld1 {v3.2d}, [x3] /* load first round key */
140+
ld1 {v3.16b}, [x3] /* load first round key */
140141
add x10, x3, #16
141142
bmi 1f
142143
bne 4f
143144
mov v5.16b, v3.16b
144145
b 3f
145146
1: mov v4.16b, v3.16b
146-
ld1 {v5.2d}, [x10], #16 /* load 2nd round key */
147+
ld1 {v5.16b}, [x10], #16 /* load 2nd round key */
147148
2: /* inner loop: 3 rounds, 2x interleaved */
148149
aese v0.16b, v4.16b
149150
aesmc v0.16b, v0.16b
150151
aese v1.16b, v4.16b
151152
aesmc v1.16b, v1.16b
152-
3: ld1 {v3.2d}, [x10], #16 /* load next round key */
153+
3: ld1 {v3.16b}, [x10], #16 /* load next round key */
153154
aese v0.16b, v5.16b
154155
aesmc v0.16b, v0.16b
155156
aese v1.16b, v5.16b
156157
aesmc v1.16b, v1.16b
157-
4: ld1 {v4.2d}, [x10], #16 /* load next round key */
158+
4: ld1 {v4.16b}, [x10], #16 /* load next round key */
158159
subs w7, w7, #3
159160
aese v0.16b, v3.16b
160161
aesmc v0.16b, v0.16b
161162
aese v1.16b, v3.16b
162163
aesmc v1.16b, v1.16b
163-
ld1 {v5.2d}, [x10], #16 /* load next round key */
164+
ld1 {v5.16b}, [x10], #16 /* load next round key */
164165
bpl 2b
165166
aese v0.16b, v4.16b
166167
aese v1.16b, v4.16b
@@ -177,14 +178,14 @@ ENDPROC(ce_aes_ccm_final)
177178
eor v0.16b, v0.16b, v2.16b /* xor mac with pt ^ rk[last] */
178179
st1 {v1.16b}, [x0], #16 /* write output block */
179180
bne 0b
180-
rev x8, x8
181-
st1 {v0.2d}, [x5] /* store mac */
181+
CPU_LE( rev x8, x8 )
182+
st1 {v0.16b}, [x5] /* store mac */
182183
str x8, [x6, #8] /* store lsb end of ctr (BE) */
183184
5: ret
184185

185186
6: eor v0.16b, v0.16b, v5.16b /* final round mac */
186187
eor v1.16b, v1.16b, v5.16b /* final round enc */
187-
st1 {v0.2d}, [x5] /* store mac */
188+
st1 {v0.16b}, [x5] /* store mac */
188189
add w2, w2, #16 /* process partial tail block */
189190
7: ldrb w9, [x1], #1 /* get 1 byte of input */
190191
umov w6, v1.b[0] /* get top crypted ctr byte */

arch/arm64/crypto/aes-ce-cipher.c

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,24 +47,24 @@ static void aes_cipher_encrypt(struct crypto_tfm *tfm, u8 dst[], u8 const src[])
4747
kernel_neon_begin_partial(4);
4848

4949
__asm__(" ld1 {v0.16b}, %[in] ;"
50-
" ld1 {v1.2d}, [%[key]], #16 ;"
50+
" ld1 {v1.16b}, [%[key]], #16 ;"
5151
" cmp %w[rounds], #10 ;"
5252
" bmi 0f ;"
5353
" bne 3f ;"
5454
" mov v3.16b, v1.16b ;"
5555
" b 2f ;"
5656
"0: mov v2.16b, v1.16b ;"
57-
" ld1 {v3.2d}, [%[key]], #16 ;"
57+
" ld1 {v3.16b}, [%[key]], #16 ;"
5858
"1: aese v0.16b, v2.16b ;"
5959
" aesmc v0.16b, v0.16b ;"
60-
"2: ld1 {v1.2d}, [%[key]], #16 ;"
60+
"2: ld1 {v1.16b}, [%[key]], #16 ;"
6161
" aese v0.16b, v3.16b ;"
6262
" aesmc v0.16b, v0.16b ;"
63-
"3: ld1 {v2.2d}, [%[key]], #16 ;"
63+
"3: ld1 {v2.16b}, [%[key]], #16 ;"
6464
" subs %w[rounds], %w[rounds], #3 ;"
6565
" aese v0.16b, v1.16b ;"
6666
" aesmc v0.16b, v0.16b ;"
67-
" ld1 {v3.2d}, [%[key]], #16 ;"
67+
" ld1 {v3.16b}, [%[key]], #16 ;"
6868
" bpl 1b ;"
6969
" aese v0.16b, v2.16b ;"
7070
" eor v0.16b, v0.16b, v3.16b ;"
@@ -92,24 +92,24 @@ static void aes_cipher_decrypt(struct crypto_tfm *tfm, u8 dst[], u8 const src[])
9292
kernel_neon_begin_partial(4);
9393

9494
__asm__(" ld1 {v0.16b}, %[in] ;"
95-
" ld1 {v1.2d}, [%[key]], #16 ;"
95+
" ld1 {v1.16b}, [%[key]], #16 ;"
9696
" cmp %w[rounds], #10 ;"
9797
" bmi 0f ;"
9898
" bne 3f ;"
9999
" mov v3.16b, v1.16b ;"
100100
" b 2f ;"
101101
"0: mov v2.16b, v1.16b ;"
102-
" ld1 {v3.2d}, [%[key]], #16 ;"
102+
" ld1 {v3.16b}, [%[key]], #16 ;"
103103
"1: aesd v0.16b, v2.16b ;"
104104
" aesimc v0.16b, v0.16b ;"
105-
"2: ld1 {v1.2d}, [%[key]], #16 ;"
105+
"2: ld1 {v1.16b}, [%[key]], #16 ;"
106106
" aesd v0.16b, v3.16b ;"
107107
" aesimc v0.16b, v0.16b ;"
108-
"3: ld1 {v2.2d}, [%[key]], #16 ;"
108+
"3: ld1 {v2.16b}, [%[key]], #16 ;"
109109
" subs %w[rounds], %w[rounds], #3 ;"
110110
" aesd v0.16b, v1.16b ;"
111111
" aesimc v0.16b, v0.16b ;"
112-
" ld1 {v3.2d}, [%[key]], #16 ;"
112+
" ld1 {v3.16b}, [%[key]], #16 ;"
113113
" bpl 1b ;"
114114
" aesd v0.16b, v2.16b ;"
115115
" eor v0.16b, v0.16b, v3.16b ;"
@@ -173,7 +173,12 @@ int ce_aes_expandkey(struct crypto_aes_ctx *ctx, const u8 *in_key,
173173
u32 *rki = ctx->key_enc + (i * kwords);
174174
u32 *rko = rki + kwords;
175175

176+
#ifndef CONFIG_CPU_BIG_ENDIAN
176177
rko[0] = ror32(aes_sub(rki[kwords - 1]), 8) ^ rcon[i] ^ rki[0];
178+
#else
179+
rko[0] = rol32(aes_sub(rki[kwords - 1]), 8) ^ (rcon[i] << 24) ^
180+
rki[0];
181+
#endif
177182
rko[1] = rko[0] ^ rki[1];
178183
rko[2] = rko[1] ^ rki[2];
179184
rko[3] = rko[2] ^ rki[3];

arch/arm64/crypto/aes-ce.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
*/
1111

1212
#include <linux/linkage.h>
13+
#include <asm/assembler.h>
1314

1415
#define AES_ENTRY(func) ENTRY(ce_ ## func)
1516
#define AES_ENDPROC(func) ENDPROC(ce_ ## func)

arch/arm64/crypto/aes-modes.S

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,8 @@ AES_ENDPROC(aes_ctr_encrypt)
386386
.endm
387387

388388
.Lxts_mul_x:
389-
.word 1, 0, 0x87, 0
389+
CPU_LE( .quad 1, 0x87 )
390+
CPU_BE( .quad 0x87, 1 )
390391

391392
AES_ENTRY(aes_xts_encrypt)
392393
FRAME_PUSH

0 commit comments

Comments
 (0)