Magellan Linux

Contents of /trunk/kernel-alx/patches-5.4/0234-5.4.135-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3635 - (show annotations) (download)
Mon Oct 24 12:34:12 2022 UTC (18 months, 4 weeks ago) by niro
File size: 77952 byte(s)
-sync kernel patches
1 diff --git a/Makefile b/Makefile
2 index 02ea9378161eb..428ebbd039967 100644
3 --- a/Makefile
4 +++ b/Makefile
5 @@ -1,7 +1,7 @@
6 # SPDX-License-Identifier: GPL-2.0
7 VERSION = 5
8 PATCHLEVEL = 4
9 -SUBLEVEL = 134
10 +SUBLEVEL = 135
11 EXTRAVERSION =
12 NAME = Kleptomaniac Octopus
13
14 diff --git a/arch/arm/boot/dts/am437x-gp-evm.dts b/arch/arm/boot/dts/am437x-gp-evm.dts
15 index 811c8cae315b5..126965a34841e 100644
16 --- a/arch/arm/boot/dts/am437x-gp-evm.dts
17 +++ b/arch/arm/boot/dts/am437x-gp-evm.dts
18 @@ -829,11 +829,14 @@
19 status = "okay";
20 };
21
22 +&gpio5_target {
23 + ti,no-reset-on-init;
24 +};
25 +
26 &gpio5 {
27 pinctrl-names = "default";
28 pinctrl-0 = <&display_mux_pins>;
29 status = "okay";
30 - ti,no-reset-on-init;
31
32 p8 {
33 /*
34 diff --git a/arch/arm/boot/dts/am437x-l4.dtsi b/arch/arm/boot/dts/am437x-l4.dtsi
35 index bbe15775fccd5..6c2949991e297 100644
36 --- a/arch/arm/boot/dts/am437x-l4.dtsi
37 +++ b/arch/arm/boot/dts/am437x-l4.dtsi
38 @@ -2077,7 +2077,7 @@
39 };
40 };
41
42 - target-module@22000 { /* 0x48322000, ap 116 64.0 */
43 + gpio5_target: target-module@22000 { /* 0x48322000, ap 116 64.0 */
44 compatible = "ti,sysc-omap2", "ti,sysc";
45 ti,hwmods = "gpio6";
46 reg = <0x22000 0x4>,
47 diff --git a/arch/arm/boot/dts/am57xx-cl-som-am57x.dts b/arch/arm/boot/dts/am57xx-cl-som-am57x.dts
48 index 34ca761aeded2..e86d4795e0244 100644
49 --- a/arch/arm/boot/dts/am57xx-cl-som-am57x.dts
50 +++ b/arch/arm/boot/dts/am57xx-cl-som-am57x.dts
51 @@ -611,12 +611,11 @@
52 >;
53 };
54
55 -&gpio3 {
56 - status = "okay";
57 +&gpio3_target {
58 ti,no-reset-on-init;
59 };
60
61 -&gpio2 {
62 +&gpio2_target {
63 status = "okay";
64 ti,no-reset-on-init;
65 };
66 diff --git a/arch/arm/boot/dts/bcm-cygnus.dtsi b/arch/arm/boot/dts/bcm-cygnus.dtsi
67 index 1bc45cfd54538..9ca7b4241c972 100644
68 --- a/arch/arm/boot/dts/bcm-cygnus.dtsi
69 +++ b/arch/arm/boot/dts/bcm-cygnus.dtsi
70 @@ -460,7 +460,7 @@
71 status = "disabled";
72 };
73
74 - nand: nand@18046000 {
75 + nand_controller: nand-controller@18046000 {
76 compatible = "brcm,nand-iproc", "brcm,brcmnand-v6.1";
77 reg = <0x18046000 0x600>, <0xf8105408 0x600>,
78 <0x18046f00 0x20>;
79 diff --git a/arch/arm/boot/dts/bcm-hr2.dtsi b/arch/arm/boot/dts/bcm-hr2.dtsi
80 index dd71ab08136be..30574101471a5 100644
81 --- a/arch/arm/boot/dts/bcm-hr2.dtsi
82 +++ b/arch/arm/boot/dts/bcm-hr2.dtsi
83 @@ -179,7 +179,7 @@
84 status = "disabled";
85 };
86
87 - nand: nand@26000 {
88 + nand_controller: nand-controller@26000 {
89 compatible = "brcm,nand-iproc", "brcm,brcmnand-v6.1";
90 reg = <0x26000 0x600>,
91 <0x11b408 0x600>,
92 diff --git a/arch/arm/boot/dts/bcm-nsp.dtsi b/arch/arm/boot/dts/bcm-nsp.dtsi
93 index 8615d89fa4690..43ff85d31dc12 100644
94 --- a/arch/arm/boot/dts/bcm-nsp.dtsi
95 +++ b/arch/arm/boot/dts/bcm-nsp.dtsi
96 @@ -267,7 +267,7 @@
97 dma-coherent;
98 };
99
100 - nand: nand@26000 {
101 + nand_controller: nand-controller@26000 {
102 compatible = "brcm,nand-iproc", "brcm,brcmnand-v6.1";
103 reg = <0x026000 0x600>,
104 <0x11b408 0x600>,
105 diff --git a/arch/arm/boot/dts/bcm63138.dtsi b/arch/arm/boot/dts/bcm63138.dtsi
106 index 9c0325cf9e22e..cca49a2e2d623 100644
107 --- a/arch/arm/boot/dts/bcm63138.dtsi
108 +++ b/arch/arm/boot/dts/bcm63138.dtsi
109 @@ -203,7 +203,7 @@
110 status = "disabled";
111 };
112
113 - nand: nand@2000 {
114 + nand_controller: nand-controller@2000 {
115 #address-cells = <1>;
116 #size-cells = <0>;
117 compatible = "brcm,nand-bcm63138", "brcm,brcmnand-v7.0", "brcm,brcmnand";
118 diff --git a/arch/arm/boot/dts/bcm7445-bcm97445svmb.dts b/arch/arm/boot/dts/bcm7445-bcm97445svmb.dts
119 index 8313b7cad5427..f92d2cf859726 100644
120 --- a/arch/arm/boot/dts/bcm7445-bcm97445svmb.dts
121 +++ b/arch/arm/boot/dts/bcm7445-bcm97445svmb.dts
122 @@ -14,10 +14,10 @@
123 };
124 };
125
126 -&nand {
127 +&nand_controller {
128 status = "okay";
129
130 - nandcs@1 {
131 + nand@1 {
132 compatible = "brcm,nandcs";
133 reg = <1>;
134 nand-ecc-step-size = <512>;
135 diff --git a/arch/arm/boot/dts/bcm7445.dtsi b/arch/arm/boot/dts/bcm7445.dtsi
136 index 58f67c9b830b8..5ac2042515b8f 100644
137 --- a/arch/arm/boot/dts/bcm7445.dtsi
138 +++ b/arch/arm/boot/dts/bcm7445.dtsi
139 @@ -148,7 +148,7 @@
140 reg-names = "aon-ctrl", "aon-sram";
141 };
142
143 - nand: nand@3e2800 {
144 + nand_controller: nand-controller@3e2800 {
145 status = "disabled";
146 #address-cells = <1>;
147 #size-cells = <0>;
148 diff --git a/arch/arm/boot/dts/bcm911360_entphn.dts b/arch/arm/boot/dts/bcm911360_entphn.dts
149 index b2d323f4a5aba..a76c74b44bbaf 100644
150 --- a/arch/arm/boot/dts/bcm911360_entphn.dts
151 +++ b/arch/arm/boot/dts/bcm911360_entphn.dts
152 @@ -82,8 +82,8 @@
153 status = "okay";
154 };
155
156 -&nand {
157 - nandcs@1 {
158 +&nand_controller {
159 + nand@1 {
160 compatible = "brcm,nandcs";
161 reg = <0>;
162 nand-on-flash-bbt;
163 diff --git a/arch/arm/boot/dts/bcm958300k.dts b/arch/arm/boot/dts/bcm958300k.dts
164 index b4a1392bd5a6c..dda3e11b711f6 100644
165 --- a/arch/arm/boot/dts/bcm958300k.dts
166 +++ b/arch/arm/boot/dts/bcm958300k.dts
167 @@ -60,8 +60,8 @@
168 status = "okay";
169 };
170
171 -&nand {
172 - nandcs@1 {
173 +&nand_controller {
174 + nand@1 {
175 compatible = "brcm,nandcs";
176 reg = <0>;
177 nand-on-flash-bbt;
178 diff --git a/arch/arm/boot/dts/bcm958305k.dts b/arch/arm/boot/dts/bcm958305k.dts
179 index 3378683321d3c..ea3c6b88b313b 100644
180 --- a/arch/arm/boot/dts/bcm958305k.dts
181 +++ b/arch/arm/boot/dts/bcm958305k.dts
182 @@ -68,8 +68,8 @@
183 status = "okay";
184 };
185
186 -&nand {
187 - nandcs@1 {
188 +&nand_controller {
189 + nand@1 {
190 compatible = "brcm,nandcs";
191 reg = <0>;
192 nand-on-flash-bbt;
193 diff --git a/arch/arm/boot/dts/bcm958522er.dts b/arch/arm/boot/dts/bcm958522er.dts
194 index 8c388eb8a08f8..e9b2d3b37ca45 100644
195 --- a/arch/arm/boot/dts/bcm958522er.dts
196 +++ b/arch/arm/boot/dts/bcm958522er.dts
197 @@ -70,8 +70,8 @@
198 status = "okay";
199 };
200
201 -&nand {
202 - nandcs@0 {
203 +&nand_controller {
204 + nand@0 {
205 compatible = "brcm,nandcs";
206 reg = <0>;
207 nand-on-flash-bbt;
208 diff --git a/arch/arm/boot/dts/bcm958525er.dts b/arch/arm/boot/dts/bcm958525er.dts
209 index c339771bb22e0..dfe145a3d05a2 100644
210 --- a/arch/arm/boot/dts/bcm958525er.dts
211 +++ b/arch/arm/boot/dts/bcm958525er.dts
212 @@ -70,8 +70,8 @@
213 status = "okay";
214 };
215
216 -&nand {
217 - nandcs@0 {
218 +&nand_controller {
219 + nand@0 {
220 compatible = "brcm,nandcs";
221 reg = <0>;
222 nand-on-flash-bbt;
223 diff --git a/arch/arm/boot/dts/bcm958525xmc.dts b/arch/arm/boot/dts/bcm958525xmc.dts
224 index 1c72ec8288de4..17e6a683e678a 100644
225 --- a/arch/arm/boot/dts/bcm958525xmc.dts
226 +++ b/arch/arm/boot/dts/bcm958525xmc.dts
227 @@ -86,8 +86,8 @@
228 };
229 };
230
231 -&nand {
232 - nandcs@0 {
233 +&nand_controller {
234 + nand@0 {
235 compatible = "brcm,nandcs";
236 reg = <0>;
237 nand-on-flash-bbt;
238 diff --git a/arch/arm/boot/dts/bcm958622hr.dts b/arch/arm/boot/dts/bcm958622hr.dts
239 index 96a021cebd97b..1d1bc8dbb3425 100644
240 --- a/arch/arm/boot/dts/bcm958622hr.dts
241 +++ b/arch/arm/boot/dts/bcm958622hr.dts
242 @@ -74,8 +74,8 @@
243 status = "okay";
244 };
245
246 -&nand {
247 - nandcs@0 {
248 +&nand_controller {
249 + nand@0 {
250 compatible = "brcm,nandcs";
251 reg = <0>;
252 nand-on-flash-bbt;
253 diff --git a/arch/arm/boot/dts/bcm958623hr.dts b/arch/arm/boot/dts/bcm958623hr.dts
254 index b2c7f21d471e6..d5d9a273bb6d1 100644
255 --- a/arch/arm/boot/dts/bcm958623hr.dts
256 +++ b/arch/arm/boot/dts/bcm958623hr.dts
257 @@ -74,8 +74,8 @@
258 status = "okay";
259 };
260
261 -&nand {
262 - nandcs@0 {
263 +&nand_controller {
264 + nand@0 {
265 compatible = "brcm,nandcs";
266 reg = <0>;
267 nand-on-flash-bbt;
268 diff --git a/arch/arm/boot/dts/bcm958625hr.dts b/arch/arm/boot/dts/bcm958625hr.dts
269 index a2c9de35ddfbd..670363bca9173 100644
270 --- a/arch/arm/boot/dts/bcm958625hr.dts
271 +++ b/arch/arm/boot/dts/bcm958625hr.dts
272 @@ -90,8 +90,8 @@
273 status = "okay";
274 };
275
276 -&nand {
277 - nandcs@0 {
278 +&nand_controller {
279 + nand@0 {
280 compatible = "brcm,nandcs";
281 reg = <0>;
282 nand-on-flash-bbt;
283 diff --git a/arch/arm/boot/dts/bcm958625k.dts b/arch/arm/boot/dts/bcm958625k.dts
284 index 3fcca12d83c2d..f15cd38c849e4 100644
285 --- a/arch/arm/boot/dts/bcm958625k.dts
286 +++ b/arch/arm/boot/dts/bcm958625k.dts
287 @@ -64,8 +64,8 @@
288 status = "okay";
289 };
290
291 -&nand {
292 - nandcs@0 {
293 +&nand_controller {
294 + nand@0 {
295 compatible = "brcm,nandcs";
296 reg = <0>;
297 nand-on-flash-bbt;
298 diff --git a/arch/arm/boot/dts/bcm963138dvt.dts b/arch/arm/boot/dts/bcm963138dvt.dts
299 index 5b177274f1826..df5c8ab906273 100644
300 --- a/arch/arm/boot/dts/bcm963138dvt.dts
301 +++ b/arch/arm/boot/dts/bcm963138dvt.dts
302 @@ -31,10 +31,10 @@
303 status = "okay";
304 };
305
306 -&nand {
307 +&nand_controller {
308 status = "okay";
309
310 - nandcs@0 {
311 + nand@0 {
312 compatible = "brcm,nandcs";
313 reg = <0>;
314 nand-ecc-strength = <4>;
315 diff --git a/arch/arm/boot/dts/bcm988312hr.dts b/arch/arm/boot/dts/bcm988312hr.dts
316 index edd0f630e0251..16b212cc8a2a0 100644
317 --- a/arch/arm/boot/dts/bcm988312hr.dts
318 +++ b/arch/arm/boot/dts/bcm988312hr.dts
319 @@ -74,8 +74,8 @@
320 status = "okay";
321 };
322
323 -&nand {
324 - nandcs@0 {
325 +&nand_controller {
326 + nand@0 {
327 compatible = "brcm,nandcs";
328 reg = <0>;
329 nand-on-flash-bbt;
330 diff --git a/arch/arm/boot/dts/dra7-l4.dtsi b/arch/arm/boot/dts/dra7-l4.dtsi
331 index bc702579488b9..3f845a8531f40 100644
332 --- a/arch/arm/boot/dts/dra7-l4.dtsi
333 +++ b/arch/arm/boot/dts/dra7-l4.dtsi
334 @@ -1326,7 +1326,7 @@
335 };
336 };
337
338 - target-module@55000 { /* 0x48055000, ap 13 0e.0 */
339 + gpio2_target: target-module@55000 { /* 0x48055000, ap 13 0e.0 */
340 compatible = "ti,sysc-omap2", "ti,sysc";
341 reg = <0x55000 0x4>,
342 <0x55010 0x4>,
343 @@ -1359,7 +1359,7 @@
344 };
345 };
346
347 - target-module@57000 { /* 0x48057000, ap 15 06.0 */
348 + gpio3_target: target-module@57000 { /* 0x48057000, ap 15 06.0 */
349 compatible = "ti,sysc-omap2", "ti,sysc";
350 reg = <0x57000 0x4>,
351 <0x57010 0x4>,
352 diff --git a/arch/arm/boot/dts/gemini-dlink-dns-313.dts b/arch/arm/boot/dts/gemini-dlink-dns-313.dts
353 index 360642a02a488..d0bbf2b970dfc 100644
354 --- a/arch/arm/boot/dts/gemini-dlink-dns-313.dts
355 +++ b/arch/arm/boot/dts/gemini-dlink-dns-313.dts
356 @@ -140,7 +140,7 @@
357 };
358 };
359
360 - mdio0: ethernet-phy {
361 + mdio0: mdio {
362 compatible = "virtual,mdio-gpio";
363 /* Uses MDC and MDIO */
364 gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
365 diff --git a/arch/arm/boot/dts/gemini-nas4220b.dts b/arch/arm/boot/dts/gemini-nas4220b.dts
366 index 521714f38eeda..e1020e07e1366 100644
367 --- a/arch/arm/boot/dts/gemini-nas4220b.dts
368 +++ b/arch/arm/boot/dts/gemini-nas4220b.dts
369 @@ -62,7 +62,7 @@
370 };
371 };
372
373 - mdio0: ethernet-phy {
374 + mdio0: mdio {
375 compatible = "virtual,mdio-gpio";
376 gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
377 <&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
378 diff --git a/arch/arm/boot/dts/gemini-rut1xx.dts b/arch/arm/boot/dts/gemini-rut1xx.dts
379 index 08091d2a64e15..0ebda4efd9d0f 100644
380 --- a/arch/arm/boot/dts/gemini-rut1xx.dts
381 +++ b/arch/arm/boot/dts/gemini-rut1xx.dts
382 @@ -56,7 +56,7 @@
383 };
384 };
385
386 - mdio0: ethernet-phy {
387 + mdio0: mdio {
388 compatible = "virtual,mdio-gpio";
389 gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
390 <&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
391 diff --git a/arch/arm/boot/dts/gemini-wbd111.dts b/arch/arm/boot/dts/gemini-wbd111.dts
392 index 3a2761dd460f9..5602ba8f30f2f 100644
393 --- a/arch/arm/boot/dts/gemini-wbd111.dts
394 +++ b/arch/arm/boot/dts/gemini-wbd111.dts
395 @@ -68,7 +68,7 @@
396 };
397 };
398
399 - mdio0: ethernet-phy {
400 + mdio0: mdio {
401 compatible = "virtual,mdio-gpio";
402 gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
403 <&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
404 diff --git a/arch/arm/boot/dts/gemini-wbd222.dts b/arch/arm/boot/dts/gemini-wbd222.dts
405 index 52b4dbc0c0723..a4a260c36d752 100644
406 --- a/arch/arm/boot/dts/gemini-wbd222.dts
407 +++ b/arch/arm/boot/dts/gemini-wbd222.dts
408 @@ -67,7 +67,7 @@
409 };
410 };
411
412 - mdio0: ethernet-phy {
413 + mdio0: mdio {
414 compatible = "virtual,mdio-gpio";
415 gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
416 <&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
417 diff --git a/arch/arm/boot/dts/gemini.dtsi b/arch/arm/boot/dts/gemini.dtsi
418 index 8cf67b11751f7..ef4f1c5323bd7 100644
419 --- a/arch/arm/boot/dts/gemini.dtsi
420 +++ b/arch/arm/boot/dts/gemini.dtsi
421 @@ -286,6 +286,7 @@
422 clock-names = "PCLK", "PCICLK";
423 pinctrl-names = "default";
424 pinctrl-0 = <&pci_default_pins>;
425 + device_type = "pci";
426 #address-cells = <3>;
427 #size-cells = <2>;
428 #interrupt-cells = <1>;
429 diff --git a/arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi b/arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi
430 index 6678b97b10076..3617089dbe36d 100644
431 --- a/arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi
432 +++ b/arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi
433 @@ -315,8 +315,8 @@
434 fsl,pins = <
435 MX6QDL_PAD_EIM_D24__UART3_TX_DATA 0x1b0b1
436 MX6QDL_PAD_EIM_D25__UART3_RX_DATA 0x1b0b1
437 - MX6QDL_PAD_EIM_D30__UART3_RTS_B 0x1b0b1
438 - MX6QDL_PAD_EIM_D31__UART3_CTS_B 0x1b0b1
439 + MX6QDL_PAD_EIM_D31__UART3_RTS_B 0x1b0b1
440 + MX6QDL_PAD_EIM_D30__UART3_CTS_B 0x1b0b1
441 >;
442 };
443
444 @@ -403,6 +403,7 @@
445 &uart3 {
446 pinctrl-names = "default";
447 pinctrl-0 = <&pinctrl_uart3>;
448 + uart-has-rtscts;
449 status = "disabled";
450 };
451
452 diff --git a/arch/arm/boot/dts/rk3036-kylin.dts b/arch/arm/boot/dts/rk3036-kylin.dts
453 index fb3cf005cc902..2ef47ebeb0cbe 100644
454 --- a/arch/arm/boot/dts/rk3036-kylin.dts
455 +++ b/arch/arm/boot/dts/rk3036-kylin.dts
456 @@ -390,7 +390,7 @@
457 };
458 };
459
460 - sleep {
461 + suspend {
462 global_pwroff: global-pwroff {
463 rockchip,pins = <2 RK_PA7 1 &pcfg_pull_none>;
464 };
465 diff --git a/arch/arm/boot/dts/rk3066a.dtsi b/arch/arm/boot/dts/rk3066a.dtsi
466 index 3d1b02f45ffd6..1ac9deb3bd39a 100644
467 --- a/arch/arm/boot/dts/rk3066a.dtsi
468 +++ b/arch/arm/boot/dts/rk3066a.dtsi
469 @@ -761,7 +761,7 @@
470 #address-cells = <1>;
471 #size-cells = <0>;
472
473 - pd_vio@RK3066_PD_VIO {
474 + power-domain@RK3066_PD_VIO {
475 reg = <RK3066_PD_VIO>;
476 clocks = <&cru ACLK_LCDC0>,
477 <&cru ACLK_LCDC1>,
478 @@ -788,7 +788,7 @@
479 <&qos_rga>;
480 };
481
482 - pd_video@RK3066_PD_VIDEO {
483 + power-domain@RK3066_PD_VIDEO {
484 reg = <RK3066_PD_VIDEO>;
485 clocks = <&cru ACLK_VDPU>,
486 <&cru ACLK_VEPU>,
487 @@ -797,7 +797,7 @@
488 pm_qos = <&qos_vpu>;
489 };
490
491 - pd_gpu@RK3066_PD_GPU {
492 + power-domain@RK3066_PD_GPU {
493 reg = <RK3066_PD_GPU>;
494 clocks = <&cru ACLK_GPU>;
495 pm_qos = <&qos_gpu>;
496 diff --git a/arch/arm/boot/dts/rk3188.dtsi b/arch/arm/boot/dts/rk3188.dtsi
497 index 10ede65d90f38..ee8a24a0e3cb1 100644
498 --- a/arch/arm/boot/dts/rk3188.dtsi
499 +++ b/arch/arm/boot/dts/rk3188.dtsi
500 @@ -150,16 +150,16 @@
501 compatible = "rockchip,rk3188-timer", "rockchip,rk3288-timer";
502 reg = <0x2000e000 0x20>;
503 interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
504 - clocks = <&cru SCLK_TIMER3>, <&cru PCLK_TIMER3>;
505 - clock-names = "timer", "pclk";
506 + clocks = <&cru PCLK_TIMER3>, <&cru SCLK_TIMER3>;
507 + clock-names = "pclk", "timer";
508 };
509
510 timer6: timer@200380a0 {
511 compatible = "rockchip,rk3188-timer", "rockchip,rk3288-timer";
512 reg = <0x200380a0 0x20>;
513 interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
514 - clocks = <&cru SCLK_TIMER6>, <&cru PCLK_TIMER0>;
515 - clock-names = "timer", "pclk";
516 + clocks = <&cru PCLK_TIMER0>, <&cru SCLK_TIMER6>;
517 + clock-names = "pclk", "timer";
518 };
519
520 i2s0: i2s@1011a000 {
521 @@ -701,7 +701,7 @@
522 #address-cells = <1>;
523 #size-cells = <0>;
524
525 - pd_vio@RK3188_PD_VIO {
526 + power-domain@RK3188_PD_VIO {
527 reg = <RK3188_PD_VIO>;
528 clocks = <&cru ACLK_LCDC0>,
529 <&cru ACLK_LCDC1>,
530 @@ -723,7 +723,7 @@
531 <&qos_rga>;
532 };
533
534 - pd_video@RK3188_PD_VIDEO {
535 + power-domain@RK3188_PD_VIDEO {
536 reg = <RK3188_PD_VIDEO>;
537 clocks = <&cru ACLK_VDPU>,
538 <&cru ACLK_VEPU>,
539 @@ -732,7 +732,7 @@
540 pm_qos = <&qos_vpu>;
541 };
542
543 - pd_gpu@RK3188_PD_GPU {
544 + power-domain@RK3188_PD_GPU {
545 reg = <RK3188_PD_GPU>;
546 clocks = <&cru ACLK_GPU>;
547 pm_qos = <&qos_gpu>;
548 diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi
549 index 6bb78b19c5554..140e22d74dcfb 100644
550 --- a/arch/arm/boot/dts/rk322x.dtsi
551 +++ b/arch/arm/boot/dts/rk322x.dtsi
552 @@ -570,10 +570,9 @@
553 compatible = "rockchip,iommu";
554 reg = <0x20020800 0x100>;
555 interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
556 - interrupt-names = "vpu_mmu";
557 clocks = <&cru ACLK_VPU>, <&cru HCLK_VPU>;
558 clock-names = "aclk", "iface";
559 - iommu-cells = <0>;
560 + #iommu-cells = <0>;
561 status = "disabled";
562 };
563
564 @@ -581,10 +580,9 @@
565 compatible = "rockchip,iommu";
566 reg = <0x20030480 0x40>, <0x200304c0 0x40>;
567 interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
568 - interrupt-names = "vdec_mmu";
569 clocks = <&cru ACLK_RKVDEC>, <&cru HCLK_RKVDEC>;
570 clock-names = "aclk", "iface";
571 - iommu-cells = <0>;
572 + #iommu-cells = <0>;
573 status = "disabled";
574 };
575
576 @@ -614,7 +612,6 @@
577 compatible = "rockchip,iommu";
578 reg = <0x20053f00 0x100>;
579 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
580 - interrupt-names = "vop_mmu";
581 clocks = <&cru ACLK_VOP>, <&cru HCLK_VOP>;
582 clock-names = "aclk", "iface";
583 #iommu-cells = <0>;
584 @@ -625,10 +622,9 @@
585 compatible = "rockchip,iommu";
586 reg = <0x20070800 0x100>;
587 interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
588 - interrupt-names = "iep_mmu";
589 clocks = <&cru ACLK_IEP>, <&cru HCLK_IEP>;
590 clock-names = "aclk", "iface";
591 - iommu-cells = <0>;
592 + #iommu-cells = <0>;
593 status = "disabled";
594 };
595
596 diff --git a/arch/arm/boot/dts/rk3288-rock2-som.dtsi b/arch/arm/boot/dts/rk3288-rock2-som.dtsi
597 index 9f9e2bfd1295e..7b79a21f9bbb2 100644
598 --- a/arch/arm/boot/dts/rk3288-rock2-som.dtsi
599 +++ b/arch/arm/boot/dts/rk3288-rock2-som.dtsi
600 @@ -218,7 +218,7 @@
601 flash0-supply = <&vcc_flash>;
602 flash1-supply = <&vccio_pmu>;
603 gpio30-supply = <&vccio_pmu>;
604 - gpio1830 = <&vcc_io>;
605 + gpio1830-supply = <&vcc_io>;
606 lcdc-supply = <&vcc_io>;
607 sdcard-supply = <&vccio_sd>;
608 wifi-supply = <&vcc_18>;
609 diff --git a/arch/arm/boot/dts/rk3288-vyasa.dts b/arch/arm/boot/dts/rk3288-vyasa.dts
610 index ba06e9f97ddce..acfb7dc2df560 100644
611 --- a/arch/arm/boot/dts/rk3288-vyasa.dts
612 +++ b/arch/arm/boot/dts/rk3288-vyasa.dts
613 @@ -357,10 +357,10 @@
614 audio-supply = <&vcc_18>;
615 bb-supply = <&vcc_io>;
616 dvp-supply = <&vcc_io>;
617 - flash0-suuply = <&vcc_18>;
618 + flash0-supply = <&vcc_18>;
619 flash1-supply = <&vcc_lan>;
620 gpio30-supply = <&vcc_io>;
621 - gpio1830 = <&vcc_io>;
622 + gpio1830-supply = <&vcc_io>;
623 lcdc-supply = <&vcc_io>;
624 sdcard-supply = <&vccio_sd>;
625 wifi-supply = <&vcc_18>;
626 diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
627 index cc893e154fe5a..658ceb96d8bd1 100644
628 --- a/arch/arm/boot/dts/rk3288.dtsi
629 +++ b/arch/arm/boot/dts/rk3288.dtsi
630 @@ -238,8 +238,8 @@
631 compatible = "rockchip,rk3288-timer";
632 reg = <0x0 0xff810000 0x0 0x20>;
633 interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
634 - clocks = <&xin24m>, <&cru PCLK_TIMER>;
635 - clock-names = "timer", "pclk";
636 + clocks = <&cru PCLK_TIMER>, <&xin24m>;
637 + clock-names = "pclk", "timer";
638 };
639
640 display-subsystem {
641 @@ -771,7 +771,7 @@
642 * *_HDMI HDMI
643 * *_MIPI_* MIPI
644 */
645 - pd_vio@RK3288_PD_VIO {
646 + power-domain@RK3288_PD_VIO {
647 reg = <RK3288_PD_VIO>;
648 clocks = <&cru ACLK_IEP>,
649 <&cru ACLK_ISP>,
650 @@ -813,7 +813,7 @@
651 * Note: The following 3 are HEVC(H.265) clocks,
652 * and on the ACLK_HEVC_NIU (NOC).
653 */
654 - pd_hevc@RK3288_PD_HEVC {
655 + power-domain@RK3288_PD_HEVC {
656 reg = <RK3288_PD_HEVC>;
657 clocks = <&cru ACLK_HEVC>,
658 <&cru SCLK_HEVC_CABAC>,
659 @@ -827,7 +827,7 @@
660 * (video endecoder & decoder) clocks that on the
661 * ACLK_VCODEC_NIU and HCLK_VCODEC_NIU (NOC).
662 */
663 - pd_video@RK3288_PD_VIDEO {
664 + power-domain@RK3288_PD_VIDEO {
665 reg = <RK3288_PD_VIDEO>;
666 clocks = <&cru ACLK_VCODEC>,
667 <&cru HCLK_VCODEC>;
668 @@ -838,7 +838,7 @@
669 * Note: ACLK_GPU is the GPU clock,
670 * and on the ACLK_GPU_NIU (NOC).
671 */
672 - pd_gpu@RK3288_PD_GPU {
673 + power-domain@RK3288_PD_GPU {
674 reg = <RK3288_PD_GPU>;
675 clocks = <&cru ACLK_GPU>;
676 pm_qos = <&qos_gpu_r>,
677 @@ -1575,7 +1575,7 @@
678 drive-strength = <12>;
679 };
680
681 - sleep {
682 + suspend {
683 global_pwroff: global-pwroff {
684 rockchip,pins = <0 RK_PA0 1 &pcfg_pull_none>;
685 };
686 diff --git a/arch/arm/boot/dts/stm32429i-eval.dts b/arch/arm/boot/dts/stm32429i-eval.dts
687 index ba08624c6237d..4f45e71a1e4d3 100644
688 --- a/arch/arm/boot/dts/stm32429i-eval.dts
689 +++ b/arch/arm/boot/dts/stm32429i-eval.dts
690 @@ -112,17 +112,15 @@
691 };
692 };
693
694 - gpio_keys {
695 + gpio-keys {
696 compatible = "gpio-keys";
697 - #address-cells = <1>;
698 - #size-cells = <0>;
699 autorepeat;
700 - button@0 {
701 + button-0 {
702 label = "Wake up";
703 linux,code = <KEY_WAKEUP>;
704 gpios = <&gpioa 0 0>;
705 };
706 - button@1 {
707 + button-1 {
708 label = "Tamper";
709 linux,code = <KEY_RESTART>;
710 gpios = <&gpioc 13 0>;
711 diff --git a/arch/arm/boot/dts/stm32746g-eval.dts b/arch/arm/boot/dts/stm32746g-eval.dts
712 index 2b1664884ae7b..8d64b52838c06 100644
713 --- a/arch/arm/boot/dts/stm32746g-eval.dts
714 +++ b/arch/arm/boot/dts/stm32746g-eval.dts
715 @@ -81,12 +81,10 @@
716 };
717 };
718
719 - gpio_keys {
720 + gpio-keys {
721 compatible = "gpio-keys";
722 - #address-cells = <1>;
723 - #size-cells = <0>;
724 autorepeat;
725 - button@0 {
726 + button-0 {
727 label = "Wake up";
728 linux,code = <KEY_WAKEUP>;
729 gpios = <&gpioc 13 0>;
730 diff --git a/arch/arm/boot/dts/stm32f429-disco.dts b/arch/arm/boot/dts/stm32f429-disco.dts
731 index e19d0fe7dbdac..49ae2d72afc95 100644
732 --- a/arch/arm/boot/dts/stm32f429-disco.dts
733 +++ b/arch/arm/boot/dts/stm32f429-disco.dts
734 @@ -79,12 +79,10 @@
735 };
736 };
737
738 - gpio_keys {
739 + gpio-keys {
740 compatible = "gpio-keys";
741 - #address-cells = <1>;
742 - #size-cells = <0>;
743 autorepeat;
744 - button@0 {
745 + button-0 {
746 label = "User";
747 linux,code = <KEY_HOME>;
748 gpios = <&gpioa 0 0>;
749 diff --git a/arch/arm/boot/dts/stm32f429.dtsi b/arch/arm/boot/dts/stm32f429.dtsi
750 index 5c8a826b31958..dd41342ef0175 100644
751 --- a/arch/arm/boot/dts/stm32f429.dtsi
752 +++ b/arch/arm/boot/dts/stm32f429.dtsi
753 @@ -283,8 +283,6 @@
754 };
755
756 timers13: timers@40001c00 {
757 - #address-cells = <1>;
758 - #size-cells = <0>;
759 compatible = "st,stm32-timers";
760 reg = <0x40001C00 0x400>;
761 clocks = <&rcc 0 STM32F4_APB1_CLOCK(TIM13)>;
762 @@ -299,8 +297,6 @@
763 };
764
765 timers14: timers@40002000 {
766 - #address-cells = <1>;
767 - #size-cells = <0>;
768 compatible = "st,stm32-timers";
769 reg = <0x40002000 0x400>;
770 clocks = <&rcc 0 STM32F4_APB1_CLOCK(TIM14)>;
771 @@ -623,8 +619,6 @@
772 };
773
774 timers10: timers@40014400 {
775 - #address-cells = <1>;
776 - #size-cells = <0>;
777 compatible = "st,stm32-timers";
778 reg = <0x40014400 0x400>;
779 clocks = <&rcc 0 STM32F4_APB2_CLOCK(TIM10)>;
780 @@ -639,8 +633,6 @@
781 };
782
783 timers11: timers@40014800 {
784 - #address-cells = <1>;
785 - #size-cells = <0>;
786 compatible = "st,stm32-timers";
787 reg = <0x40014800 0x400>;
788 clocks = <&rcc 0 STM32F4_APB2_CLOCK(TIM11)>;
789 @@ -696,7 +688,7 @@
790 status = "disabled";
791 };
792
793 - rcc: rcc@40023810 {
794 + rcc: rcc@40023800 {
795 #reset-cells = <1>;
796 #clock-cells = <2>;
797 compatible = "st,stm32f42xx-rcc", "st,stm32-rcc";
798 diff --git a/arch/arm/boot/dts/stm32f469-disco.dts b/arch/arm/boot/dts/stm32f469-disco.dts
799 index c6dc6d1a051b0..0ce450123dda6 100644
800 --- a/arch/arm/boot/dts/stm32f469-disco.dts
801 +++ b/arch/arm/boot/dts/stm32f469-disco.dts
802 @@ -104,12 +104,10 @@
803 };
804 };
805
806 - gpio_keys {
807 + gpio-keys {
808 compatible = "gpio-keys";
809 - #address-cells = <1>;
810 - #size-cells = <0>;
811 autorepeat;
812 - button@0 {
813 + button-0 {
814 label = "User";
815 linux,code = <KEY_WAKEUP>;
816 gpios = <&gpioa 0 GPIO_ACTIVE_HIGH>;
817 diff --git a/arch/arm/boot/dts/stm32f746.dtsi b/arch/arm/boot/dts/stm32f746.dtsi
818 index d26f93f8b9c2a..60680fcf8eb3d 100644
819 --- a/arch/arm/boot/dts/stm32f746.dtsi
820 +++ b/arch/arm/boot/dts/stm32f746.dtsi
821 @@ -265,8 +265,6 @@
822 };
823
824 timers13: timers@40001c00 {
825 - #address-cells = <1>;
826 - #size-cells = <0>;
827 compatible = "st,stm32-timers";
828 reg = <0x40001C00 0x400>;
829 clocks = <&rcc 0 STM32F7_APB1_CLOCK(TIM13)>;
830 @@ -281,8 +279,6 @@
831 };
832
833 timers14: timers@40002000 {
834 - #address-cells = <1>;
835 - #size-cells = <0>;
836 compatible = "st,stm32-timers";
837 reg = <0x40002000 0x400>;
838 clocks = <&rcc 0 STM32F7_APB1_CLOCK(TIM14)>;
839 @@ -366,9 +362,9 @@
840 status = "disabled";
841 };
842
843 - i2c3: i2c@40005C00 {
844 + i2c3: i2c@40005c00 {
845 compatible = "st,stm32f7-i2c";
846 - reg = <0x40005C00 0x400>;
847 + reg = <0x40005c00 0x400>;
848 interrupts = <72>,
849 <73>;
850 resets = <&rcc STM32F7_APB1_RESET(I2C3)>;
851 @@ -533,8 +529,6 @@
852 };
853
854 timers10: timers@40014400 {
855 - #address-cells = <1>;
856 - #size-cells = <0>;
857 compatible = "st,stm32-timers";
858 reg = <0x40014400 0x400>;
859 clocks = <&rcc 0 STM32F7_APB2_CLOCK(TIM10)>;
860 @@ -549,8 +543,6 @@
861 };
862
863 timers11: timers@40014800 {
864 - #address-cells = <1>;
865 - #size-cells = <0>;
866 compatible = "st,stm32-timers";
867 reg = <0x40014800 0x400>;
868 clocks = <&rcc 0 STM32F7_APB2_CLOCK(TIM11)>;
869 diff --git a/arch/arm/boot/dts/stm32f769-disco.dts b/arch/arm/boot/dts/stm32f769-disco.dts
870 index 6f1d0ac8c31c7..a4284b761e7fe 100644
871 --- a/arch/arm/boot/dts/stm32f769-disco.dts
872 +++ b/arch/arm/boot/dts/stm32f769-disco.dts
873 @@ -75,12 +75,10 @@
874 };
875 };
876
877 - gpio_keys {
878 + gpio-keys {
879 compatible = "gpio-keys";
880 - #address-cells = <1>;
881 - #size-cells = <0>;
882 autorepeat;
883 - button@0 {
884 + button-0 {
885 label = "User";
886 linux,code = <KEY_HOME>;
887 gpios = <&gpioa 0 GPIO_ACTIVE_HIGH>;
888 diff --git a/arch/arm/boot/dts/stm32h743.dtsi b/arch/arm/boot/dts/stm32h743.dtsi
889 index c065266ee3776..82a234c64b8b9 100644
890 --- a/arch/arm/boot/dts/stm32h743.dtsi
891 +++ b/arch/arm/boot/dts/stm32h743.dtsi
892 @@ -438,8 +438,6 @@
893 };
894
895 lptimer4: timer@58002c00 {
896 - #address-cells = <1>;
897 - #size-cells = <0>;
898 compatible = "st,stm32-lptimer";
899 reg = <0x58002c00 0x400>;
900 clocks = <&rcc LPTIM4_CK>;
901 @@ -454,8 +452,6 @@
902 };
903
904 lptimer5: timer@58003000 {
905 - #address-cells = <1>;
906 - #size-cells = <0>;
907 compatible = "st,stm32-lptimer";
908 reg = <0x58003000 0x400>;
909 clocks = <&rcc LPTIM5_CK>;
910 diff --git a/arch/arm/boot/dts/stm32mp157c.dtsi b/arch/arm/boot/dts/stm32mp157c.dtsi
911 index f98e0370c0bce..eca469a64a977 100644
912 --- a/arch/arm/boot/dts/stm32mp157c.dtsi
913 +++ b/arch/arm/boot/dts/stm32mp157c.dtsi
914 @@ -1311,12 +1311,6 @@
915 status = "disabled";
916 };
917
918 - stmmac_axi_config_0: stmmac-axi-config {
919 - snps,wr_osr_lmt = <0x7>;
920 - snps,rd_osr_lmt = <0x7>;
921 - snps,blen = <0 0 0 0 16 8 4>;
922 - };
923 -
924 ethernet0: ethernet@5800a000 {
925 compatible = "st,stm32mp1-dwmac", "snps,dwmac-4.20a";
926 reg = <0x5800a000 0x2000>;
927 @@ -1339,6 +1333,12 @@
928 snps,axi-config = <&stmmac_axi_config_0>;
929 snps,tso;
930 status = "disabled";
931 +
932 + stmmac_axi_config_0: stmmac-axi-config {
933 + snps,wr_osr_lmt = <0x7>;
934 + snps,rd_osr_lmt = <0x7>;
935 + snps,blen = <0 0 0 0 16 8 4>;
936 + };
937 };
938
939 usbh_ohci: usbh-ohci@5800c000 {
940 diff --git a/arch/arm/mach-imx/suspend-imx53.S b/arch/arm/mach-imx/suspend-imx53.S
941 index 41b8aad653634..46570ec2fbcfe 100644
942 --- a/arch/arm/mach-imx/suspend-imx53.S
943 +++ b/arch/arm/mach-imx/suspend-imx53.S
944 @@ -28,11 +28,11 @@
945 * ^
946 * ^
947 * imx53_suspend code
948 - * PM_INFO structure(imx53_suspend_info)
949 + * PM_INFO structure(imx5_cpu_suspend_info)
950 * ======================== low address =======================
951 */
952
953 -/* Offsets of members of struct imx53_suspend_info */
954 +/* Offsets of members of struct imx5_cpu_suspend_info */
955 #define SUSPEND_INFO_MX53_M4IF_V_OFFSET 0x0
956 #define SUSPEND_INFO_MX53_IOMUXC_V_OFFSET 0x4
957 #define SUSPEND_INFO_MX53_IO_COUNT_OFFSET 0x8
958 diff --git a/arch/arm64/boot/dts/arm/juno-base.dtsi b/arch/arm64/boot/dts/arm/juno-base.dtsi
959 index c47f76b01c4b5..65bcdd0fe78ad 100644
960 --- a/arch/arm64/boot/dts/arm/juno-base.dtsi
961 +++ b/arch/arm64/boot/dts/arm/juno-base.dtsi
962 @@ -537,13 +537,13 @@
963 clocks {
964 compatible = "arm,scpi-clocks";
965
966 - scpi_dvfs: scpi-dvfs {
967 + scpi_dvfs: clocks-0 {
968 compatible = "arm,scpi-dvfs-clocks";
969 #clock-cells = <1>;
970 clock-indices = <0>, <1>, <2>;
971 clock-output-names = "atlclk", "aplclk","gpuclk";
972 };
973 - scpi_clk: scpi-clk {
974 + scpi_clk: clocks-1 {
975 compatible = "arm,scpi-variable-clocks";
976 #clock-cells = <1>;
977 clock-indices = <3>;
978 @@ -551,7 +551,7 @@
979 };
980 };
981
982 - scpi_devpd: scpi-power-domains {
983 + scpi_devpd: power-controller {
984 compatible = "arm,scpi-power-domains";
985 num-domains = <2>;
986 #power-domain-cells = <1>;
987 diff --git a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
988 index 7a0be8eaa84a2..cdb2fa47637da 100644
989 --- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
990 +++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
991 @@ -501,7 +501,6 @@
992 clocks = <&clockgen 4 3>;
993 clock-names = "dspi";
994 spi-num-chipselects = <5>;
995 - bus-num = <0>;
996 };
997
998 esdhc: esdhc@2140000 {
999 diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
1000 index f1011bcd5ed5a..3dae8d7c76198 100644
1001 --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
1002 +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
1003 @@ -1056,6 +1056,14 @@
1004 <&src IMX8MQ_RESET_PCIE_CTRL_APPS_EN>,
1005 <&src IMX8MQ_RESET_PCIE_CTRL_APPS_TURNOFF>;
1006 reset-names = "pciephy", "apps", "turnoff";
1007 + assigned-clocks = <&clk IMX8MQ_CLK_PCIE1_CTRL>,
1008 + <&clk IMX8MQ_CLK_PCIE1_PHY>,
1009 + <&clk IMX8MQ_CLK_PCIE1_AUX>;
1010 + assigned-clock-parents = <&clk IMX8MQ_SYS2_PLL_250M>,
1011 + <&clk IMX8MQ_SYS2_PLL_100M>,
1012 + <&clk IMX8MQ_SYS1_PLL_80M>;
1013 + assigned-clock-rates = <250000000>, <100000000>,
1014 + <10000000>;
1015 status = "disabled";
1016 };
1017
1018 @@ -1085,6 +1093,14 @@
1019 <&src IMX8MQ_RESET_PCIE2_CTRL_APPS_EN>,
1020 <&src IMX8MQ_RESET_PCIE2_CTRL_APPS_TURNOFF>;
1021 reset-names = "pciephy", "apps", "turnoff";
1022 + assigned-clocks = <&clk IMX8MQ_CLK_PCIE2_CTRL>,
1023 + <&clk IMX8MQ_CLK_PCIE2_PHY>,
1024 + <&clk IMX8MQ_CLK_PCIE2_AUX>;
1025 + assigned-clock-parents = <&clk IMX8MQ_SYS2_PLL_250M>,
1026 + <&clk IMX8MQ_SYS2_PLL_100M>,
1027 + <&clk IMX8MQ_SYS1_PLL_80M>;
1028 + assigned-clock-rates = <250000000>, <100000000>,
1029 + <10000000>;
1030 status = "disabled";
1031 };
1032
1033 diff --git a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
1034 index fad70c2df7bc0..874bc3954c8e6 100644
1035 --- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
1036 +++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
1037 @@ -106,6 +106,12 @@
1038 /* enabled by U-Boot if SFP module is present */
1039 status = "disabled";
1040 };
1041 +
1042 + firmware {
1043 + armada-3700-rwtm {
1044 + compatible = "marvell,armada-3700-rwtm-firmware", "cznic,turris-mox-rwtm";
1045 + };
1046 + };
1047 };
1048
1049 &i2c0 {
1050 diff --git a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
1051 index 6cb1278613c5e..52767037e0494 100644
1052 --- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
1053 +++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
1054 @@ -500,4 +500,12 @@
1055 };
1056 };
1057 };
1058 +
1059 + firmware {
1060 + armada-3700-rwtm {
1061 + compatible = "marvell,armada-3700-rwtm-firmware";
1062 + mboxes = <&rwtm 0>;
1063 + status = "okay";
1064 + };
1065 + };
1066 };
1067 diff --git a/arch/arm64/boot/dts/rockchip/px30.dtsi b/arch/arm64/boot/dts/rockchip/px30.dtsi
1068 index 98b014a8f9165..f297601c9f715 100644
1069 --- a/arch/arm64/boot/dts/rockchip/px30.dtsi
1070 +++ b/arch/arm64/boot/dts/rockchip/px30.dtsi
1071 @@ -213,20 +213,20 @@
1072 #size-cells = <0>;
1073
1074 /* These power domains are grouped by VD_LOGIC */
1075 - pd_usb@PX30_PD_USB {
1076 + power-domain@PX30_PD_USB {
1077 reg = <PX30_PD_USB>;
1078 clocks = <&cru HCLK_HOST>,
1079 <&cru HCLK_OTG>,
1080 <&cru SCLK_OTG_ADP>;
1081 pm_qos = <&qos_usb_host>, <&qos_usb_otg>;
1082 };
1083 - pd_sdcard@PX30_PD_SDCARD {
1084 + power-domain@PX30_PD_SDCARD {
1085 reg = <PX30_PD_SDCARD>;
1086 clocks = <&cru HCLK_SDMMC>,
1087 <&cru SCLK_SDMMC>;
1088 pm_qos = <&qos_sdmmc>;
1089 };
1090 - pd_gmac@PX30_PD_GMAC {
1091 + power-domain@PX30_PD_GMAC {
1092 reg = <PX30_PD_GMAC>;
1093 clocks = <&cru ACLK_GMAC>,
1094 <&cru PCLK_GMAC>,
1095 @@ -234,7 +234,7 @@
1096 <&cru SCLK_GMAC_RX_TX>;
1097 pm_qos = <&qos_gmac>;
1098 };
1099 - pd_mmc_nand@PX30_PD_MMC_NAND {
1100 + power-domain@PX30_PD_MMC_NAND {
1101 reg = <PX30_PD_MMC_NAND>;
1102 clocks = <&cru HCLK_NANDC>,
1103 <&cru HCLK_EMMC>,
1104 @@ -247,14 +247,14 @@
1105 pm_qos = <&qos_emmc>, <&qos_nand>,
1106 <&qos_sdio>, <&qos_sfc>;
1107 };
1108 - pd_vpu@PX30_PD_VPU {
1109 + power-domain@PX30_PD_VPU {
1110 reg = <PX30_PD_VPU>;
1111 clocks = <&cru ACLK_VPU>,
1112 <&cru HCLK_VPU>,
1113 <&cru SCLK_CORE_VPU>;
1114 pm_qos = <&qos_vpu>, <&qos_vpu_r128>;
1115 };
1116 - pd_vo@PX30_PD_VO {
1117 + power-domain@PX30_PD_VO {
1118 reg = <PX30_PD_VO>;
1119 clocks = <&cru ACLK_RGA>,
1120 <&cru ACLK_VOPB>,
1121 @@ -270,7 +270,7 @@
1122 pm_qos = <&qos_rga_rd>, <&qos_rga_wr>,
1123 <&qos_vop_m0>, <&qos_vop_m1>;
1124 };
1125 - pd_vi@PX30_PD_VI {
1126 + power-domain@PX30_PD_VI {
1127 reg = <PX30_PD_VI>;
1128 clocks = <&cru ACLK_CIF>,
1129 <&cru ACLK_ISP>,
1130 @@ -281,7 +281,7 @@
1131 <&qos_isp_wr>, <&qos_isp_m1>,
1132 <&qos_vip>;
1133 };
1134 - pd_gpu@PX30_PD_GPU {
1135 + power-domain@PX30_PD_GPU {
1136 reg = <PX30_PD_GPU>;
1137 clocks = <&cru SCLK_GPU>;
1138 pm_qos = <&qos_gpu>;
1139 diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
1140 index e0ed323935a4d..44ad744c4710d 100644
1141 --- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
1142 +++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
1143 @@ -270,13 +270,13 @@
1144 #address-cells = <1>;
1145 #size-cells = <0>;
1146
1147 - pd_hevc@RK3328_PD_HEVC {
1148 + power-domain@RK3328_PD_HEVC {
1149 reg = <RK3328_PD_HEVC>;
1150 };
1151 - pd_video@RK3328_PD_VIDEO {
1152 + power-domain@RK3328_PD_VIDEO {
1153 reg = <RK3328_PD_VIDEO>;
1154 };
1155 - pd_vpu@RK3328_PD_VPU {
1156 + power-domain@RK3328_PD_VPU {
1157 reg = <RK3328_PD_VPU>;
1158 clocks = <&cru ACLK_VPU>, <&cru HCLK_VPU>;
1159 };
1160 diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
1161 index 9d6ed8cda2c86..750dad0d17400 100644
1162 --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
1163 +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
1164 @@ -2317,7 +2317,7 @@
1165 };
1166 };
1167
1168 - sleep {
1169 + suspend {
1170 ap_pwroff: ap-pwroff {
1171 rockchip,pins = <1 RK_PA5 1 &pcfg_pull_none>;
1172 };
1173 diff --git a/arch/s390/include/asm/stacktrace.h b/arch/s390/include/asm/stacktrace.h
1174 index 6836532f8d1a6..e192681f83e10 100644
1175 --- a/arch/s390/include/asm/stacktrace.h
1176 +++ b/arch/s390/include/asm/stacktrace.h
1177 @@ -115,6 +115,103 @@ struct stack_frame {
1178 r2; \
1179 })
1180
1181 +#define CALL_LARGS_0(...) \
1182 + long dummy = 0
1183 +#define CALL_LARGS_1(t1, a1) \
1184 + long arg1 = (long)(t1)(a1)
1185 +#define CALL_LARGS_2(t1, a1, t2, a2) \
1186 + CALL_LARGS_1(t1, a1); \
1187 + long arg2 = (long)(t2)(a2)
1188 +#define CALL_LARGS_3(t1, a1, t2, a2, t3, a3) \
1189 + CALL_LARGS_2(t1, a1, t2, a2); \
1190 + long arg3 = (long)(t3)(a3)
1191 +#define CALL_LARGS_4(t1, a1, t2, a2, t3, a3, t4, a4) \
1192 + CALL_LARGS_3(t1, a1, t2, a2, t3, a3); \
1193 + long arg4 = (long)(t4)(a4)
1194 +#define CALL_LARGS_5(t1, a1, t2, a2, t3, a3, t4, a4, t5, a5) \
1195 + CALL_LARGS_4(t1, a1, t2, a2, t3, a3, t4, a4); \
1196 + long arg5 = (long)(t5)(a5)
1197 +
1198 +#define CALL_REGS_0 \
1199 + register long r2 asm("2") = dummy
1200 +#define CALL_REGS_1 \
1201 + register long r2 asm("2") = arg1
1202 +#define CALL_REGS_2 \
1203 + CALL_REGS_1; \
1204 + register long r3 asm("3") = arg2
1205 +#define CALL_REGS_3 \
1206 + CALL_REGS_2; \
1207 + register long r4 asm("4") = arg3
1208 +#define CALL_REGS_4 \
1209 + CALL_REGS_3; \
1210 + register long r5 asm("5") = arg4
1211 +#define CALL_REGS_5 \
1212 + CALL_REGS_4; \
1213 + register long r6 asm("6") = arg5
1214 +
1215 +#define CALL_TYPECHECK_0(...)
1216 +#define CALL_TYPECHECK_1(t, a, ...) \
1217 + typecheck(t, a)
1218 +#define CALL_TYPECHECK_2(t, a, ...) \
1219 + CALL_TYPECHECK_1(__VA_ARGS__); \
1220 + typecheck(t, a)
1221 +#define CALL_TYPECHECK_3(t, a, ...) \
1222 + CALL_TYPECHECK_2(__VA_ARGS__); \
1223 + typecheck(t, a)
1224 +#define CALL_TYPECHECK_4(t, a, ...) \
1225 + CALL_TYPECHECK_3(__VA_ARGS__); \
1226 + typecheck(t, a)
1227 +#define CALL_TYPECHECK_5(t, a, ...) \
1228 + CALL_TYPECHECK_4(__VA_ARGS__); \
1229 + typecheck(t, a)
1230 +
1231 +#define CALL_PARM_0(...) void
1232 +#define CALL_PARM_1(t, a, ...) t
1233 +#define CALL_PARM_2(t, a, ...) t, CALL_PARM_1(__VA_ARGS__)
1234 +#define CALL_PARM_3(t, a, ...) t, CALL_PARM_2(__VA_ARGS__)
1235 +#define CALL_PARM_4(t, a, ...) t, CALL_PARM_3(__VA_ARGS__)
1236 +#define CALL_PARM_5(t, a, ...) t, CALL_PARM_4(__VA_ARGS__)
1237 +#define CALL_PARM_6(t, a, ...) t, CALL_PARM_5(__VA_ARGS__)
1238 +
1239 +/*
1240 + * Use call_on_stack() to call a function switching to a specified
1241 + * stack. Proper sign and zero extension of function arguments is
1242 + * done. Usage:
1243 + *
1244 + * rc = call_on_stack(nr, stack, rettype, fn, t1, a1, t2, a2, ...)
1245 + *
1246 + * - nr specifies the number of function arguments of fn.
1247 + * - stack specifies the stack to be used.
1248 + * - fn is the function to be called.
1249 + * - rettype is the return type of fn.
1250 + * - t1, a1, ... are pairs, where t1 must match the type of the first
1251 + * argument of fn, t2 the second, etc. a1 is the corresponding
1252 + * first function argument (not name), etc.
1253 + */
1254 +#define call_on_stack(nr, stack, rettype, fn, ...) \
1255 +({ \
1256 + rettype (*__fn)(CALL_PARM_##nr(__VA_ARGS__)) = fn; \
1257 + unsigned long frame = current_frame_address(); \
1258 + unsigned long __stack = stack; \
1259 + unsigned long prev; \
1260 + CALL_LARGS_##nr(__VA_ARGS__); \
1261 + CALL_REGS_##nr; \
1262 + \
1263 + CALL_TYPECHECK_##nr(__VA_ARGS__); \
1264 + asm volatile( \
1265 + " lgr %[_prev],15\n" \
1266 + " lg 15,%[_stack]\n" \
1267 + " stg %[_frame],%[_bc](15)\n" \
1268 + " brasl 14,%[_fn]\n" \
1269 + " lgr 15,%[_prev]\n" \
1270 + : [_prev] "=&d" (prev), CALL_FMT_##nr \
1271 + : [_stack] "R" (__stack), \
1272 + [_bc] "i" (offsetof(struct stack_frame, back_chain)), \
1273 + [_frame] "d" (frame), \
1274 + [_fn] "X" (__fn) : CALL_CLOBBER_##nr); \
1275 + (rettype)r2; \
1276 +})
1277 +
1278 #define CALL_ON_STACK_NORETURN(fn, stack) \
1279 ({ \
1280 asm volatile( \
1281 diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c
1282 index 91185db9a952f..992c15c016dd0 100644
1283 --- a/drivers/dma-buf/sync_file.c
1284 +++ b/drivers/dma-buf/sync_file.c
1285 @@ -211,8 +211,8 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
1286 struct sync_file *b)
1287 {
1288 struct sync_file *sync_file;
1289 - struct dma_fence **fences, **nfences, **a_fences, **b_fences;
1290 - int i, i_a, i_b, num_fences, a_num_fences, b_num_fences;
1291 + struct dma_fence **fences = NULL, **nfences, **a_fences, **b_fences;
1292 + int i = 0, i_a, i_b, num_fences, a_num_fences, b_num_fences;
1293
1294 sync_file = sync_file_alloc();
1295 if (!sync_file)
1296 @@ -236,7 +236,7 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
1297 * If a sync_file can only be created with sync_file_merge
1298 * and sync_file_create, this is a reasonable assumption.
1299 */
1300 - for (i = i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
1301 + for (i_a = i_b = 0; i_a < a_num_fences && i_b < b_num_fences; ) {
1302 struct dma_fence *pt_a = a_fences[i_a];
1303 struct dma_fence *pt_b = b_fences[i_b];
1304
1305 @@ -278,15 +278,16 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
1306 fences = nfences;
1307 }
1308
1309 - if (sync_file_set_fence(sync_file, fences, i) < 0) {
1310 - kfree(fences);
1311 + if (sync_file_set_fence(sync_file, fences, i) < 0)
1312 goto err;
1313 - }
1314
1315 strlcpy(sync_file->user_name, name, sizeof(sync_file->user_name));
1316 return sync_file;
1317
1318 err:
1319 + while (i)
1320 + dma_fence_put(fences[--i]);
1321 + kfree(fences);
1322 fput(sync_file->file);
1323 return NULL;
1324
1325 diff --git a/drivers/firmware/tegra/Makefile b/drivers/firmware/tegra/Makefile
1326 index 49c87e00fafb3..620cf3fdd6074 100644
1327 --- a/drivers/firmware/tegra/Makefile
1328 +++ b/drivers/firmware/tegra/Makefile
1329 @@ -3,6 +3,7 @@ tegra-bpmp-y = bpmp.o
1330 tegra-bpmp-$(CONFIG_ARCH_TEGRA_210_SOC) += bpmp-tegra210.o
1331 tegra-bpmp-$(CONFIG_ARCH_TEGRA_186_SOC) += bpmp-tegra186.o
1332 tegra-bpmp-$(CONFIG_ARCH_TEGRA_194_SOC) += bpmp-tegra186.o
1333 +tegra-bpmp-$(CONFIG_ARCH_TEGRA_234_SOC) += bpmp-tegra186.o
1334 tegra-bpmp-$(CONFIG_DEBUG_FS) += bpmp-debugfs.o
1335 obj-$(CONFIG_TEGRA_BPMP) += tegra-bpmp.o
1336 obj-$(CONFIG_TEGRA_IVC) += ivc.o
1337 diff --git a/drivers/firmware/tegra/bpmp-private.h b/drivers/firmware/tegra/bpmp-private.h
1338 index 54d560c48398e..182bfe3965161 100644
1339 --- a/drivers/firmware/tegra/bpmp-private.h
1340 +++ b/drivers/firmware/tegra/bpmp-private.h
1341 @@ -24,7 +24,8 @@ struct tegra_bpmp_ops {
1342 };
1343
1344 #if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) || \
1345 - IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC)
1346 + IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC) || \
1347 + IS_ENABLED(CONFIG_ARCH_TEGRA_234_SOC)
1348 extern const struct tegra_bpmp_ops tegra186_bpmp_ops;
1349 #endif
1350 #if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC)
1351 diff --git a/drivers/firmware/tegra/bpmp.c b/drivers/firmware/tegra/bpmp.c
1352 index 19c56133234b3..afde06b313877 100644
1353 --- a/drivers/firmware/tegra/bpmp.c
1354 +++ b/drivers/firmware/tegra/bpmp.c
1355 @@ -808,7 +808,8 @@ static const struct dev_pm_ops tegra_bpmp_pm_ops = {
1356 };
1357
1358 #if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) || \
1359 - IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC)
1360 + IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC) || \
1361 + IS_ENABLED(CONFIG_ARCH_TEGRA_234_SOC)
1362 static const struct tegra_bpmp_soc tegra186_soc = {
1363 .channels = {
1364 .cpu_tx = {
1365 diff --git a/drivers/firmware/turris-mox-rwtm.c b/drivers/firmware/turris-mox-rwtm.c
1366 index 9a6cf5af27a3d..0779513ac8d4f 100644
1367 --- a/drivers/firmware/turris-mox-rwtm.c
1368 +++ b/drivers/firmware/turris-mox-rwtm.c
1369 @@ -401,6 +401,7 @@ static int turris_mox_rwtm_remove(struct platform_device *pdev)
1370
1371 static const struct of_device_id turris_mox_rwtm_match[] = {
1372 { .compatible = "cznic,turris-mox-rwtm", },
1373 + { .compatible = "marvell,armada-3700-rwtm-firmware", },
1374 { },
1375 };
1376
1377 diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c
1378 index 4c2971835d330..ec10fda3f24f4 100644
1379 --- a/drivers/md/dm-writecache.c
1380 +++ b/drivers/md/dm-writecache.c
1381 @@ -154,6 +154,7 @@ struct dm_writecache {
1382 bool overwrote_committed:1;
1383 bool memory_vmapped:1;
1384
1385 + bool start_sector_set:1;
1386 bool high_wm_percent_set:1;
1387 bool low_wm_percent_set:1;
1388 bool max_writeback_jobs_set:1;
1389 @@ -162,6 +163,10 @@ struct dm_writecache {
1390 bool writeback_fua_set:1;
1391 bool flush_on_suspend:1;
1392
1393 + unsigned high_wm_percent_value;
1394 + unsigned low_wm_percent_value;
1395 + unsigned autocommit_time_value;
1396 +
1397 unsigned writeback_all;
1398 struct workqueue_struct *writeback_wq;
1399 struct work_struct writeback_work;
1400 @@ -2069,6 +2074,7 @@ static int writecache_ctr(struct dm_target *ti, unsigned argc, char **argv)
1401 if (sscanf(string, "%llu%c", &start_sector, &dummy) != 1)
1402 goto invalid_optional;
1403 wc->start_sector = start_sector;
1404 + wc->start_sector_set = true;
1405 if (wc->start_sector != start_sector ||
1406 wc->start_sector >= wc->memory_map_size >> SECTOR_SHIFT)
1407 goto invalid_optional;
1408 @@ -2078,6 +2084,7 @@ static int writecache_ctr(struct dm_target *ti, unsigned argc, char **argv)
1409 goto invalid_optional;
1410 if (high_wm_percent < 0 || high_wm_percent > 100)
1411 goto invalid_optional;
1412 + wc->high_wm_percent_value = high_wm_percent;
1413 wc->high_wm_percent_set = true;
1414 } else if (!strcasecmp(string, "low_watermark") && opt_params >= 1) {
1415 string = dm_shift_arg(&as), opt_params--;
1416 @@ -2085,6 +2092,7 @@ static int writecache_ctr(struct dm_target *ti, unsigned argc, char **argv)
1417 goto invalid_optional;
1418 if (low_wm_percent < 0 || low_wm_percent > 100)
1419 goto invalid_optional;
1420 + wc->low_wm_percent_value = low_wm_percent;
1421 wc->low_wm_percent_set = true;
1422 } else if (!strcasecmp(string, "writeback_jobs") && opt_params >= 1) {
1423 string = dm_shift_arg(&as), opt_params--;
1424 @@ -2104,6 +2112,7 @@ static int writecache_ctr(struct dm_target *ti, unsigned argc, char **argv)
1425 if (autocommit_msecs > 3600000)
1426 goto invalid_optional;
1427 wc->autocommit_jiffies = msecs_to_jiffies(autocommit_msecs);
1428 + wc->autocommit_time_value = autocommit_msecs;
1429 wc->autocommit_time_set = true;
1430 } else if (!strcasecmp(string, "fua")) {
1431 if (WC_MODE_PMEM(wc)) {
1432 @@ -2305,7 +2314,6 @@ static void writecache_status(struct dm_target *ti, status_type_t type,
1433 struct dm_writecache *wc = ti->private;
1434 unsigned extra_args;
1435 unsigned sz = 0;
1436 - uint64_t x;
1437
1438 switch (type) {
1439 case STATUSTYPE_INFO:
1440 @@ -2317,7 +2325,7 @@ static void writecache_status(struct dm_target *ti, status_type_t type,
1441 DMEMIT("%c %s %s %u ", WC_MODE_PMEM(wc) ? 'p' : 's',
1442 wc->dev->name, wc->ssd_dev->name, wc->block_size);
1443 extra_args = 0;
1444 - if (wc->start_sector)
1445 + if (wc->start_sector_set)
1446 extra_args += 2;
1447 if (wc->high_wm_percent_set)
1448 extra_args += 2;
1449 @@ -2333,26 +2341,18 @@ static void writecache_status(struct dm_target *ti, status_type_t type,
1450 extra_args++;
1451
1452 DMEMIT("%u", extra_args);
1453 - if (wc->start_sector)
1454 + if (wc->start_sector_set)
1455 DMEMIT(" start_sector %llu", (unsigned long long)wc->start_sector);
1456 - if (wc->high_wm_percent_set) {
1457 - x = (uint64_t)wc->freelist_high_watermark * 100;
1458 - x += wc->n_blocks / 2;
1459 - do_div(x, (size_t)wc->n_blocks);
1460 - DMEMIT(" high_watermark %u", 100 - (unsigned)x);
1461 - }
1462 - if (wc->low_wm_percent_set) {
1463 - x = (uint64_t)wc->freelist_low_watermark * 100;
1464 - x += wc->n_blocks / 2;
1465 - do_div(x, (size_t)wc->n_blocks);
1466 - DMEMIT(" low_watermark %u", 100 - (unsigned)x);
1467 - }
1468 + if (wc->high_wm_percent_set)
1469 + DMEMIT(" high_watermark %u", wc->high_wm_percent_value);
1470 + if (wc->low_wm_percent_set)
1471 + DMEMIT(" low_watermark %u", wc->low_wm_percent_value);
1472 if (wc->max_writeback_jobs_set)
1473 DMEMIT(" writeback_jobs %u", wc->max_writeback_jobs);
1474 if (wc->autocommit_blocks_set)
1475 DMEMIT(" autocommit_blocks %u", wc->autocommit_blocks);
1476 if (wc->autocommit_time_set)
1477 - DMEMIT(" autocommit_time %u", jiffies_to_msecs(wc->autocommit_jiffies));
1478 + DMEMIT(" autocommit_time %u", wc->autocommit_time_value);
1479 if (wc->writeback_fua_set)
1480 DMEMIT(" %sfua", wc->writeback_fua ? "" : "no");
1481 break;
1482 diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
1483 index 446eb06e50b49..8aa8825557a81 100644
1484 --- a/drivers/net/dsa/mv88e6xxx/chip.c
1485 +++ b/drivers/net/dsa/mv88e6xxx/chip.c
1486 @@ -3715,6 +3715,7 @@ static const struct mv88e6xxx_ops mv88e6250_ops = {
1487 .port_set_rgmii_delay = mv88e6352_port_set_rgmii_delay,
1488 .port_set_speed = mv88e6250_port_set_speed,
1489 .port_tag_remap = mv88e6095_port_tag_remap,
1490 + .port_set_policy = mv88e6352_port_set_policy,
1491 .port_set_frame_mode = mv88e6351_port_set_frame_mode,
1492 .port_set_egress_floods = mv88e6352_port_set_egress_floods,
1493 .port_set_ether_type = mv88e6351_port_set_ether_type,
1494 @@ -3916,6 +3917,7 @@ static const struct mv88e6xxx_ops mv88e6341_ops = {
1495 .mgmt_rsvd2cpu = mv88e6390_g1_mgmt_rsvd2cpu,
1496 .pot_clear = mv88e6xxx_g2_pot_clear,
1497 .reset = mv88e6352_g1_reset,
1498 + .rmu_disable = mv88e6390_g1_rmu_disable,
1499 .vtu_getnext = mv88e6352_g1_vtu_getnext,
1500 .vtu_loadpurge = mv88e6352_g1_vtu_loadpurge,
1501 .serdes_power = mv88e6390_serdes_power,
1502 @@ -3982,6 +3984,7 @@ static const struct mv88e6xxx_ops mv88e6351_ops = {
1503 .port_set_rgmii_delay = mv88e6352_port_set_rgmii_delay,
1504 .port_set_speed = mv88e6185_port_set_speed,
1505 .port_tag_remap = mv88e6095_port_tag_remap,
1506 + .port_set_policy = mv88e6352_port_set_policy,
1507 .port_set_frame_mode = mv88e6351_port_set_frame_mode,
1508 .port_set_egress_floods = mv88e6352_port_set_egress_floods,
1509 .port_set_ether_type = mv88e6351_port_set_ether_type,
1510 @@ -4004,6 +4007,7 @@ static const struct mv88e6xxx_ops mv88e6351_ops = {
1511 .mgmt_rsvd2cpu = mv88e6352_g2_mgmt_rsvd2cpu,
1512 .pot_clear = mv88e6xxx_g2_pot_clear,
1513 .reset = mv88e6352_g1_reset,
1514 + .rmu_disable = mv88e6390_g1_rmu_disable,
1515 .vtu_getnext = mv88e6352_g1_vtu_getnext,
1516 .vtu_loadpurge = mv88e6352_g1_vtu_loadpurge,
1517 .avb_ops = &mv88e6352_avb_ops,
1518 diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
1519 index 21669a42718c8..7bd6d2bf84408 100644
1520 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
1521 +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
1522 @@ -2783,15 +2783,21 @@ static void bcmgenet_set_hw_addr(struct bcmgenet_priv *priv,
1523 /* Returns a reusable dma control register value */
1524 static u32 bcmgenet_dma_disable(struct bcmgenet_priv *priv)
1525 {
1526 + unsigned int i;
1527 u32 reg;
1528 u32 dma_ctrl;
1529
1530 /* disable DMA */
1531 dma_ctrl = 1 << (DESC_INDEX + DMA_RING_BUF_EN_SHIFT) | DMA_EN;
1532 + for (i = 0; i < priv->hw_params->tx_queues; i++)
1533 + dma_ctrl |= (1 << (i + DMA_RING_BUF_EN_SHIFT));
1534 reg = bcmgenet_tdma_readl(priv, DMA_CTRL);
1535 reg &= ~dma_ctrl;
1536 bcmgenet_tdma_writel(priv, reg, DMA_CTRL);
1537
1538 + dma_ctrl = 1 << (DESC_INDEX + DMA_RING_BUF_EN_SHIFT) | DMA_EN;
1539 + for (i = 0; i < priv->hw_params->rx_queues; i++)
1540 + dma_ctrl |= (1 << (i + DMA_RING_BUF_EN_SHIFT));
1541 reg = bcmgenet_rdma_readl(priv, DMA_CTRL);
1542 reg &= ~dma_ctrl;
1543 bcmgenet_rdma_writel(priv, reg, DMA_CTRL);
1544 diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxart_ether.c
1545 index caf7051302725..13714827f4525 100644
1546 --- a/drivers/net/ethernet/moxa/moxart_ether.c
1547 +++ b/drivers/net/ethernet/moxa/moxart_ether.c
1548 @@ -545,10 +545,8 @@ static int moxart_mac_probe(struct platform_device *pdev)
1549 SET_NETDEV_DEV(ndev, &pdev->dev);
1550
1551 ret = register_netdev(ndev);
1552 - if (ret) {
1553 - free_netdev(ndev);
1554 + if (ret)
1555 goto init_fail;
1556 - }
1557
1558 netdev_dbg(ndev, "%s: IRQ=%d address=%pM\n",
1559 __func__, ndev->irq, ndev->dev_addr);
1560 diff --git a/drivers/net/ethernet/qualcomm/emac/emac.c b/drivers/net/ethernet/qualcomm/emac/emac.c
1561 index 3eee8df359a12..5c199d2516d47 100644
1562 --- a/drivers/net/ethernet/qualcomm/emac/emac.c
1563 +++ b/drivers/net/ethernet/qualcomm/emac/emac.c
1564 @@ -745,12 +745,13 @@ static int emac_remove(struct platform_device *pdev)
1565
1566 put_device(&adpt->phydev->mdio.dev);
1567 mdiobus_unregister(adpt->mii_bus);
1568 - free_netdev(netdev);
1569
1570 if (adpt->phy.digital)
1571 iounmap(adpt->phy.digital);
1572 iounmap(adpt->phy.base);
1573
1574 + free_netdev(netdev);
1575 +
1576 return 0;
1577 }
1578
1579 diff --git a/drivers/net/ethernet/ti/tlan.c b/drivers/net/ethernet/ti/tlan.c
1580 index a3691bc94b101..a5c7d75497ee6 100644
1581 --- a/drivers/net/ethernet/ti/tlan.c
1582 +++ b/drivers/net/ethernet/ti/tlan.c
1583 @@ -314,9 +314,8 @@ static void tlan_remove_one(struct pci_dev *pdev)
1584 pci_release_regions(pdev);
1585 #endif
1586
1587 - free_netdev(dev);
1588 -
1589 cancel_work_sync(&priv->tlan_tqueue);
1590 + free_netdev(dev);
1591 }
1592
1593 static void tlan_start(struct net_device *dev)
1594 diff --git a/drivers/net/fddi/defza.c b/drivers/net/fddi/defza.c
1595 index 060712c666bf4..83e4c5192f35f 100644
1596 --- a/drivers/net/fddi/defza.c
1597 +++ b/drivers/net/fddi/defza.c
1598 @@ -1504,9 +1504,8 @@ err_out_resource:
1599 release_mem_region(start, len);
1600
1601 err_out_kfree:
1602 - free_netdev(dev);
1603 -
1604 pr_err("%s: initialization failure, aborting!\n", fp->name);
1605 + free_netdev(dev);
1606 return ret;
1607 }
1608
1609 diff --git a/drivers/reset/reset-ti-syscon.c b/drivers/reset/reset-ti-syscon.c
1610 index a2635c21db7f8..ecb8873e3a19b 100644
1611 --- a/drivers/reset/reset-ti-syscon.c
1612 +++ b/drivers/reset/reset-ti-syscon.c
1613 @@ -58,8 +58,8 @@ struct ti_syscon_reset_data {
1614 unsigned int nr_controls;
1615 };
1616
1617 -#define to_ti_syscon_reset_data(rcdev) \
1618 - container_of(rcdev, struct ti_syscon_reset_data, rcdev)
1619 +#define to_ti_syscon_reset_data(_rcdev) \
1620 + container_of(_rcdev, struct ti_syscon_reset_data, rcdev)
1621
1622 /**
1623 * ti_syscon_reset_assert() - assert device reset
1624 diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c
1625 index d5a0e27dd0a08..9e27f5a011975 100644
1626 --- a/drivers/rtc/rtc-max77686.c
1627 +++ b/drivers/rtc/rtc-max77686.c
1628 @@ -707,8 +707,8 @@ static int max77686_init_rtc_regmap(struct max77686_rtc_info *info)
1629
1630 add_rtc_irq:
1631 ret = regmap_add_irq_chip(info->rtc_regmap, info->rtc_irq,
1632 - IRQF_TRIGGER_FALLING | IRQF_ONESHOT |
1633 - IRQF_SHARED, 0, info->drv_data->rtc_irq_chip,
1634 + IRQF_ONESHOT | IRQF_SHARED,
1635 + 0, info->drv_data->rtc_irq_chip,
1636 &info->rtc_irq_data);
1637 if (ret < 0) {
1638 dev_err(info->dev, "Failed to add RTC irq chip: %d\n", ret);
1639 diff --git a/drivers/rtc/rtc-mxc_v2.c b/drivers/rtc/rtc-mxc_v2.c
1640 index 91534560fe2a2..d349cef09cb7c 100644
1641 --- a/drivers/rtc/rtc-mxc_v2.c
1642 +++ b/drivers/rtc/rtc-mxc_v2.c
1643 @@ -373,6 +373,7 @@ static const struct of_device_id mxc_ids[] = {
1644 { .compatible = "fsl,imx53-rtc", },
1645 {}
1646 };
1647 +MODULE_DEVICE_TABLE(of, mxc_ids);
1648
1649 static struct platform_driver mxc_rtc_driver = {
1650 .driver = {
1651 diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c
1652 index 4190a025381a5..27d85ed82977c 100644
1653 --- a/drivers/scsi/aic7xxx/aic7xxx_core.c
1654 +++ b/drivers/scsi/aic7xxx/aic7xxx_core.c
1655 @@ -493,7 +493,7 @@ ahc_inq(struct ahc_softc *ahc, u_int port)
1656 return ((ahc_inb(ahc, port))
1657 | (ahc_inb(ahc, port+1) << 8)
1658 | (ahc_inb(ahc, port+2) << 16)
1659 - | (ahc_inb(ahc, port+3) << 24)
1660 + | (((uint64_t)ahc_inb(ahc, port+3)) << 24)
1661 | (((uint64_t)ahc_inb(ahc, port+4)) << 32)
1662 | (((uint64_t)ahc_inb(ahc, port+5)) << 40)
1663 | (((uint64_t)ahc_inb(ahc, port+6)) << 48)
1664 diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c
1665 index f5781e31f57c6..b68dfeb952ee8 100644
1666 --- a/drivers/scsi/aic94xx/aic94xx_init.c
1667 +++ b/drivers/scsi/aic94xx/aic94xx_init.c
1668 @@ -52,6 +52,7 @@ static struct scsi_host_template aic94xx_sht = {
1669 .max_sectors = SCSI_DEFAULT_MAX_SECTORS,
1670 .eh_device_reset_handler = sas_eh_device_reset_handler,
1671 .eh_target_reset_handler = sas_eh_target_reset_handler,
1672 + .slave_alloc = sas_slave_alloc,
1673 .target_destroy = sas_target_destroy,
1674 .ioctl = sas_ioctl,
1675 .track_queue_depth = 1,
1676 diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1677 index 9f6534bd354bc..1443c803d8f75 100644
1678 --- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1679 +++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
1680 @@ -1768,6 +1768,7 @@ static struct scsi_host_template sht_v1_hw = {
1681 .max_sectors = SCSI_DEFAULT_MAX_SECTORS,
1682 .eh_device_reset_handler = sas_eh_device_reset_handler,
1683 .eh_target_reset_handler = sas_eh_target_reset_handler,
1684 + .slave_alloc = sas_slave_alloc,
1685 .target_destroy = sas_target_destroy,
1686 .ioctl = sas_ioctl,
1687 .shost_attrs = host_attrs_v1_hw,
1688 diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
1689 index 8e96a257e4393..11c75881bd892 100644
1690 --- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
1691 +++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
1692 @@ -3542,6 +3542,7 @@ static struct scsi_host_template sht_v2_hw = {
1693 .max_sectors = SCSI_DEFAULT_MAX_SECTORS,
1694 .eh_device_reset_handler = sas_eh_device_reset_handler,
1695 .eh_target_reset_handler = sas_eh_target_reset_handler,
1696 + .slave_alloc = sas_slave_alloc,
1697 .target_destroy = sas_target_destroy,
1698 .ioctl = sas_ioctl,
1699 .shost_attrs = host_attrs_v2_hw,
1700 diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
1701 index 916447f3c6073..13f314fa757e8 100644
1702 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
1703 +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
1704 @@ -3064,6 +3064,7 @@ static struct scsi_host_template sht_v3_hw = {
1705 .max_sectors = SCSI_DEFAULT_MAX_SECTORS,
1706 .eh_device_reset_handler = sas_eh_device_reset_handler,
1707 .eh_target_reset_handler = sas_eh_target_reset_handler,
1708 + .slave_alloc = sas_slave_alloc,
1709 .target_destroy = sas_target_destroy,
1710 .ioctl = sas_ioctl,
1711 .shost_attrs = host_attrs_v3_hw,
1712 diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c
1713 index 1727d0c71b123..c33bcf85fb211 100644
1714 --- a/drivers/scsi/isci/init.c
1715 +++ b/drivers/scsi/isci/init.c
1716 @@ -166,6 +166,7 @@ static struct scsi_host_template isci_sht = {
1717 .eh_abort_handler = sas_eh_abort_handler,
1718 .eh_device_reset_handler = sas_eh_device_reset_handler,
1719 .eh_target_reset_handler = sas_eh_target_reset_handler,
1720 + .slave_alloc = sas_slave_alloc,
1721 .target_destroy = sas_target_destroy,
1722 .ioctl = sas_ioctl,
1723 .shost_attrs = isci_host_attrs,
1724 diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
1725 index 64500417c22ea..326bd609a3d13 100644
1726 --- a/drivers/scsi/libfc/fc_rport.c
1727 +++ b/drivers/scsi/libfc/fc_rport.c
1728 @@ -1160,6 +1160,7 @@ static void fc_rport_prli_resp(struct fc_seq *sp, struct fc_frame *fp,
1729 resp_code = (pp->spp.spp_flags & FC_SPP_RESP_MASK);
1730 FC_RPORT_DBG(rdata, "PRLI spp_flags = 0x%x spp_type 0x%x\n",
1731 pp->spp.spp_flags, pp->spp.spp_type);
1732 +
1733 rdata->spp_type = pp->spp.spp_type;
1734 if (resp_code != FC_SPP_RESP_ACK) {
1735 if (resp_code == FC_SPP_RESP_CONF)
1736 @@ -1182,11 +1183,13 @@ static void fc_rport_prli_resp(struct fc_seq *sp, struct fc_frame *fp,
1737 /*
1738 * Call prli provider if we should act as a target
1739 */
1740 - prov = fc_passive_prov[rdata->spp_type];
1741 - if (prov) {
1742 - memset(&temp_spp, 0, sizeof(temp_spp));
1743 - prov->prli(rdata, pp->prli.prli_spp_len,
1744 - &pp->spp, &temp_spp);
1745 + if (rdata->spp_type < FC_FC4_PROV_SIZE) {
1746 + prov = fc_passive_prov[rdata->spp_type];
1747 + if (prov) {
1748 + memset(&temp_spp, 0, sizeof(temp_spp));
1749 + prov->prli(rdata, pp->prli.prli_spp_len,
1750 + &pp->spp, &temp_spp);
1751 + }
1752 }
1753 /*
1754 * Check if the image pair could be established
1755 diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c
1756 index bec83eb8ab874..081f3145fe145 100644
1757 --- a/drivers/scsi/libsas/sas_scsi_host.c
1758 +++ b/drivers/scsi/libsas/sas_scsi_host.c
1759 @@ -911,6 +911,14 @@ void sas_task_abort(struct sas_task *task)
1760 blk_abort_request(sc->request);
1761 }
1762
1763 +int sas_slave_alloc(struct scsi_device *sdev)
1764 +{
1765 + if (dev_is_sata(sdev_to_domain_dev(sdev)) && sdev->lun)
1766 + return -ENXIO;
1767 +
1768 + return 0;
1769 +}
1770 +
1771 void sas_target_destroy(struct scsi_target *starget)
1772 {
1773 struct domain_device *found_dev = starget->hostdata;
1774 @@ -957,5 +965,6 @@ EXPORT_SYMBOL_GPL(sas_task_abort);
1775 EXPORT_SYMBOL_GPL(sas_phy_reset);
1776 EXPORT_SYMBOL_GPL(sas_eh_device_reset_handler);
1777 EXPORT_SYMBOL_GPL(sas_eh_target_reset_handler);
1778 +EXPORT_SYMBOL_GPL(sas_slave_alloc);
1779 EXPORT_SYMBOL_GPL(sas_target_destroy);
1780 EXPORT_SYMBOL_GPL(sas_ioctl);
1781 diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
1782 index da719b0694dcc..52405ce58ade8 100644
1783 --- a/drivers/scsi/mvsas/mv_init.c
1784 +++ b/drivers/scsi/mvsas/mv_init.c
1785 @@ -45,6 +45,7 @@ static struct scsi_host_template mvs_sht = {
1786 .max_sectors = SCSI_DEFAULT_MAX_SECTORS,
1787 .eh_device_reset_handler = sas_eh_device_reset_handler,
1788 .eh_target_reset_handler = sas_eh_target_reset_handler,
1789 + .slave_alloc = sas_slave_alloc,
1790 .target_destroy = sas_target_destroy,
1791 .ioctl = sas_ioctl,
1792 .shost_attrs = mvst_host_attrs,
1793 diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
1794 index 8882ba33ca87c..1f41537d52a58 100644
1795 --- a/drivers/scsi/pm8001/pm8001_init.c
1796 +++ b/drivers/scsi/pm8001/pm8001_init.c
1797 @@ -86,6 +86,7 @@ static struct scsi_host_template pm8001_sht = {
1798 .max_sectors = SCSI_DEFAULT_MAX_SECTORS,
1799 .eh_device_reset_handler = sas_eh_device_reset_handler,
1800 .eh_target_reset_handler = sas_eh_target_reset_handler,
1801 + .slave_alloc = sas_slave_alloc,
1802 .target_destroy = sas_target_destroy,
1803 .ioctl = sas_ioctl,
1804 .shost_attrs = pm8001_host_attrs,
1805 diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c
1806 index e749a2dcaad7e..4e8a284e606c0 100644
1807 --- a/drivers/scsi/qedf/qedf_io.c
1808 +++ b/drivers/scsi/qedf/qedf_io.c
1809 @@ -1504,9 +1504,19 @@ void qedf_process_error_detect(struct qedf_ctx *qedf, struct fcoe_cqe *cqe,
1810 {
1811 int rval;
1812
1813 + if (io_req == NULL) {
1814 + QEDF_INFO(NULL, QEDF_LOG_IO, "io_req is NULL.\n");
1815 + return;
1816 + }
1817 +
1818 + if (io_req->fcport == NULL) {
1819 + QEDF_INFO(NULL, QEDF_LOG_IO, "fcport is NULL.\n");
1820 + return;
1821 + }
1822 +
1823 if (!cqe) {
1824 QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO,
1825 - "cqe is NULL for io_req %p\n", io_req);
1826 + "cqe is NULL for io_req %p\n", io_req);
1827 return;
1828 }
1829
1830 @@ -1522,6 +1532,16 @@ void qedf_process_error_detect(struct qedf_ctx *qedf, struct fcoe_cqe *cqe,
1831 le32_to_cpu(cqe->cqe_info.err_info.rx_buf_off),
1832 le32_to_cpu(cqe->cqe_info.err_info.rx_id));
1833
1834 + /* When flush is active, let the cmds be flushed out from the cleanup context */
1835 + if (test_bit(QEDF_RPORT_IN_TARGET_RESET, &io_req->fcport->flags) ||
1836 + (test_bit(QEDF_RPORT_IN_LUN_RESET, &io_req->fcport->flags) &&
1837 + io_req->sc_cmd->device->lun == (u64)io_req->fcport->lun_reset_lun)) {
1838 + QEDF_ERR(&qedf->dbg_ctx,
1839 + "Dropping EQE for xid=0x%x as fcport is flushing",
1840 + io_req->xid);
1841 + return;
1842 + }
1843 +
1844 if (qedf->stop_io_on_error) {
1845 qedf_stop_all_io(qedf);
1846 return;
1847 diff --git a/drivers/soc/tegra/fuse/fuse-tegra30.c b/drivers/soc/tegra/fuse/fuse-tegra30.c
1848 index 9c3ef0a02fd4e..15060c847eccf 100644
1849 --- a/drivers/soc/tegra/fuse/fuse-tegra30.c
1850 +++ b/drivers/soc/tegra/fuse/fuse-tegra30.c
1851 @@ -36,7 +36,8 @@
1852 defined(CONFIG_ARCH_TEGRA_132_SOC) || \
1853 defined(CONFIG_ARCH_TEGRA_210_SOC) || \
1854 defined(CONFIG_ARCH_TEGRA_186_SOC) || \
1855 - defined(CONFIG_ARCH_TEGRA_194_SOC)
1856 + defined(CONFIG_ARCH_TEGRA_194_SOC) || \
1857 + defined(CONFIG_ARCH_TEGRA_234_SOC)
1858 static u32 tegra30_fuse_read_early(struct tegra_fuse *fuse, unsigned int offset)
1859 {
1860 if (WARN_ON(!fuse->base))
1861 diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
1862 index c28271817e43f..f526ce31f5a2f 100644
1863 --- a/drivers/thermal/thermal_core.c
1864 +++ b/drivers/thermal/thermal_core.c
1865 @@ -1368,7 +1368,7 @@ free_tz:
1866 EXPORT_SYMBOL_GPL(thermal_zone_device_register);
1867
1868 /**
1869 - * thermal_device_unregister - removes the registered thermal zone device
1870 + * thermal_zone_device_unregister - removes the registered thermal zone device
1871 * @tz: the thermal zone device to remove
1872 */
1873 void thermal_zone_device_unregister(struct thermal_zone_device *tz)
1874 diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c
1875 index f32f00c495713..c3bf54cc530f9 100644
1876 --- a/drivers/usb/cdns3/gadget.c
1877 +++ b/drivers/usb/cdns3/gadget.c
1878 @@ -1531,7 +1531,7 @@ void cdns3_configure_dmult(struct cdns3_device *priv_dev,
1879 else
1880 mask = BIT(priv_ep->num);
1881
1882 - if (priv_ep->type != USB_ENDPOINT_XFER_ISOC) {
1883 + if (priv_ep->type != USB_ENDPOINT_XFER_ISOC && !priv_ep->dir) {
1884 cdns3_set_register_bit(&regs->tdl_from_trb, mask);
1885 cdns3_set_register_bit(&regs->tdl_beh, mask);
1886 cdns3_set_register_bit(&regs->tdl_beh2, mask);
1887 @@ -1569,15 +1569,13 @@ void cdns3_ep_config(struct cdns3_endpoint *priv_ep)
1888 case USB_ENDPOINT_XFER_INT:
1889 ep_cfg = EP_CFG_EPTYPE(USB_ENDPOINT_XFER_INT);
1890
1891 - if ((priv_dev->dev_ver == DEV_VER_V2 && !priv_ep->dir) ||
1892 - priv_dev->dev_ver > DEV_VER_V2)
1893 + if (priv_dev->dev_ver >= DEV_VER_V2 && !priv_ep->dir)
1894 ep_cfg |= EP_CFG_TDL_CHK;
1895 break;
1896 case USB_ENDPOINT_XFER_BULK:
1897 ep_cfg = EP_CFG_EPTYPE(USB_ENDPOINT_XFER_BULK);
1898
1899 - if ((priv_dev->dev_ver == DEV_VER_V2 && !priv_ep->dir) ||
1900 - priv_dev->dev_ver > DEV_VER_V2)
1901 + if (priv_dev->dev_ver >= DEV_VER_V2 && !priv_ep->dir)
1902 ep_cfg |= EP_CFG_TDL_CHK;
1903 break;
1904 default:
1905 diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c
1906 index cc3ada12848d9..42125601ebb10 100644
1907 --- a/fs/cifs/cifs_dfs_ref.c
1908 +++ b/fs/cifs/cifs_dfs_ref.c
1909 @@ -151,6 +151,9 @@ char *cifs_compose_mount_options(const char *sb_mountdata,
1910 return ERR_PTR(-EINVAL);
1911
1912 if (ref) {
1913 + if (WARN_ON_ONCE(!ref->node_name || ref->path_consumed < 0))
1914 + return ERR_PTR(-EINVAL);
1915 +
1916 if (strlen(fullpath) - ref->path_consumed) {
1917 prepath = fullpath + ref->path_consumed;
1918 /* skip initial delimiter */
1919 diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
1920 index 029e693e201cf..3a5360e045cfd 100644
1921 --- a/fs/f2fs/sysfs.c
1922 +++ b/fs/f2fs/sysfs.c
1923 @@ -499,7 +499,9 @@ F2FS_FEATURE_RO_ATTR(lost_found, FEAT_LOST_FOUND);
1924 F2FS_FEATURE_RO_ATTR(verity, FEAT_VERITY);
1925 #endif
1926 F2FS_FEATURE_RO_ATTR(sb_checksum, FEAT_SB_CHECKSUM);
1927 +#ifdef CONFIG_UNICODE
1928 F2FS_FEATURE_RO_ATTR(casefold, FEAT_CASEFOLD);
1929 +#endif
1930
1931 #define ATTR_LIST(name) (&f2fs_attr_##name.attr)
1932 static struct attribute *f2fs_attrs[] = {
1933 @@ -568,7 +570,9 @@ static struct attribute *f2fs_feat_attrs[] = {
1934 ATTR_LIST(verity),
1935 #endif
1936 ATTR_LIST(sb_checksum),
1937 +#ifdef CONFIG_UNICODE
1938 ATTR_LIST(casefold),
1939 +#endif
1940 NULL,
1941 };
1942 ATTRIBUTE_GROUPS(f2fs_feat);
1943 diff --git a/include/net/dst_metadata.h b/include/net/dst_metadata.h
1944 index 56cb3c38569a7..14efa0ded75dd 100644
1945 --- a/include/net/dst_metadata.h
1946 +++ b/include/net/dst_metadata.h
1947 @@ -45,7 +45,9 @@ skb_tunnel_info(const struct sk_buff *skb)
1948 return &md_dst->u.tun_info;
1949
1950 dst = skb_dst(skb);
1951 - if (dst && dst->lwtstate)
1952 + if (dst && dst->lwtstate &&
1953 + (dst->lwtstate->type == LWTUNNEL_ENCAP_IP ||
1954 + dst->lwtstate->type == LWTUNNEL_ENCAP_IP6))
1955 return lwt_tun_info(dst->lwtstate);
1956
1957 return NULL;
1958 diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
1959 index 40602def3fe76..feeecbc80e727 100644
1960 --- a/include/net/ip6_route.h
1961 +++ b/include/net/ip6_route.h
1962 @@ -261,7 +261,7 @@ static inline bool ipv6_anycast_destination(const struct dst_entry *dst,
1963 int ip6_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,
1964 int (*output)(struct net *, struct sock *, struct sk_buff *));
1965
1966 -static inline int ip6_skb_dst_mtu(struct sk_buff *skb)
1967 +static inline unsigned int ip6_skb_dst_mtu(struct sk_buff *skb)
1968 {
1969 int mtu;
1970
1971 diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
1972 index d2ba080ea7425..74cb20f32f72f 100644
1973 --- a/kernel/sched/fair.c
1974 +++ b/kernel/sched/fair.c
1975 @@ -4786,7 +4786,7 @@ static const u64 cfs_bandwidth_slack_period = 5 * NSEC_PER_MSEC;
1976 static int runtime_refresh_within(struct cfs_bandwidth *cfs_b, u64 min_expire)
1977 {
1978 struct hrtimer *refresh_timer = &cfs_b->period_timer;
1979 - u64 remaining;
1980 + s64 remaining;
1981
1982 /* if the call-back is running a quota refresh is already occurring */
1983 if (hrtimer_callback_running(refresh_timer))
1984 @@ -4794,7 +4794,7 @@ static int runtime_refresh_within(struct cfs_bandwidth *cfs_b, u64 min_expire)
1985
1986 /* is a quota refresh about to occur? */
1987 remaining = ktime_to_ns(hrtimer_expires_remaining(refresh_timer));
1988 - if (remaining < min_expire)
1989 + if (remaining < (s64)min_expire)
1990 return 1;
1991
1992 return 0;
1993 diff --git a/mm/slab_common.c b/mm/slab_common.c
1994 index 636cd496417cf..8f128245b3007 100644
1995 --- a/mm/slab_common.c
1996 +++ b/mm/slab_common.c
1997 @@ -325,14 +325,6 @@ int slab_unmergeable(struct kmem_cache *s)
1998 if (s->refcount < 0)
1999 return 1;
2000
2001 -#ifdef CONFIG_MEMCG_KMEM
2002 - /*
2003 - * Skip the dying kmem_cache.
2004 - */
2005 - if (s->memcg_params.dying)
2006 - return 1;
2007 -#endif
2008 -
2009 return 0;
2010 }
2011
2012 @@ -973,6 +965,16 @@ void kmem_cache_destroy(struct kmem_cache *s)
2013 get_online_mems();
2014
2015 mutex_lock(&slab_mutex);
2016 +
2017 + /*
2018 + * Another thread referenced it again
2019 + */
2020 + if (READ_ONCE(s->refcount)) {
2021 + spin_lock_irq(&memcg_kmem_wq_lock);
2022 + s->memcg_params.dying = false;
2023 + spin_unlock_irq(&memcg_kmem_wq_lock);
2024 + goto out_unlock;
2025 + }
2026 #endif
2027
2028 err = shutdown_memcg_caches(s);
2029 diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
2030 index 4fe30b182ee7e..bec20dbf6f603 100644
2031 --- a/net/bridge/br_if.c
2032 +++ b/net/bridge/br_if.c
2033 @@ -559,7 +559,7 @@ int br_add_if(struct net_bridge *br, struct net_device *dev,
2034 struct net_bridge_port *p;
2035 int err = 0;
2036 unsigned br_hr, dev_hr;
2037 - bool changed_addr;
2038 + bool changed_addr, fdb_synced = false;
2039
2040 /* Don't allow bridging non-ethernet like devices, or DSA-enabled
2041 * master network devices since the bridge layer rx_handler prevents
2042 @@ -635,6 +635,19 @@ int br_add_if(struct net_bridge *br, struct net_device *dev,
2043 list_add_rcu(&p->list, &br->port_list);
2044
2045 nbp_update_port_count(br);
2046 + if (!br_promisc_port(p) && (p->dev->priv_flags & IFF_UNICAST_FLT)) {
2047 + /* When updating the port count we also update all ports'
2048 + * promiscuous mode.
2049 + * A port leaving promiscuous mode normally gets the bridge's
2050 + * fdb synced to the unicast filter (if supported), however,
2051 + * `br_port_clear_promisc` does not distinguish between
2052 + * non-promiscuous ports and *new* ports, so we need to
2053 + * sync explicitly here.
2054 + */
2055 + fdb_synced = br_fdb_sync_static(br, p) == 0;
2056 + if (!fdb_synced)
2057 + netdev_err(dev, "failed to sync bridge static fdb addresses to this port\n");
2058 + }
2059
2060 netdev_update_features(br->dev);
2061
2062 @@ -684,6 +697,8 @@ int br_add_if(struct net_bridge *br, struct net_device *dev,
2063 return 0;
2064
2065 err7:
2066 + if (fdb_synced)
2067 + br_fdb_unsync_static(br, p);
2068 list_del_rcu(&p->list);
2069 br_fdb_delete_by_port(br, p, 0, 1);
2070 nbp_update_port_count(br);
2071 diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
2072 index f64d1743b86d6..eb381a24a8f8d 100644
2073 --- a/net/ipv4/ip_tunnel.c
2074 +++ b/net/ipv4/ip_tunnel.c
2075 @@ -317,7 +317,7 @@ static int ip_tunnel_bind_dev(struct net_device *dev)
2076 }
2077
2078 dev->needed_headroom = t_hlen + hlen;
2079 - mtu -= t_hlen;
2080 + mtu -= t_hlen + (dev->type == ARPHRD_ETHER ? dev->hard_header_len : 0);
2081
2082 if (mtu < IPV4_MIN_MTU)
2083 mtu = IPV4_MIN_MTU;
2084 @@ -348,6 +348,9 @@ static struct ip_tunnel *ip_tunnel_create(struct net *net,
2085 t_hlen = nt->hlen + sizeof(struct iphdr);
2086 dev->min_mtu = ETH_MIN_MTU;
2087 dev->max_mtu = IP_MAX_MTU - t_hlen;
2088 + if (dev->type == ARPHRD_ETHER)
2089 + dev->max_mtu -= dev->hard_header_len;
2090 +
2091 ip_tunnel_add(itn, nt);
2092 return nt;
2093
2094 @@ -495,11 +498,14 @@ static int tnl_update_pmtu(struct net_device *dev, struct sk_buff *skb,
2095
2096 tunnel_hlen = md ? tunnel_hlen : tunnel->hlen;
2097 pkt_size = skb->len - tunnel_hlen;
2098 + pkt_size -= dev->type == ARPHRD_ETHER ? dev->hard_header_len : 0;
2099
2100 - if (df)
2101 + if (df) {
2102 mtu = dst_mtu(&rt->dst) - (sizeof(struct iphdr) + tunnel_hlen);
2103 - else
2104 + mtu -= dev->type == ARPHRD_ETHER ? dev->hard_header_len : 0;
2105 + } else {
2106 mtu = skb_valid_dst(skb) ? dst_mtu(skb_dst(skb)) : dev->mtu;
2107 + }
2108
2109 if (skb_valid_dst(skb))
2110 skb_dst_update_pmtu_no_confirm(skb, mtu);
2111 @@ -965,6 +971,9 @@ int __ip_tunnel_change_mtu(struct net_device *dev, int new_mtu, bool strict)
2112 int t_hlen = tunnel->hlen + sizeof(struct iphdr);
2113 int max_mtu = IP_MAX_MTU - t_hlen;
2114
2115 + if (dev->type == ARPHRD_ETHER)
2116 + max_mtu -= dev->hard_header_len;
2117 +
2118 if (new_mtu < ETH_MIN_MTU)
2119 return -EINVAL;
2120
2121 @@ -1142,6 +1151,9 @@ int ip_tunnel_newlink(struct net_device *dev, struct nlattr *tb[],
2122 if (tb[IFLA_MTU]) {
2123 unsigned int max = IP_MAX_MTU - (nt->hlen + sizeof(struct iphdr));
2124
2125 + if (dev->type == ARPHRD_ETHER)
2126 + max -= dev->hard_header_len;
2127 +
2128 mtu = clamp(dev->mtu, (unsigned int)ETH_MIN_MTU, max);
2129 }
2130
2131 diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
2132 index 04acdca4bb0d5..91788ff19a5d4 100644
2133 --- a/net/ipv4/tcp_ipv4.c
2134 +++ b/net/ipv4/tcp_ipv4.c
2135 @@ -343,7 +343,7 @@ void tcp_v4_mtu_reduced(struct sock *sk)
2136
2137 if ((1 << sk->sk_state) & (TCPF_LISTEN | TCPF_CLOSE))
2138 return;
2139 - mtu = tcp_sk(sk)->mtu_info;
2140 + mtu = READ_ONCE(tcp_sk(sk)->mtu_info);
2141 dst = inet_csk_update_pmtu(sk, mtu);
2142 if (!dst)
2143 return;
2144 @@ -512,7 +512,7 @@ int tcp_v4_err(struct sk_buff *icmp_skb, u32 info)
2145 if (sk->sk_state == TCP_LISTEN)
2146 goto out;
2147
2148 - tp->mtu_info = info;
2149 + WRITE_ONCE(tp->mtu_info, info);
2150 if (!sock_owned_by_user(sk)) {
2151 tcp_v4_mtu_reduced(sk);
2152 } else {
2153 diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
2154 index d0774b4e934d6..638d7b49ad716 100644
2155 --- a/net/ipv4/tcp_output.c
2156 +++ b/net/ipv4/tcp_output.c
2157 @@ -1504,6 +1504,7 @@ int tcp_mtu_to_mss(struct sock *sk, int pmtu)
2158 return __tcp_mtu_to_mss(sk, pmtu) -
2159 (tcp_sk(sk)->tcp_header_len - sizeof(struct tcphdr));
2160 }
2161 +EXPORT_SYMBOL(tcp_mtu_to_mss);
2162
2163 /* Inverse of above */
2164 int tcp_mss_to_mtu(struct sock *sk, int mss)
2165 diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
2166 index 4644f86c932fc..6f277bd30ea3c 100644
2167 --- a/net/ipv4/udp.c
2168 +++ b/net/ipv4/udp.c
2169 @@ -1043,7 +1043,7 @@ int udp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
2170 }
2171
2172 ipcm_init_sk(&ipc, inet);
2173 - ipc.gso_size = up->gso_size;
2174 + ipc.gso_size = READ_ONCE(up->gso_size);
2175
2176 if (msg->msg_controllen) {
2177 err = udp_cmsg_send(sk, msg, &ipc.gso_size);
2178 @@ -2590,7 +2590,7 @@ int udp_lib_setsockopt(struct sock *sk, int level, int optname,
2179 case UDP_SEGMENT:
2180 if (val < 0 || val > USHRT_MAX)
2181 return -EINVAL;
2182 - up->gso_size = val;
2183 + WRITE_ONCE(up->gso_size, val);
2184 break;
2185
2186 case UDP_GRO:
2187 @@ -2692,7 +2692,7 @@ int udp_lib_getsockopt(struct sock *sk, int level, int optname,
2188 break;
2189
2190 case UDP_SEGMENT:
2191 - val = up->gso_size;
2192 + val = READ_ONCE(up->gso_size);
2193 break;
2194
2195 case UDP_GRO:
2196 diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
2197 index 2f061a911bc2c..3903cc0ab1883 100644
2198 --- a/net/ipv6/tcp_ipv6.c
2199 +++ b/net/ipv6/tcp_ipv6.c
2200 @@ -343,11 +343,20 @@ failure:
2201 static void tcp_v6_mtu_reduced(struct sock *sk)
2202 {
2203 struct dst_entry *dst;
2204 + u32 mtu;
2205
2206 if ((1 << sk->sk_state) & (TCPF_LISTEN | TCPF_CLOSE))
2207 return;
2208
2209 - dst = inet6_csk_update_pmtu(sk, tcp_sk(sk)->mtu_info);
2210 + mtu = READ_ONCE(tcp_sk(sk)->mtu_info);
2211 +
2212 + /* Drop requests trying to increase our current mss.
2213 + * Check done in __ip6_rt_update_pmtu() is too late.
2214 + */
2215 + if (tcp_mtu_to_mss(sk, mtu) >= tcp_sk(sk)->mss_cache)
2216 + return;
2217 +
2218 + dst = inet6_csk_update_pmtu(sk, mtu);
2219 if (!dst)
2220 return;
2221
2222 @@ -428,6 +437,8 @@ static int tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
2223 }
2224
2225 if (type == ICMPV6_PKT_TOOBIG) {
2226 + u32 mtu = ntohl(info);
2227 +
2228 /* We are not interested in TCP_LISTEN and open_requests
2229 * (SYN-ACKs send out by Linux are always <576bytes so
2230 * they should go through unfragmented).
2231 @@ -438,7 +449,11 @@ static int tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
2232 if (!ip6_sk_accept_pmtu(sk))
2233 goto out;
2234
2235 - tp->mtu_info = ntohl(info);
2236 + if (mtu < IPV6_MIN_MTU)
2237 + goto out;
2238 +
2239 + WRITE_ONCE(tp->mtu_info, mtu);
2240 +
2241 if (!sock_owned_by_user(sk))
2242 tcp_v6_mtu_reduced(sk);
2243 else if (!test_and_set_bit(TCP_MTU_REDUCED_DEFERRED,
2244 @@ -513,8 +528,8 @@ static int tcp_v6_send_synack(const struct sock *sk, struct dst_entry *dst,
2245 opt = ireq->ipv6_opt;
2246 if (!opt)
2247 opt = rcu_dereference(np->opt);
2248 - err = ip6_xmit(sk, skb, fl6, sk->sk_mark, opt, np->tclass,
2249 - sk->sk_priority);
2250 + err = ip6_xmit(sk, skb, fl6, skb->mark ? : sk->sk_mark, opt,
2251 + np->tclass, sk->sk_priority);
2252 rcu_read_unlock();
2253 err = net_xmit_eval(err);
2254 }
2255 diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
2256 index 3c94b81bb459a..776427e80efbd 100644
2257 --- a/net/ipv6/udp.c
2258 +++ b/net/ipv6/udp.c
2259 @@ -1237,7 +1237,7 @@ int udpv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
2260 int (*getfrag)(void *, char *, int, int, int, struct sk_buff *);
2261
2262 ipcm6_init(&ipc6);
2263 - ipc6.gso_size = up->gso_size;
2264 + ipc6.gso_size = READ_ONCE(up->gso_size);
2265 ipc6.sockc.tsflags = sk->sk_tsflags;
2266 ipc6.sockc.mark = sk->sk_mark;
2267
2268 diff --git a/net/ipv6/xfrm6_output.c b/net/ipv6/xfrm6_output.c
2269 index cf2a0ce15c1c5..6b0ed6c593e2b 100644
2270 --- a/net/ipv6/xfrm6_output.c
2271 +++ b/net/ipv6/xfrm6_output.c
2272 @@ -144,7 +144,7 @@ static int __xfrm6_output(struct net *net, struct sock *sk, struct sk_buff *skb)
2273 {
2274 struct dst_entry *dst = skb_dst(skb);
2275 struct xfrm_state *x = dst->xfrm;
2276 - int mtu;
2277 + unsigned int mtu;
2278 bool toobig;
2279
2280 #ifdef CONFIG_NETFILTER
2281 diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
2282 index 783af451a8325..bc6f0c8874f81 100644
2283 --- a/net/netfilter/nf_conntrack_netlink.c
2284 +++ b/net/netfilter/nf_conntrack_netlink.c
2285 @@ -211,6 +211,7 @@ static int ctnetlink_dump_helpinfo(struct sk_buff *skb,
2286 if (!help)
2287 return 0;
2288
2289 + rcu_read_lock();
2290 helper = rcu_dereference(help->helper);
2291 if (!helper)
2292 goto out;
2293 @@ -226,9 +227,11 @@ static int ctnetlink_dump_helpinfo(struct sk_buff *skb,
2294
2295 nla_nest_end(skb, nest_helper);
2296 out:
2297 + rcu_read_unlock();
2298 return 0;
2299
2300 nla_put_failure:
2301 + rcu_read_unlock();
2302 return -1;
2303 }
2304
2305 diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c
2306 index 16c4cbf6d1f0a..02d4491991b5e 100644
2307 --- a/net/sched/act_ct.c
2308 +++ b/net/sched/act_ct.c
2309 @@ -474,7 +474,8 @@ static int tcf_ct_act(struct sk_buff *skb, const struct tc_action *a,
2310 /* This will take care of sending queued events
2311 * even if the connection is already confirmed.
2312 */
2313 - nf_conntrack_confirm(skb);
2314 + if (nf_conntrack_confirm(skb) != NF_ACCEPT)
2315 + goto drop;
2316 }
2317
2318 out_push:
2319 diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
2320 index 7da10afc92c61..b14a7d4a2f05a 100644
2321 --- a/scripts/Kbuild.include
2322 +++ b/scripts/Kbuild.include
2323 @@ -182,8 +182,13 @@ clean := -f $(srctree)/scripts/Makefile.clean obj
2324 echo-cmd = $(if $($(quiet)cmd_$(1)),\
2325 echo ' $(call escsq,$($(quiet)cmd_$(1)))$(echo-why)';)
2326
2327 +# sink stdout for 'make -s'
2328 + redirect :=
2329 + quiet_redirect :=
2330 +silent_redirect := exec >/dev/null;
2331 +
2332 # printing commands
2333 -cmd = @set -e; $(echo-cmd) $(cmd_$(1))
2334 +cmd = @set -e; $(echo-cmd) $($(quiet)redirect) $(cmd_$(1))
2335
2336 ###
2337 # if_changed - execute command if any prerequisite is newer than
2338 diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
2339 index d1d757c6edf4f..06c1e9e3bc38d 100755
2340 --- a/scripts/mkcompile_h
2341 +++ b/scripts/mkcompile_h
2342 @@ -80,15 +80,23 @@ UTS_TRUNCATE="cut -b -$UTS_LEN"
2343 # Only replace the real compile.h if the new one is different,
2344 # in order to preserve the timestamp and avoid unnecessary
2345 # recompilations.
2346 -# We don't consider the file changed if only the date/time changed.
2347 +# We don't consider the file changed if only the date/time changed,
2348 +# unless KBUILD_BUILD_TIMESTAMP was explicitly set (e.g. for
2349 +# reproducible builds with that value referring to a commit timestamp).
2350 # A kernel config change will increase the generation number, thus
2351 # causing compile.h to be updated (including date/time) due to the
2352 # changed comment in the
2353 # first line.
2354
2355 +if [ -z "$KBUILD_BUILD_TIMESTAMP" ]; then
2356 + IGNORE_PATTERN="UTS_VERSION"
2357 +else
2358 + IGNORE_PATTERN="NOT_A_PATTERN_TO_BE_MATCHED"
2359 +fi
2360 +
2361 if [ -r $TARGET ] && \
2362 - grep -v 'UTS_VERSION' $TARGET > .tmpver.1 && \
2363 - grep -v 'UTS_VERSION' .tmpcompile > .tmpver.2 && \
2364 + grep -v $IGNORE_PATTERN $TARGET > .tmpver.1 && \
2365 + grep -v $IGNORE_PATTERN .tmpcompile > .tmpver.2 && \
2366 cmp -s .tmpver.1 .tmpver.2; then
2367 rm -f .tmpcompile
2368 else
2369 diff --git a/tools/bpf/bpftool/jit_disasm.c b/tools/bpf/bpftool/jit_disasm.c
2370 index bfed711258ced..1711d0b5df3a5 100644
2371 --- a/tools/bpf/bpftool/jit_disasm.c
2372 +++ b/tools/bpf/bpftool/jit_disasm.c
2373 @@ -44,11 +44,13 @@ static int fprintf_json(void *out, const char *fmt, ...)
2374 {
2375 va_list ap;
2376 char *s;
2377 + int err;
2378
2379 va_start(ap, fmt);
2380 - if (vasprintf(&s, fmt, ap) < 0)
2381 - return -1;
2382 + err = vasprintf(&s, fmt, ap);
2383 va_end(ap);
2384 + if (err < 0)
2385 + return -1;
2386
2387 if (!oper_count) {
2388 int i;
2389 diff --git a/tools/perf/tests/bpf.c b/tools/perf/tests/bpf.c
2390 index 1eb0bffaed6cd..8669bb85e7c7f 100644
2391 --- a/tools/perf/tests/bpf.c
2392 +++ b/tools/perf/tests/bpf.c
2393 @@ -1,6 +1,7 @@
2394 // SPDX-License-Identifier: GPL-2.0
2395 #include <errno.h>
2396 #include <stdio.h>
2397 +#include <stdlib.h>
2398 #include <sys/epoll.h>
2399 #include <sys/types.h>
2400 #include <sys/stat.h>
2401 @@ -282,6 +283,7 @@ static int __test__bpf(int idx)
2402 }
2403
2404 out:
2405 + free(obj_buf);
2406 bpf__clear();
2407 return ret;
2408 }