Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:5.15 commit in: /
Date: Thu, 25 Nov 2021 12:03:26
Message-Id: 1637841787.10a5176e3cc2a9de7fc23b2caff20708456e0492.mpagano@gentoo
1 commit: 10a5176e3cc2a9de7fc23b2caff20708456e0492
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 25 12:03:07 2021 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 25 12:03:07 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=10a5176e
7
8 Linux patch 5.15.5
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 +
13 1004_linux-5.15.5.patch | 12471 ++++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 12475 insertions(+)
15
16 diff --git a/0000_README b/0000_README
17 index da91b24d..68d0c0db 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -59,6 +59,10 @@ Patch: 1003_linux-5.15.4.patch
21 From: http://www.kernel.org
22 Desc: Linux 5.15.4
23
24 +Patch: 1004_linux-5.15.5.patch
25 +From: http://www.kernel.org
26 +Desc: Linux 5.15.5
27 +
28 Patch: 1500_XATTR_USER_PREFIX.patch
29 From: https://bugs.gentoo.org/show_bug.cgi?id=470644
30 Desc: Support for namespace user.pax.* on tmpfs.
31
32 diff --git a/1004_linux-5.15.5.patch b/1004_linux-5.15.5.patch
33 new file mode 100644
34 index 00000000..6dc653b7
35 --- /dev/null
36 +++ b/1004_linux-5.15.5.patch
37 @@ -0,0 +1,12471 @@
38 +diff --git a/Makefile b/Makefile
39 +index 759e68a02cf01..820ccbe7586fe 100644
40 +--- a/Makefile
41 ++++ b/Makefile
42 +@@ -1,7 +1,7 @@
43 + # SPDX-License-Identifier: GPL-2.0
44 + VERSION = 5
45 + PATCHLEVEL = 15
46 +-SUBLEVEL = 4
47 ++SUBLEVEL = 5
48 + EXTRAVERSION =
49 + NAME = Trick or Treat
50 +
51 +diff --git a/arch/arc/kernel/process.c b/arch/arc/kernel/process.c
52 +index 3793876f42d9b..8e90052f6f056 100644
53 +--- a/arch/arc/kernel/process.c
54 ++++ b/arch/arc/kernel/process.c
55 +@@ -294,7 +294,7 @@ int elf_check_arch(const struct elf32_hdr *x)
56 + eflags = x->e_flags;
57 + if ((eflags & EF_ARC_OSABI_MSK) != EF_ARC_OSABI_CURRENT) {
58 + pr_err("ABI mismatch - you need newer toolchain\n");
59 +- force_sigsegv(SIGSEGV);
60 ++ force_fatal_sig(SIGSEGV);
61 + return 0;
62 + }
63 +
64 +diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
65 +index dcf2df6da98f0..4ebd512043be5 100644
66 +--- a/arch/arm/Kconfig
67 ++++ b/arch/arm/Kconfig
68 +@@ -1455,6 +1455,7 @@ config HIGHMEM
69 + bool "High Memory Support"
70 + depends on MMU
71 + select KMAP_LOCAL
72 ++ select KMAP_LOCAL_NON_LINEAR_PTE_ARRAY
73 + help
74 + The address space of ARM processors is only 4 Gigabytes large
75 + and it has to accommodate user address space, kernel address
76 +diff --git a/arch/arm/boot/dts/bcm-nsp.dtsi b/arch/arm/boot/dts/bcm-nsp.dtsi
77 +index 748df7955ae67..e96ddb2e26e2c 100644
78 +--- a/arch/arm/boot/dts/bcm-nsp.dtsi
79 ++++ b/arch/arm/boot/dts/bcm-nsp.dtsi
80 +@@ -77,7 +77,7 @@
81 + interrupt-affinity = <&cpu0>, <&cpu1>;
82 + };
83 +
84 +- mpcore@19000000 {
85 ++ mpcore-bus@19000000 {
86 + compatible = "simple-bus";
87 + ranges = <0x00000000 0x19000000 0x00023000>;
88 + #address-cells = <1>;
89 +@@ -219,7 +219,7 @@
90 + status = "disabled";
91 + };
92 +
93 +- sdio: sdhci@21000 {
94 ++ sdio: mmc@21000 {
95 + compatible = "brcm,sdhci-iproc-cygnus";
96 + reg = <0x21000 0x100>;
97 + interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
98 +diff --git a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
99 +index 05d4f2931772b..9bef6b9bfa8d9 100644
100 +--- a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
101 ++++ b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
102 +@@ -129,7 +129,7 @@
103 + };
104 + };
105 +
106 +- mdio-bus-mux@18003000 {
107 ++ mdio-mux@18003000 {
108 +
109 + /* BIT(9) = 1 => external mdio */
110 + mdio@200 {
111 +diff --git a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
112 +index 612d61852bfb9..577a4dc604d93 100644
113 +--- a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
114 ++++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
115 +@@ -195,3 +195,25 @@
116 + };
117 + };
118 + };
119 ++
120 ++&srab {
121 ++ status = "okay";
122 ++
123 ++ ports {
124 ++ port@0 {
125 ++ reg = <0>;
126 ++ label = "poe";
127 ++ };
128 ++
129 ++ port@5 {
130 ++ reg = <5>;
131 ++ label = "cpu";
132 ++ ethernet = <&gmac0>;
133 ++
134 ++ fixed-link {
135 ++ speed = <1000>;
136 ++ duplex-full;
137 ++ };
138 ++ };
139 ++ };
140 ++};
141 +diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
142 +index f92089290ccd5..d4f355015e3ca 100644
143 +--- a/arch/arm/boot/dts/bcm5301x.dtsi
144 ++++ b/arch/arm/boot/dts/bcm5301x.dtsi
145 +@@ -19,7 +19,7 @@
146 + #size-cells = <1>;
147 + interrupt-parent = <&gic>;
148 +
149 +- chipcommonA@18000000 {
150 ++ chipcommon-a-bus@18000000 {
151 + compatible = "simple-bus";
152 + ranges = <0x00000000 0x18000000 0x00001000>;
153 + #address-cells = <1>;
154 +@@ -44,7 +44,7 @@
155 + };
156 + };
157 +
158 +- mpcore@19000000 {
159 ++ mpcore-bus@19000000 {
160 + compatible = "simple-bus";
161 + ranges = <0x00000000 0x19000000 0x00023000>;
162 + #address-cells = <1>;
163 +@@ -369,8 +369,8 @@
164 + #address-cells = <1>;
165 + };
166 +
167 +- mdio-bus-mux@18003000 {
168 +- compatible = "mdio-mux-mmioreg";
169 ++ mdio-mux@18003000 {
170 ++ compatible = "mdio-mux-mmioreg", "mdio-mux";
171 + mdio-parent-bus = <&mdio>;
172 + #address-cells = <1>;
173 + #size-cells = <0>;
174 +@@ -415,7 +415,7 @@
175 + status = "disabled";
176 + };
177 +
178 +- dmu@1800c000 {
179 ++ dmu-bus@1800c000 {
180 + compatible = "simple-bus";
181 + ranges = <0 0x1800c000 0x1000>;
182 + #address-cells = <1>;
183 +diff --git a/arch/arm/boot/dts/ls1021a-tsn.dts b/arch/arm/boot/dts/ls1021a-tsn.dts
184 +index 9d8f0c2a8aba3..aca78b5eddf20 100644
185 +--- a/arch/arm/boot/dts/ls1021a-tsn.dts
186 ++++ b/arch/arm/boot/dts/ls1021a-tsn.dts
187 +@@ -251,7 +251,7 @@
188 +
189 + flash@0 {
190 + /* Rev. A uses 64MB flash, Rev. B & C use 32MB flash */
191 +- compatible = "jedec,spi-nor", "s25fl256s1", "s25fl512s";
192 ++ compatible = "jedec,spi-nor";
193 + spi-max-frequency = <20000000>;
194 + #address-cells = <1>;
195 + #size-cells = <1>;
196 +diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi
197 +index 4fce81422943b..f3b8540750b61 100644
198 +--- a/arch/arm/boot/dts/ls1021a.dtsi
199 ++++ b/arch/arm/boot/dts/ls1021a.dtsi
200 +@@ -329,39 +329,6 @@
201 + #thermal-sensor-cells = <1>;
202 + };
203 +
204 +- thermal-zones {
205 +- cpu_thermal: cpu-thermal {
206 +- polling-delay-passive = <1000>;
207 +- polling-delay = <5000>;
208 +-
209 +- thermal-sensors = <&tmu 0>;
210 +-
211 +- trips {
212 +- cpu_alert: cpu-alert {
213 +- temperature = <85000>;
214 +- hysteresis = <2000>;
215 +- type = "passive";
216 +- };
217 +- cpu_crit: cpu-crit {
218 +- temperature = <95000>;
219 +- hysteresis = <2000>;
220 +- type = "critical";
221 +- };
222 +- };
223 +-
224 +- cooling-maps {
225 +- map0 {
226 +- trip = <&cpu_alert>;
227 +- cooling-device =
228 +- <&cpu0 THERMAL_NO_LIMIT
229 +- THERMAL_NO_LIMIT>,
230 +- <&cpu1 THERMAL_NO_LIMIT
231 +- THERMAL_NO_LIMIT>;
232 +- };
233 +- };
234 +- };
235 +- };
236 +-
237 + dspi0: spi@2100000 {
238 + compatible = "fsl,ls1021a-v1.0-dspi";
239 + #address-cells = <1>;
240 +@@ -1016,4 +983,37 @@
241 + big-endian;
242 + };
243 + };
244 ++
245 ++ thermal-zones {
246 ++ cpu_thermal: cpu-thermal {
247 ++ polling-delay-passive = <1000>;
248 ++ polling-delay = <5000>;
249 ++
250 ++ thermal-sensors = <&tmu 0>;
251 ++
252 ++ trips {
253 ++ cpu_alert: cpu-alert {
254 ++ temperature = <85000>;
255 ++ hysteresis = <2000>;
256 ++ type = "passive";
257 ++ };
258 ++ cpu_crit: cpu-crit {
259 ++ temperature = <95000>;
260 ++ hysteresis = <2000>;
261 ++ type = "critical";
262 ++ };
263 ++ };
264 ++
265 ++ cooling-maps {
266 ++ map0 {
267 ++ trip = <&cpu_alert>;
268 ++ cooling-device =
269 ++ <&cpu0 THERMAL_NO_LIMIT
270 ++ THERMAL_NO_LIMIT>,
271 ++ <&cpu1 THERMAL_NO_LIMIT
272 ++ THERMAL_NO_LIMIT>;
273 ++ };
274 ++ };
275 ++ };
276 ++ };
277 + };
278 +diff --git a/arch/arm/boot/dts/omap-gpmc-smsc9221.dtsi b/arch/arm/boot/dts/omap-gpmc-smsc9221.dtsi
279 +index 7f6aefd134514..e7534fe9c53cf 100644
280 +--- a/arch/arm/boot/dts/omap-gpmc-smsc9221.dtsi
281 ++++ b/arch/arm/boot/dts/omap-gpmc-smsc9221.dtsi
282 +@@ -29,7 +29,7 @@
283 + compatible = "smsc,lan9221","smsc,lan9115";
284 + bank-width = <2>;
285 +
286 +- gpmc,mux-add-data;
287 ++ gpmc,mux-add-data = <0>;
288 + gpmc,cs-on-ns = <0>;
289 + gpmc,cs-rd-off-ns = <42>;
290 + gpmc,cs-wr-off-ns = <36>;
291 +diff --git a/arch/arm/boot/dts/omap3-overo-tobiduo-common.dtsi b/arch/arm/boot/dts/omap3-overo-tobiduo-common.dtsi
292 +index e5da3bc6f1050..218a10c0d8159 100644
293 +--- a/arch/arm/boot/dts/omap3-overo-tobiduo-common.dtsi
294 ++++ b/arch/arm/boot/dts/omap3-overo-tobiduo-common.dtsi
295 +@@ -22,7 +22,7 @@
296 + compatible = "smsc,lan9221","smsc,lan9115";
297 + bank-width = <2>;
298 +
299 +- gpmc,mux-add-data;
300 ++ gpmc,mux-add-data = <0>;
301 + gpmc,cs-on-ns = <0>;
302 + gpmc,cs-rd-off-ns = <42>;
303 + gpmc,cs-wr-off-ns = <36>;
304 +diff --git a/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts b/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts
305 +index f7ea2e5dd1914..971d2e2292600 100644
306 +--- a/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts
307 ++++ b/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts
308 +@@ -19,12 +19,12 @@
309 + stdout-path = "serial0:115200n8";
310 + };
311 +
312 +- memory@0 {
313 ++ memory@42000000 {
314 + reg = <0x42000000 0x3e000000>;
315 + device_type = "memory";
316 + };
317 +
318 +- mdio0: mdio@0 {
319 ++ mdio0: mdio-0 {
320 + status = "okay";
321 + compatible = "virtual,mdio-gpio";
322 + gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>,
323 +@@ -91,7 +91,7 @@
324 + };
325 + };
326 +
327 +- mdio1: mdio@1 {
328 ++ mdio1: mdio-1 {
329 + status = "okay";
330 + compatible = "virtual,mdio-gpio";
331 + gpios = <&qcom_pinmux 11 GPIO_ACTIVE_HIGH>,
332 +diff --git a/arch/arm/boot/dts/ste-ux500-samsung-skomer.dts b/arch/arm/boot/dts/ste-ux500-samsung-skomer.dts
333 +index 264f3e9b5fce5..86e83639fadc1 100644
334 +--- a/arch/arm/boot/dts/ste-ux500-samsung-skomer.dts
335 ++++ b/arch/arm/boot/dts/ste-ux500-samsung-skomer.dts
336 +@@ -292,10 +292,10 @@
337 + };
338 +
339 + ab8500_ldo_aux2 {
340 +- /* Supplies the Cypress TMA140 touchscreen only with 3.3V */
341 ++ /* Supplies the Cypress TMA140 touchscreen only with 3.0V */
342 + regulator-name = "AUX2";
343 +- regulator-min-microvolt = <3300000>;
344 +- regulator-max-microvolt = <3300000>;
345 ++ regulator-min-microvolt = <3000000>;
346 ++ regulator-max-microvolt = <3000000>;
347 + };
348 +
349 + ab8500_ldo_aux3 {
350 +@@ -314,9 +314,9 @@
351 +
352 + ab8500_ldo_aux5 {
353 + regulator-name = "AUX5";
354 ++ /* Intended for 1V8 for touchscreen but actually left unused */
355 + regulator-min-microvolt = <1050000>;
356 + regulator-max-microvolt = <2790000>;
357 +- regulator-always-on;
358 + };
359 +
360 + ab8500_ldo_aux6 {
361 +diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi
362 +index 2beddbb3c5183..b3d1bdfb5118e 100644
363 +--- a/arch/arm/boot/dts/sun8i-a33.dtsi
364 ++++ b/arch/arm/boot/dts/sun8i-a33.dtsi
365 +@@ -46,7 +46,7 @@
366 + #include <dt-bindings/thermal/thermal.h>
367 +
368 + / {
369 +- cpu0_opp_table: opp_table0 {
370 ++ cpu0_opp_table: opp-table-cpu {
371 + compatible = "operating-points-v2";
372 + opp-shared;
373 +
374 +@@ -164,7 +164,7 @@
375 + io-channels = <&ths>;
376 + };
377 +
378 +- mali_opp_table: gpu-opp-table {
379 ++ mali_opp_table: opp-table-gpu {
380 + compatible = "operating-points-v2";
381 +
382 + opp-144000000 {
383 +diff --git a/arch/arm/boot/dts/sun8i-a83t.dtsi b/arch/arm/boot/dts/sun8i-a83t.dtsi
384 +index ac97eac91349b..82fdb04122caa 100644
385 +--- a/arch/arm/boot/dts/sun8i-a83t.dtsi
386 ++++ b/arch/arm/boot/dts/sun8i-a83t.dtsi
387 +@@ -200,7 +200,7 @@
388 + status = "disabled";
389 + };
390 +
391 +- cpu0_opp_table: opp_table0 {
392 ++ cpu0_opp_table: opp-table-cluster0 {
393 + compatible = "operating-points-v2";
394 + opp-shared;
395 +
396 +@@ -253,7 +253,7 @@
397 + };
398 + };
399 +
400 +- cpu1_opp_table: opp_table1 {
401 ++ cpu1_opp_table: opp-table-cluster1 {
402 + compatible = "operating-points-v2";
403 + opp-shared;
404 +
405 +diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi
406 +index 4e89701df91f8..ae4f933abb895 100644
407 +--- a/arch/arm/boot/dts/sun8i-h3.dtsi
408 ++++ b/arch/arm/boot/dts/sun8i-h3.dtsi
409 +@@ -44,7 +44,7 @@
410 + #include <dt-bindings/thermal/thermal.h>
411 +
412 + / {
413 +- cpu0_opp_table: opp_table0 {
414 ++ cpu0_opp_table: opp-table-cpu {
415 + compatible = "operating-points-v2";
416 + opp-shared;
417 +
418 +@@ -112,7 +112,7 @@
419 + };
420 + };
421 +
422 +- gpu_opp_table: gpu-opp-table {
423 ++ gpu_opp_table: opp-table-gpu {
424 + compatible = "operating-points-v2";
425 +
426 + opp-120000000 {
427 +diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
428 +index cc321c04f1219..f6d7d7f7fdabe 100644
429 +--- a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
430 ++++ b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
431 +@@ -343,19 +343,19 @@
432 + };
433 +
434 + thermal-zones {
435 +- cpu-thermal-zone {
436 ++ cpu-thermal {
437 + polling-delay-passive = <0>;
438 + polling-delay = <0>;
439 + thermal-sensors = <&ths 0>;
440 + };
441 +
442 +- ddr-thermal-zone {
443 ++ ddr-thermal {
444 + polling-delay-passive = <0>;
445 + polling-delay = <0>;
446 + thermal-sensors = <&ths 2>;
447 + };
448 +
449 +- gpu-thermal-zone {
450 ++ gpu-thermal {
451 + polling-delay-passive = <0>;
452 + polling-delay = <0>;
453 + thermal-sensors = <&ths 1>;
454 +diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-cpu-opp.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-cpu-opp.dtsi
455 +index 578c37490d901..e39db51eb4489 100644
456 +--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-cpu-opp.dtsi
457 ++++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-cpu-opp.dtsi
458 +@@ -4,7 +4,7 @@
459 + */
460 +
461 + / {
462 +- cpu0_opp_table: opp_table0 {
463 ++ cpu0_opp_table: opp-table-cpu {
464 + compatible = "operating-points-v2";
465 + opp-shared;
466 +
467 +diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-cpu-opp.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5-cpu-opp.dtsi
468 +index b2657201957eb..1afad8b437d72 100644
469 +--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-cpu-opp.dtsi
470 ++++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-cpu-opp.dtsi
471 +@@ -2,7 +2,7 @@
472 + // Copyright (C) 2020 Chen-Yu Tsai <wens@××××.org>
473 +
474 + / {
475 +- cpu_opp_table: cpu-opp-table {
476 ++ cpu_opp_table: opp-table-cpu {
477 + compatible = "operating-points-v2";
478 + opp-shared;
479 +
480 +diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
481 +index 578a63dedf466..9988e87ea7b3d 100644
482 +--- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
483 ++++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
484 +@@ -217,7 +217,7 @@
485 + };
486 + };
487 +
488 +- gpu_thermal {
489 ++ gpu-thermal {
490 + polling-delay-passive = <0>;
491 + polling-delay = <0>;
492 + thermal-sensors = <&ths 1>;
493 +diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-cpu-opp.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-cpu-opp.dtsi
494 +index 8c6e8536b69fa..0baf0f8e4d272 100644
495 +--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-cpu-opp.dtsi
496 ++++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-cpu-opp.dtsi
497 +@@ -3,7 +3,7 @@
498 + // Copyright (C) 2020 Clément Péron <peron.clem@×××××.com>
499 +
500 + / {
501 +- cpu_opp_table: cpu-opp-table {
502 ++ cpu_opp_table: opp-table-cpu {
503 + compatible = "allwinner,sun50i-h6-operating-points";
504 + nvmem-cells = <&cpu_speed_grade>;
505 + opp-shared;
506 +diff --git a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
507 +index f6b93bbb49228..5118816b1ed76 100644
508 +--- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
509 ++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi
510 +@@ -326,12 +326,12 @@
511 + #reset-cells = <1>;
512 + };
513 + };
514 ++ };
515 +
516 +- reboot {
517 +- compatible = "syscon-reboot";
518 +- regmap = <&timer>;
519 +- offset = <0x34>;
520 +- mask = <1>;
521 +- };
522 ++ reboot {
523 ++ compatible = "syscon-reboot";
524 ++ regmap = <&timer>;
525 ++ offset = <0x34>;
526 ++ mask = <1>;
527 + };
528 + };
529 +diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts
530 +index 79f155dedb2d0..e662677a6e28f 100644
531 +--- a/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts
532 ++++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts
533 +@@ -15,6 +15,7 @@
534 + compatible = "fsl,ls1012a-rdb", "fsl,ls1012a";
535 +
536 + aliases {
537 ++ serial0 = &duart0;
538 + mmc0 = &esdhc0;
539 + mmc1 = &esdhc1;
540 + };
541 +diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi
542 +index f85e437f80b73..6050723172436 100644
543 +--- a/arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi
544 ++++ b/arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi
545 +@@ -847,7 +847,7 @@
546 + };
547 +
548 + cluster1_core0_watchdog: wdt@c000000 {
549 +- compatible = "arm,sp805-wdt", "arm,primecell";
550 ++ compatible = "arm,sp805", "arm,primecell";
551 + reg = <0x0 0xc000000 0x0 0x1000>;
552 + clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
553 + QORIQ_CLK_PLL_DIV(16)>,
554 +@@ -857,7 +857,7 @@
555 + };
556 +
557 + cluster1_core1_watchdog: wdt@c010000 {
558 +- compatible = "arm,sp805-wdt", "arm,primecell";
559 ++ compatible = "arm,sp805", "arm,primecell";
560 + reg = <0x0 0xc010000 0x0 0x1000>;
561 + clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
562 + QORIQ_CLK_PLL_DIV(16)>,
563 +@@ -867,7 +867,7 @@
564 + };
565 +
566 + cluster1_core2_watchdog: wdt@c020000 {
567 +- compatible = "arm,sp805-wdt", "arm,primecell";
568 ++ compatible = "arm,sp805", "arm,primecell";
569 + reg = <0x0 0xc020000 0x0 0x1000>;
570 + clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
571 + QORIQ_CLK_PLL_DIV(16)>,
572 +@@ -877,7 +877,7 @@
573 + };
574 +
575 + cluster1_core3_watchdog: wdt@c030000 {
576 +- compatible = "arm,sp805-wdt", "arm,primecell";
577 ++ compatible = "arm,sp805", "arm,primecell";
578 + reg = <0x0 0xc030000 0x0 0x1000>;
579 + clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
580 + QORIQ_CLK_PLL_DIV(16)>,
581 +@@ -887,7 +887,7 @@
582 + };
583 +
584 + cluster2_core0_watchdog: wdt@c100000 {
585 +- compatible = "arm,sp805-wdt", "arm,primecell";
586 ++ compatible = "arm,sp805", "arm,primecell";
587 + reg = <0x0 0xc100000 0x0 0x1000>;
588 + clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
589 + QORIQ_CLK_PLL_DIV(16)>,
590 +@@ -897,7 +897,7 @@
591 + };
592 +
593 + cluster2_core1_watchdog: wdt@c110000 {
594 +- compatible = "arm,sp805-wdt", "arm,primecell";
595 ++ compatible = "arm,sp805", "arm,primecell";
596 + reg = <0x0 0xc110000 0x0 0x1000>;
597 + clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
598 + QORIQ_CLK_PLL_DIV(16)>,
599 +@@ -907,7 +907,7 @@
600 + };
601 +
602 + cluster2_core2_watchdog: wdt@c120000 {
603 +- compatible = "arm,sp805-wdt", "arm,primecell";
604 ++ compatible = "arm,sp805", "arm,primecell";
605 + reg = <0x0 0xc120000 0x0 0x1000>;
606 + clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
607 + QORIQ_CLK_PLL_DIV(16)>,
608 +@@ -917,7 +917,7 @@
609 + };
610 +
611 + cluster2_core3_watchdog: wdt@c130000 {
612 +- compatible = "arm,sp805-wdt", "arm,primecell";
613 ++ compatible = "arm,sp805", "arm,primecell";
614 + reg = <0x0 0xc130000 0x0 0x1000>;
615 + clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
616 + QORIQ_CLK_PLL_DIV(16)>,
617 +diff --git a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
618 +index 801ba9612d361..1282b61da8a55 100644
619 +--- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
620 ++++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
621 +@@ -387,7 +387,7 @@
622 + };
623 +
624 + cluster1_core0_watchdog: wdt@c000000 {
625 +- compatible = "arm,sp805-wdt", "arm,primecell";
626 ++ compatible = "arm,sp805", "arm,primecell";
627 + reg = <0x0 0xc000000 0x0 0x1000>;
628 + clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
629 + QORIQ_CLK_PLL_DIV(4)>,
630 +@@ -397,7 +397,7 @@
631 + };
632 +
633 + cluster1_core1_watchdog: wdt@c010000 {
634 +- compatible = "arm,sp805-wdt", "arm,primecell";
635 ++ compatible = "arm,sp805", "arm,primecell";
636 + reg = <0x0 0xc010000 0x0 0x1000>;
637 + clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
638 + QORIQ_CLK_PLL_DIV(4)>,
639 +@@ -407,7 +407,7 @@
640 + };
641 +
642 + cluster2_core0_watchdog: wdt@c100000 {
643 +- compatible = "arm,sp805-wdt", "arm,primecell";
644 ++ compatible = "arm,sp805", "arm,primecell";
645 + reg = <0x0 0xc100000 0x0 0x1000>;
646 + clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
647 + QORIQ_CLK_PLL_DIV(4)>,
648 +@@ -417,7 +417,7 @@
649 + };
650 +
651 + cluster2_core1_watchdog: wdt@c110000 {
652 +- compatible = "arm,sp805-wdt", "arm,primecell";
653 ++ compatible = "arm,sp805", "arm,primecell";
654 + reg = <0x0 0xc110000 0x0 0x1000>;
655 + clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
656 + QORIQ_CLK_PLL_DIV(4)>,
657 +@@ -427,7 +427,7 @@
658 + };
659 +
660 + cluster3_core0_watchdog: wdt@c200000 {
661 +- compatible = "arm,sp805-wdt", "arm,primecell";
662 ++ compatible = "arm,sp805", "arm,primecell";
663 + reg = <0x0 0xc200000 0x0 0x1000>;
664 + clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
665 + QORIQ_CLK_PLL_DIV(4)>,
666 +@@ -437,7 +437,7 @@
667 + };
668 +
669 + cluster3_core1_watchdog: wdt@c210000 {
670 +- compatible = "arm,sp805-wdt", "arm,primecell";
671 ++ compatible = "arm,sp805", "arm,primecell";
672 + reg = <0x0 0xc210000 0x0 0x1000>;
673 + clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
674 + QORIQ_CLK_PLL_DIV(4)>,
675 +@@ -447,7 +447,7 @@
676 + };
677 +
678 + cluster4_core0_watchdog: wdt@c300000 {
679 +- compatible = "arm,sp805-wdt", "arm,primecell";
680 ++ compatible = "arm,sp805", "arm,primecell";
681 + reg = <0x0 0xc300000 0x0 0x1000>;
682 + clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
683 + QORIQ_CLK_PLL_DIV(4)>,
684 +@@ -457,7 +457,7 @@
685 + };
686 +
687 + cluster4_core1_watchdog: wdt@c310000 {
688 +- compatible = "arm,sp805-wdt", "arm,primecell";
689 ++ compatible = "arm,sp805", "arm,primecell";
690 + reg = <0x0 0xc310000 0x0 0x1000>;
691 + clocks = <&clockgen QORIQ_CLK_PLATFORM_PLL
692 + QORIQ_CLK_PLL_DIV(4)>,
693 +diff --git a/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts b/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts
694 +index e99e7644ff392..49d7470812eef 100644
695 +--- a/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts
696 ++++ b/arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dts
697 +@@ -123,8 +123,8 @@
698 +
699 + ethphy: ethernet-phy@0 {
700 + reg = <0>;
701 +- reset-assert-us = <100>;
702 +- reset-deassert-us = <100>;
703 ++ reset-assert-us = <1>;
704 ++ reset-deassert-us = <15000>;
705 + reset-gpios = <&gpio4 27 GPIO_ACTIVE_LOW>;
706 + };
707 + };
708 +diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
709 +index 2d5c1a348716a..6eabec2602e23 100644
710 +--- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
711 ++++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
712 +@@ -1087,7 +1087,7 @@
713 + };
714 +
715 + watchdog0: watchdog@e8a06000 {
716 +- compatible = "arm,sp805-wdt", "arm,primecell";
717 ++ compatible = "arm,sp805", "arm,primecell";
718 + reg = <0x0 0xe8a06000 0x0 0x1000>;
719 + interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
720 + clocks = <&crg_ctrl HI3660_OSC32K>,
721 +@@ -1096,7 +1096,7 @@
722 + };
723 +
724 + watchdog1: watchdog@e8a07000 {
725 +- compatible = "arm,sp805-wdt", "arm,primecell";
726 ++ compatible = "arm,sp805", "arm,primecell";
727 + reg = <0x0 0xe8a07000 0x0 0x1000>;
728 + interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
729 + clocks = <&crg_ctrl HI3660_OSC32K>,
730 +diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
731 +index dde9371dc5451..e4860b8a638ec 100644
732 +--- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
733 ++++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
734 +@@ -840,7 +840,7 @@
735 + };
736 +
737 + watchdog0: watchdog@f8005000 {
738 +- compatible = "arm,sp805-wdt", "arm,primecell";
739 ++ compatible = "arm,sp805", "arm,primecell";
740 + reg = <0x0 0xf8005000 0x0 0x1000>;
741 + interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
742 + clocks = <&ao_ctrl HI6220_WDT0_PCLK>,
743 +diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
744 +index d2fe58e0eb7aa..7b6205c180df1 100644
745 +--- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
746 ++++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
747 +@@ -200,7 +200,7 @@
748 + clock-names = "bam_clk";
749 + #dma-cells = <1>;
750 + qcom,ee = <1>;
751 +- qcom,controlled-remotely = <1>;
752 ++ qcom,controlled-remotely;
753 + qcom,config-pipe-trust-reg = <0>;
754 + };
755 +
756 +diff --git a/arch/arm64/boot/dts/qcom/ipq8074.dtsi b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
757 +index db333001df4d6..97f99663c132e 100644
758 +--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
759 ++++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
760 +@@ -220,7 +220,7 @@
761 + clock-names = "bam_clk";
762 + #dma-cells = <1>;
763 + qcom,ee = <1>;
764 +- qcom,controlled-remotely = <1>;
765 ++ qcom,controlled-remotely;
766 + status = "disabled";
767 + };
768 +
769 +diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
770 +index fbff712639513..427bb20626549 100644
771 +--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
772 ++++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
773 +@@ -445,7 +445,7 @@
774 + };
775 + };
776 +
777 +- rpm_msg_ram: memory@60000 {
778 ++ rpm_msg_ram: sram@60000 {
779 + compatible = "qcom,rpm-msg-ram";
780 + reg = <0x00060000 0x8000>;
781 + };
782 +diff --git a/arch/arm64/boot/dts/qcom/msm8994.dtsi b/arch/arm64/boot/dts/qcom/msm8994.dtsi
783 +index 986fe60dec5fb..5a9a5ed0565f6 100644
784 +--- a/arch/arm64/boot/dts/qcom/msm8994.dtsi
785 ++++ b/arch/arm64/boot/dts/qcom/msm8994.dtsi
786 +@@ -715,7 +715,7 @@
787 + reg = <0xfc400000 0x2000>;
788 + };
789 +
790 +- rpm_msg_ram: memory@fc428000 {
791 ++ rpm_msg_ram: sram@fc428000 {
792 + compatible = "qcom,rpm-msg-ram";
793 + reg = <0xfc428000 0x4000>;
794 + };
795 +diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
796 +index 52df22ab3f6ae..f8d28dd76cfa8 100644
797 +--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
798 ++++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
799 +@@ -638,7 +638,7 @@
800 + };
801 + };
802 +
803 +- rpm_msg_ram: memory@68000 {
804 ++ rpm_msg_ram: sram@68000 {
805 + compatible = "qcom,rpm-msg-ram";
806 + reg = <0x00068000 0x6000>;
807 + };
808 +diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi
809 +index 34039b5c80175..228339f81c327 100644
810 +--- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
811 ++++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
812 +@@ -308,38 +308,42 @@
813 + LITTLE_CPU_SLEEP_0: cpu-sleep-0-0 {
814 + compatible = "arm,idle-state";
815 + idle-state-name = "little-retention";
816 ++ /* CPU Retention (C2D), L2 Active */
817 + arm,psci-suspend-param = <0x00000002>;
818 + entry-latency-us = <81>;
819 + exit-latency-us = <86>;
820 +- min-residency-us = <200>;
821 ++ min-residency-us = <504>;
822 + };
823 +
824 + LITTLE_CPU_SLEEP_1: cpu-sleep-0-1 {
825 + compatible = "arm,idle-state";
826 + idle-state-name = "little-power-collapse";
827 ++ /* CPU + L2 Power Collapse (C3, D4) */
828 + arm,psci-suspend-param = <0x40000003>;
829 +- entry-latency-us = <273>;
830 +- exit-latency-us = <612>;
831 +- min-residency-us = <1000>;
832 ++ entry-latency-us = <814>;
833 ++ exit-latency-us = <4562>;
834 ++ min-residency-us = <9183>;
835 + local-timer-stop;
836 + };
837 +
838 + BIG_CPU_SLEEP_0: cpu-sleep-1-0 {
839 + compatible = "arm,idle-state";
840 + idle-state-name = "big-retention";
841 ++ /* CPU Retention (C2D), L2 Active */
842 + arm,psci-suspend-param = <0x00000002>;
843 + entry-latency-us = <79>;
844 + exit-latency-us = <82>;
845 +- min-residency-us = <200>;
846 ++ min-residency-us = <1302>;
847 + };
848 +
849 + BIG_CPU_SLEEP_1: cpu-sleep-1-1 {
850 + compatible = "arm,idle-state";
851 + idle-state-name = "big-power-collapse";
852 ++ /* CPU + L2 Power Collapse (C3, D4) */
853 + arm,psci-suspend-param = <0x40000003>;
854 +- entry-latency-us = <336>;
855 +- exit-latency-us = <525>;
856 +- min-residency-us = <1000>;
857 ++ entry-latency-us = <724>;
858 ++ exit-latency-us = <2027>;
859 ++ min-residency-us = <9419>;
860 + local-timer-stop;
861 + };
862 + };
863 +@@ -857,7 +861,7 @@
864 + reg = <0x00100000 0xb0000>;
865 + };
866 +
867 +- rpm_msg_ram: memory@778000 {
868 ++ rpm_msg_ram: sram@778000 {
869 + compatible = "qcom,rpm-msg-ram";
870 + reg = <0x00778000 0x7000>;
871 + };
872 +diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi
873 +index 339790ba585de..ca5be16479809 100644
874 +--- a/arch/arm64/boot/dts/qcom/qcs404.dtsi
875 ++++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi
876 +@@ -318,7 +318,7 @@
877 + status = "disabled";
878 + };
879 +
880 +- rpm_msg_ram: memory@60000 {
881 ++ rpm_msg_ram: sram@60000 {
882 + compatible = "qcom,rpm-msg-ram";
883 + reg = <0x00060000 0x6000>;
884 + };
885 +diff --git a/arch/arm64/boot/dts/qcom/sdm630.dtsi b/arch/arm64/boot/dts/qcom/sdm630.dtsi
886 +index 9c7f87e42fccd..a8724fd60645f 100644
887 +--- a/arch/arm64/boot/dts/qcom/sdm630.dtsi
888 ++++ b/arch/arm64/boot/dts/qcom/sdm630.dtsi
889 +@@ -541,7 +541,7 @@
890 + <&sleep_clk>;
891 + };
892 +
893 +- rpm_msg_ram: memory@778000 {
894 ++ rpm_msg_ram: sram@778000 {
895 + compatible = "qcom,rpm-msg-ram";
896 + reg = <0x00778000 0x7000>;
897 + };
898 +diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
899 +index a810adc1a707f..519ca9a705b4f 100644
900 +--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
901 ++++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
902 +@@ -2320,7 +2320,7 @@
903 + clock-names = "bam_clk";
904 + #dma-cells = <1>;
905 + qcom,ee = <0>;
906 +- qcom,controlled-remotely = <1>;
907 ++ qcom,controlled-remotely;
908 + iommus = <&apps_smmu 0x704 0x1>,
909 + <&apps_smmu 0x706 0x1>,
910 + <&apps_smmu 0x714 0x1>,
911 +diff --git a/arch/arm64/boot/dts/qcom/sm6125.dtsi b/arch/arm64/boot/dts/qcom/sm6125.dtsi
912 +index 2b37ce6a9f9c5..9f476e3d0720b 100644
913 +--- a/arch/arm64/boot/dts/qcom/sm6125.dtsi
914 ++++ b/arch/arm64/boot/dts/qcom/sm6125.dtsi
915 +@@ -380,7 +380,7 @@
916 + status = "disabled";
917 + };
918 +
919 +- rpm_msg_ram: memory@45f0000 {
920 ++ rpm_msg_ram: sram@45f0000 {
921 + compatible = "qcom,rpm-msg-ram";
922 + reg = <0x045f0000 0x7000>;
923 + };
924 +diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
925 +index 2b5f001ff4a61..9e5d07f5712e6 100644
926 +--- a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
927 ++++ b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
928 +@@ -385,10 +385,6 @@
929 + };
930 + };
931 +
932 +-&cdn_dp {
933 +- status = "okay";
934 +-};
935 +-
936 + &cpu_b0 {
937 + cpu-supply = <&vdd_cpu_b>;
938 + };
939 +diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm016-dc2.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm016-dc2.dts
940 +index 4a86efa32d687..f7124e15f0ff6 100644
941 +--- a/arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm016-dc2.dts
942 ++++ b/arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm016-dc2.dts
943 +@@ -131,7 +131,7 @@
944 + reg = <0>;
945 +
946 + partition@0 {
947 +- label = "data";
948 ++ label = "spi0-data";
949 + reg = <0x0 0x100000>;
950 + };
951 + };
952 +@@ -149,7 +149,7 @@
953 + reg = <0>;
954 +
955 + partition@0 {
956 +- label = "data";
957 ++ label = "spi1-data";
958 + reg = <0x0 0x84000>;
959 + };
960 + };
961 +diff --git a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
962 +index 28dccb891a535..8278876ad33fa 100644
963 +--- a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
964 ++++ b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
965 +@@ -792,7 +792,7 @@
966 + };
967 +
968 + uart0: serial@ff000000 {
969 +- compatible = "cdns,uart-r1p12", "xlnx,xuartps";
970 ++ compatible = "xlnx,zynqmp-uart", "cdns,uart-r1p12";
971 + status = "disabled";
972 + interrupt-parent = <&gic>;
973 + interrupts = <0 21 4>;
974 +@@ -802,7 +802,7 @@
975 + };
976 +
977 + uart1: serial@ff010000 {
978 +- compatible = "cdns,uart-r1p12", "xlnx,xuartps";
979 ++ compatible = "xlnx,zynqmp-uart", "cdns,uart-r1p12";
980 + status = "disabled";
981 + interrupt-parent = <&gic>;
982 + interrupts = <0 22 4>;
983 +diff --git a/arch/arm64/kvm/hyp/nvhe/setup.c b/arch/arm64/kvm/hyp/nvhe/setup.c
984 +index 57c27846320f4..58ad9c5ba3112 100644
985 +--- a/arch/arm64/kvm/hyp/nvhe/setup.c
986 ++++ b/arch/arm64/kvm/hyp/nvhe/setup.c
987 +@@ -177,7 +177,7 @@ static int finalize_host_mappings_walker(u64 addr, u64 end, u32 level,
988 +
989 + phys = kvm_pte_to_phys(pte);
990 + if (!addr_is_memory(phys))
991 +- return 0;
992 ++ return -EINVAL;
993 +
994 + /*
995 + * Adjust the host stage-2 mappings to match the ownership attributes
996 +@@ -206,8 +206,18 @@ static int finalize_host_mappings(void)
997 + .cb = finalize_host_mappings_walker,
998 + .flags = KVM_PGTABLE_WALK_LEAF,
999 + };
1000 ++ int i, ret;
1001 ++
1002 ++ for (i = 0; i < hyp_memblock_nr; i++) {
1003 ++ struct memblock_region *reg = &hyp_memory[i];
1004 ++ u64 start = (u64)hyp_phys_to_virt(reg->base);
1005 ++
1006 ++ ret = kvm_pgtable_walk(&pkvm_pgtable, start, reg->size, &walker);
1007 ++ if (ret)
1008 ++ return ret;
1009 ++ }
1010 +
1011 +- return kvm_pgtable_walk(&pkvm_pgtable, 0, BIT(pkvm_pgtable.ia_bits), &walker);
1012 ++ return 0;
1013 + }
1014 +
1015 + void __noreturn __pkvm_init_finalise(void)
1016 +diff --git a/arch/hexagon/include/asm/timer-regs.h b/arch/hexagon/include/asm/timer-regs.h
1017 +deleted file mode 100644
1018 +index ee6c61423a058..0000000000000
1019 +--- a/arch/hexagon/include/asm/timer-regs.h
1020 ++++ /dev/null
1021 +@@ -1,26 +0,0 @@
1022 +-/* SPDX-License-Identifier: GPL-2.0-only */
1023 +-/*
1024 +- * Timer support for Hexagon
1025 +- *
1026 +- * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
1027 +- */
1028 +-
1029 +-#ifndef _ASM_TIMER_REGS_H
1030 +-#define _ASM_TIMER_REGS_H
1031 +-
1032 +-/* This stuff should go into a platform specific file */
1033 +-#define TCX0_CLK_RATE 19200
1034 +-#define TIMER_ENABLE 0
1035 +-#define TIMER_CLR_ON_MATCH 1
1036 +-
1037 +-/*
1038 +- * 8x50 HDD Specs 5-8. Simulator co-sim not fixed until
1039 +- * release 1.1, and then it's "adjustable" and probably not defaulted.
1040 +- */
1041 +-#define RTOS_TIMER_INT 3
1042 +-#ifdef CONFIG_HEXAGON_COMET
1043 +-#define RTOS_TIMER_REGS_ADDR 0xAB000000UL
1044 +-#endif
1045 +-#define SLEEP_CLK_RATE 32000
1046 +-
1047 +-#endif
1048 +diff --git a/arch/hexagon/include/asm/timex.h b/arch/hexagon/include/asm/timex.h
1049 +index 8d4ec76fceb45..dfe69e118b2be 100644
1050 +--- a/arch/hexagon/include/asm/timex.h
1051 ++++ b/arch/hexagon/include/asm/timex.h
1052 +@@ -7,11 +7,10 @@
1053 + #define _ASM_TIMEX_H
1054 +
1055 + #include <asm-generic/timex.h>
1056 +-#include <asm/timer-regs.h>
1057 + #include <asm/hexagon_vm.h>
1058 +
1059 + /* Using TCX0 as our clock. CLOCK_TICK_RATE scheduled to be removed. */
1060 +-#define CLOCK_TICK_RATE TCX0_CLK_RATE
1061 ++#define CLOCK_TICK_RATE 19200
1062 +
1063 + #define ARCH_HAS_READ_CURRENT_TIMER
1064 +
1065 +diff --git a/arch/hexagon/kernel/time.c b/arch/hexagon/kernel/time.c
1066 +index feffe527ac929..febc95714d756 100644
1067 +--- a/arch/hexagon/kernel/time.c
1068 ++++ b/arch/hexagon/kernel/time.c
1069 +@@ -17,9 +17,10 @@
1070 + #include <linux/of_irq.h>
1071 + #include <linux/module.h>
1072 +
1073 +-#include <asm/timer-regs.h>
1074 + #include <asm/hexagon_vm.h>
1075 +
1076 ++#define TIMER_ENABLE BIT(0)
1077 ++
1078 + /*
1079 + * For the clocksource we need:
1080 + * pcycle frequency (600MHz)
1081 +@@ -33,6 +34,13 @@ cycles_t pcycle_freq_mhz;
1082 + cycles_t thread_freq_mhz;
1083 + cycles_t sleep_clk_freq;
1084 +
1085 ++/*
1086 ++ * 8x50 HDD Specs 5-8. Simulator co-sim not fixed until
1087 ++ * release 1.1, and then it's "adjustable" and probably not defaulted.
1088 ++ */
1089 ++#define RTOS_TIMER_INT 3
1090 ++#define RTOS_TIMER_REGS_ADDR 0xAB000000UL
1091 ++
1092 + static struct resource rtos_timer_resources[] = {
1093 + {
1094 + .start = RTOS_TIMER_REGS_ADDR,
1095 +@@ -80,7 +88,7 @@ static int set_next_event(unsigned long delta, struct clock_event_device *evt)
1096 + iowrite32(0, &rtos_timer->clear);
1097 +
1098 + iowrite32(delta, &rtos_timer->match);
1099 +- iowrite32(1 << TIMER_ENABLE, &rtos_timer->enable);
1100 ++ iowrite32(TIMER_ENABLE, &rtos_timer->enable);
1101 + return 0;
1102 + }
1103 +
1104 +diff --git a/arch/hexagon/lib/io.c b/arch/hexagon/lib/io.c
1105 +index d35d69d6588c4..55f75392857b0 100644
1106 +--- a/arch/hexagon/lib/io.c
1107 ++++ b/arch/hexagon/lib/io.c
1108 +@@ -27,6 +27,7 @@ void __raw_readsw(const void __iomem *addr, void *data, int len)
1109 + *dst++ = *src;
1110 +
1111 + }
1112 ++EXPORT_SYMBOL(__raw_readsw);
1113 +
1114 + /*
1115 + * __raw_writesw - read words a short at a time
1116 +@@ -47,6 +48,7 @@ void __raw_writesw(void __iomem *addr, const void *data, int len)
1117 +
1118 +
1119 + }
1120 ++EXPORT_SYMBOL(__raw_writesw);
1121 +
1122 + /* Pretty sure len is pre-adjusted for the length of the access already */
1123 + void __raw_readsl(const void __iomem *addr, void *data, int len)
1124 +@@ -62,6 +64,7 @@ void __raw_readsl(const void __iomem *addr, void *data, int len)
1125 +
1126 +
1127 + }
1128 ++EXPORT_SYMBOL(__raw_readsl);
1129 +
1130 + void __raw_writesl(void __iomem *addr, const void *data, int len)
1131 + {
1132 +@@ -76,3 +79,4 @@ void __raw_writesl(void __iomem *addr, const void *data, int len)
1133 +
1134 +
1135 + }
1136 ++EXPORT_SYMBOL(__raw_writesl);
1137 +diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c
1138 +index 9718ce94cc845..34d6458340b0f 100644
1139 +--- a/arch/m68k/kernel/traps.c
1140 ++++ b/arch/m68k/kernel/traps.c
1141 +@@ -1145,7 +1145,7 @@ asmlinkage void set_esp0(unsigned long ssp)
1142 + */
1143 + asmlinkage void fpsp040_die(void)
1144 + {
1145 +- force_sigsegv(SIGSEGV);
1146 ++ force_exit_sig(SIGSEGV);
1147 + }
1148 +
1149 + #ifdef CONFIG_M68KFPU_EMU
1150 +diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
1151 +index cbbb302a460eb..a917d408d27d8 100644
1152 +--- a/arch/mips/Kconfig
1153 ++++ b/arch/mips/Kconfig
1154 +@@ -332,6 +332,9 @@ config BCM63XX
1155 + select SYS_SUPPORTS_32BIT_KERNEL
1156 + select SYS_SUPPORTS_BIG_ENDIAN
1157 + select SYS_HAS_EARLY_PRINTK
1158 ++ select SYS_HAS_CPU_BMIPS32_3300
1159 ++ select SYS_HAS_CPU_BMIPS4350
1160 ++ select SYS_HAS_CPU_BMIPS4380
1161 + select SWAP_IO_SPACE
1162 + select GPIOLIB
1163 + select MIPS_L1_CACHE_SHIFT_4
1164 +diff --git a/arch/mips/bcm63xx/clk.c b/arch/mips/bcm63xx/clk.c
1165 +index 5a3e325275d0d..1c91064cb448b 100644
1166 +--- a/arch/mips/bcm63xx/clk.c
1167 ++++ b/arch/mips/bcm63xx/clk.c
1168 +@@ -381,6 +381,12 @@ void clk_disable(struct clk *clk)
1169 +
1170 + EXPORT_SYMBOL(clk_disable);
1171 +
1172 ++struct clk *clk_get_parent(struct clk *clk)
1173 ++{
1174 ++ return NULL;
1175 ++}
1176 ++EXPORT_SYMBOL(clk_get_parent);
1177 ++
1178 + unsigned long clk_get_rate(struct clk *clk)
1179 + {
1180 + if (!clk)
1181 +diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
1182 +index 3548b3b452699..9112bdb86be45 100644
1183 +--- a/arch/mips/boot/compressed/Makefile
1184 ++++ b/arch/mips/boot/compressed/Makefile
1185 +@@ -56,6 +56,8 @@ $(obj)/uart-ath79.c: $(srctree)/arch/mips/ath79/early_printk.c
1186 +
1187 + vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o
1188 +
1189 ++vmlinuzobjs-$(CONFIG_KERNEL_ZSTD) += $(obj)/bswapdi.o
1190 ++
1191 + extra-y += ashldi3.c
1192 + $(obj)/ashldi3.c: $(obj)/%.c: $(srctree)/lib/%.c FORCE
1193 + $(call if_changed,shipped)
1194 +@@ -64,6 +66,10 @@ extra-y += bswapsi.c
1195 + $(obj)/bswapsi.c: $(obj)/%.c: $(srctree)/arch/mips/lib/%.c FORCE
1196 + $(call if_changed,shipped)
1197 +
1198 ++extra-y += bswapdi.c
1199 ++$(obj)/bswapdi.c: $(obj)/%.c: $(srctree)/arch/mips/lib/%.c FORCE
1200 ++ $(call if_changed,shipped)
1201 ++
1202 + targets := $(notdir $(vmlinuzobjs-y))
1203 +
1204 + targets += vmlinux.bin
1205 +diff --git a/arch/mips/generic/yamon-dt.c b/arch/mips/generic/yamon-dt.c
1206 +index a3aa22c77cadc..a07a5edbcda78 100644
1207 +--- a/arch/mips/generic/yamon-dt.c
1208 ++++ b/arch/mips/generic/yamon-dt.c
1209 +@@ -75,7 +75,7 @@ static unsigned int __init gen_fdt_mem_array(
1210 + __init int yamon_dt_append_memory(void *fdt,
1211 + const struct yamon_mem_region *regions)
1212 + {
1213 +- unsigned long phys_memsize, memsize;
1214 ++ unsigned long phys_memsize = 0, memsize;
1215 + __be32 mem_array[2 * MAX_MEM_ARRAY_ENTRIES];
1216 + unsigned int mem_entries;
1217 + int i, err, mem_off;
1218 +diff --git a/arch/mips/lantiq/clk.c b/arch/mips/lantiq/clk.c
1219 +index dd819e31fcbbf..4916cccf378fd 100644
1220 +--- a/arch/mips/lantiq/clk.c
1221 ++++ b/arch/mips/lantiq/clk.c
1222 +@@ -158,6 +158,12 @@ void clk_deactivate(struct clk *clk)
1223 + }
1224 + EXPORT_SYMBOL(clk_deactivate);
1225 +
1226 ++struct clk *clk_get_parent(struct clk *clk)
1227 ++{
1228 ++ return NULL;
1229 ++}
1230 ++EXPORT_SYMBOL(clk_get_parent);
1231 ++
1232 + static inline u32 get_counter_resolution(void)
1233 + {
1234 + u32 res;
1235 +diff --git a/arch/mips/sni/time.c b/arch/mips/sni/time.c
1236 +index 240bb68ec2478..ff3ba7e778901 100644
1237 +--- a/arch/mips/sni/time.c
1238 ++++ b/arch/mips/sni/time.c
1239 +@@ -18,14 +18,14 @@ static int a20r_set_periodic(struct clock_event_device *evt)
1240 + {
1241 + *(volatile u8 *)(A20R_PT_CLOCK_BASE + 12) = 0x34;
1242 + wmb();
1243 +- *(volatile u8 *)(A20R_PT_CLOCK_BASE + 0) = SNI_COUNTER0_DIV;
1244 ++ *(volatile u8 *)(A20R_PT_CLOCK_BASE + 0) = SNI_COUNTER0_DIV & 0xff;
1245 + wmb();
1246 + *(volatile u8 *)(A20R_PT_CLOCK_BASE + 0) = SNI_COUNTER0_DIV >> 8;
1247 + wmb();
1248 +
1249 + *(volatile u8 *)(A20R_PT_CLOCK_BASE + 12) = 0xb4;
1250 + wmb();
1251 +- *(volatile u8 *)(A20R_PT_CLOCK_BASE + 8) = SNI_COUNTER2_DIV;
1252 ++ *(volatile u8 *)(A20R_PT_CLOCK_BASE + 8) = SNI_COUNTER2_DIV & 0xff;
1253 + wmb();
1254 + *(volatile u8 *)(A20R_PT_CLOCK_BASE + 8) = SNI_COUNTER2_DIV >> 8;
1255 + wmb();
1256 +diff --git a/arch/parisc/include/asm/rt_sigframe.h b/arch/parisc/include/asm/rt_sigframe.h
1257 +index 4b9e3d707571b..2b3010ade00e7 100644
1258 +--- a/arch/parisc/include/asm/rt_sigframe.h
1259 ++++ b/arch/parisc/include/asm/rt_sigframe.h
1260 +@@ -2,7 +2,7 @@
1261 + #ifndef _ASM_PARISC_RT_SIGFRAME_H
1262 + #define _ASM_PARISC_RT_SIGFRAME_H
1263 +
1264 +-#define SIGRETURN_TRAMP 3
1265 ++#define SIGRETURN_TRAMP 4
1266 + #define SIGRESTARTBLOCK_TRAMP 5
1267 + #define TRAMP_SIZE (SIGRETURN_TRAMP + SIGRESTARTBLOCK_TRAMP)
1268 +
1269 +diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c
1270 +index bbfe23c40c016..0fb06d87b3a5c 100644
1271 +--- a/arch/parisc/kernel/signal.c
1272 ++++ b/arch/parisc/kernel/signal.c
1273 +@@ -288,21 +288,22 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs,
1274 + already in userspace. The first words of tramp are used to
1275 + save the previous sigrestartblock trampoline that might be
1276 + on the stack. We start the sigreturn trampoline at
1277 +- SIGRESTARTBLOCK_TRAMP. */
1278 ++ SIGRESTARTBLOCK_TRAMP+X. */
1279 + err |= __put_user(in_syscall ? INSN_LDI_R25_1 : INSN_LDI_R25_0,
1280 + &frame->tramp[SIGRESTARTBLOCK_TRAMP+0]);
1281 +- err |= __put_user(INSN_BLE_SR2_R0,
1282 +- &frame->tramp[SIGRESTARTBLOCK_TRAMP+1]);
1283 + err |= __put_user(INSN_LDI_R20,
1284 ++ &frame->tramp[SIGRESTARTBLOCK_TRAMP+1]);
1285 ++ err |= __put_user(INSN_BLE_SR2_R0,
1286 + &frame->tramp[SIGRESTARTBLOCK_TRAMP+2]);
1287 ++ err |= __put_user(INSN_NOP, &frame->tramp[SIGRESTARTBLOCK_TRAMP+3]);
1288 +
1289 +- start = (unsigned long) &frame->tramp[SIGRESTARTBLOCK_TRAMP+0];
1290 +- end = (unsigned long) &frame->tramp[SIGRESTARTBLOCK_TRAMP+3];
1291 ++ start = (unsigned long) &frame->tramp[0];
1292 ++ end = (unsigned long) &frame->tramp[TRAMP_SIZE];
1293 + flush_user_dcache_range_asm(start, end);
1294 + flush_user_icache_range_asm(start, end);
1295 +
1296 + /* TRAMP Words 0-4, Length 5 = SIGRESTARTBLOCK_TRAMP
1297 +- * TRAMP Words 5-7, Length 3 = SIGRETURN_TRAMP
1298 ++ * TRAMP Words 5-9, Length 4 = SIGRETURN_TRAMP
1299 + * So the SIGRETURN_TRAMP is at the end of SIGRESTARTBLOCK_TRAMP
1300 + */
1301 + rp = (unsigned long) &frame->tramp[SIGRESTARTBLOCK_TRAMP];
1302 +diff --git a/arch/parisc/kernel/signal32.h b/arch/parisc/kernel/signal32.h
1303 +index a5bdbb5678b72..f166250f2d064 100644
1304 +--- a/arch/parisc/kernel/signal32.h
1305 ++++ b/arch/parisc/kernel/signal32.h
1306 +@@ -36,7 +36,7 @@ struct compat_regfile {
1307 + compat_int_t rf_sar;
1308 + };
1309 +
1310 +-#define COMPAT_SIGRETURN_TRAMP 3
1311 ++#define COMPAT_SIGRETURN_TRAMP 4
1312 + #define COMPAT_SIGRESTARTBLOCK_TRAMP 5
1313 + #define COMPAT_TRAMP_SIZE (COMPAT_SIGRETURN_TRAMP + \
1314 + COMPAT_SIGRESTARTBLOCK_TRAMP)
1315 +diff --git a/arch/powerpc/boot/dts/charon.dts b/arch/powerpc/boot/dts/charon.dts
1316 +index 408b486b13dff..cd589539f313f 100644
1317 +--- a/arch/powerpc/boot/dts/charon.dts
1318 ++++ b/arch/powerpc/boot/dts/charon.dts
1319 +@@ -35,7 +35,7 @@
1320 + };
1321 + };
1322 +
1323 +- memory {
1324 ++ memory@0 {
1325 + device_type = "memory";
1326 + reg = <0x00000000 0x08000000>; // 128MB
1327 + };
1328 +diff --git a/arch/powerpc/boot/dts/digsy_mtc.dts b/arch/powerpc/boot/dts/digsy_mtc.dts
1329 +index 0e5e9d3acf79f..19a14e62e65f4 100644
1330 +--- a/arch/powerpc/boot/dts/digsy_mtc.dts
1331 ++++ b/arch/powerpc/boot/dts/digsy_mtc.dts
1332 +@@ -16,7 +16,7 @@
1333 + model = "intercontrol,digsy-mtc";
1334 + compatible = "intercontrol,digsy-mtc";
1335 +
1336 +- memory {
1337 ++ memory@0 {
1338 + reg = <0x00000000 0x02000000>; // 32MB
1339 + };
1340 +
1341 +diff --git a/arch/powerpc/boot/dts/lite5200.dts b/arch/powerpc/boot/dts/lite5200.dts
1342 +index cb2782dd6132c..e7b194775d783 100644
1343 +--- a/arch/powerpc/boot/dts/lite5200.dts
1344 ++++ b/arch/powerpc/boot/dts/lite5200.dts
1345 +@@ -32,7 +32,7 @@
1346 + };
1347 + };
1348 +
1349 +- memory {
1350 ++ memory@0 {
1351 + device_type = "memory";
1352 + reg = <0x00000000 0x04000000>; // 64MB
1353 + };
1354 +diff --git a/arch/powerpc/boot/dts/lite5200b.dts b/arch/powerpc/boot/dts/lite5200b.dts
1355 +index 2b86c81f90485..547cbe726ff23 100644
1356 +--- a/arch/powerpc/boot/dts/lite5200b.dts
1357 ++++ b/arch/powerpc/boot/dts/lite5200b.dts
1358 +@@ -31,7 +31,7 @@
1359 + led4 { gpios = <&gpio_simple 2 1>; };
1360 + };
1361 +
1362 +- memory {
1363 ++ memory@0 {
1364 + reg = <0x00000000 0x10000000>; // 256MB
1365 + };
1366 +
1367 +diff --git a/arch/powerpc/boot/dts/media5200.dts b/arch/powerpc/boot/dts/media5200.dts
1368 +index 61cae9dcddef4..f3188018faceb 100644
1369 +--- a/arch/powerpc/boot/dts/media5200.dts
1370 ++++ b/arch/powerpc/boot/dts/media5200.dts
1371 +@@ -32,7 +32,7 @@
1372 + };
1373 + };
1374 +
1375 +- memory {
1376 ++ memory@0 {
1377 + reg = <0x00000000 0x08000000>; // 128MB RAM
1378 + };
1379 +
1380 +diff --git a/arch/powerpc/boot/dts/mpc5200b.dtsi b/arch/powerpc/boot/dts/mpc5200b.dtsi
1381 +index 648fe31795f49..8b796f3b11da7 100644
1382 +--- a/arch/powerpc/boot/dts/mpc5200b.dtsi
1383 ++++ b/arch/powerpc/boot/dts/mpc5200b.dtsi
1384 +@@ -33,7 +33,7 @@
1385 + };
1386 + };
1387 +
1388 +- memory: memory {
1389 ++ memory: memory@0 {
1390 + device_type = "memory";
1391 + reg = <0x00000000 0x04000000>; // 64MB
1392 + };
1393 +diff --git a/arch/powerpc/boot/dts/o2d.dts b/arch/powerpc/boot/dts/o2d.dts
1394 +index 24a46f65e5299..e0a8d3034417f 100644
1395 +--- a/arch/powerpc/boot/dts/o2d.dts
1396 ++++ b/arch/powerpc/boot/dts/o2d.dts
1397 +@@ -12,7 +12,7 @@
1398 + model = "ifm,o2d";
1399 + compatible = "ifm,o2d";
1400 +
1401 +- memory {
1402 ++ memory@0 {
1403 + reg = <0x00000000 0x08000000>; // 128MB
1404 + };
1405 +
1406 +diff --git a/arch/powerpc/boot/dts/o2d.dtsi b/arch/powerpc/boot/dts/o2d.dtsi
1407 +index 6661955a2be47..b55a9e5bd828c 100644
1408 +--- a/arch/powerpc/boot/dts/o2d.dtsi
1409 ++++ b/arch/powerpc/boot/dts/o2d.dtsi
1410 +@@ -19,7 +19,7 @@
1411 + model = "ifm,o2d";
1412 + compatible = "ifm,o2d";
1413 +
1414 +- memory {
1415 ++ memory@0 {
1416 + reg = <0x00000000 0x04000000>; // 64MB
1417 + };
1418 +
1419 +diff --git a/arch/powerpc/boot/dts/o2dnt2.dts b/arch/powerpc/boot/dts/o2dnt2.dts
1420 +index eeba7f5507d5d..c2eedbd1f5fcb 100644
1421 +--- a/arch/powerpc/boot/dts/o2dnt2.dts
1422 ++++ b/arch/powerpc/boot/dts/o2dnt2.dts
1423 +@@ -12,7 +12,7 @@
1424 + model = "ifm,o2dnt2";
1425 + compatible = "ifm,o2d";
1426 +
1427 +- memory {
1428 ++ memory@0 {
1429 + reg = <0x00000000 0x08000000>; // 128MB
1430 + };
1431 +
1432 +diff --git a/arch/powerpc/boot/dts/o3dnt.dts b/arch/powerpc/boot/dts/o3dnt.dts
1433 +index fd00396b0593e..e4c1bdd412716 100644
1434 +--- a/arch/powerpc/boot/dts/o3dnt.dts
1435 ++++ b/arch/powerpc/boot/dts/o3dnt.dts
1436 +@@ -12,7 +12,7 @@
1437 + model = "ifm,o3dnt";
1438 + compatible = "ifm,o2d";
1439 +
1440 +- memory {
1441 ++ memory@0 {
1442 + reg = <0x00000000 0x04000000>; // 64MB
1443 + };
1444 +
1445 +diff --git a/arch/powerpc/boot/dts/pcm032.dts b/arch/powerpc/boot/dts/pcm032.dts
1446 +index 780e13d99e7b8..1895bc95900cc 100644
1447 +--- a/arch/powerpc/boot/dts/pcm032.dts
1448 ++++ b/arch/powerpc/boot/dts/pcm032.dts
1449 +@@ -20,7 +20,7 @@
1450 + model = "phytec,pcm032";
1451 + compatible = "phytec,pcm032";
1452 +
1453 +- memory {
1454 ++ memory@0 {
1455 + reg = <0x00000000 0x08000000>; // 128MB
1456 + };
1457 +
1458 +diff --git a/arch/powerpc/boot/dts/tqm5200.dts b/arch/powerpc/boot/dts/tqm5200.dts
1459 +index 9ed0bc78967e1..5bb25a9e40a01 100644
1460 +--- a/arch/powerpc/boot/dts/tqm5200.dts
1461 ++++ b/arch/powerpc/boot/dts/tqm5200.dts
1462 +@@ -32,7 +32,7 @@
1463 + };
1464 + };
1465 +
1466 +- memory {
1467 ++ memory@0 {
1468 + device_type = "memory";
1469 + reg = <0x00000000 0x04000000>; // 64MB
1470 + };
1471 +diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
1472 +index 7be36c1e1db6d..86e40db2dec56 100644
1473 +--- a/arch/powerpc/kernel/Makefile
1474 ++++ b/arch/powerpc/kernel/Makefile
1475 +@@ -196,3 +196,6 @@ clean-files := vmlinux.lds
1476 + # Force dependency (incbin is bad)
1477 + $(obj)/vdso32_wrapper.o : $(obj)/vdso32/vdso32.so.dbg
1478 + $(obj)/vdso64_wrapper.o : $(obj)/vdso64/vdso64.so.dbg
1479 ++
1480 ++# for cleaning
1481 ++subdir- += vdso32 vdso64
1482 +diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
1483 +index 9bdb95f5694f7..0d073b9fd52c5 100644
1484 +--- a/arch/powerpc/kernel/head_8xx.S
1485 ++++ b/arch/powerpc/kernel/head_8xx.S
1486 +@@ -733,6 +733,7 @@ _GLOBAL(mmu_pin_tlb)
1487 + #ifdef CONFIG_PIN_TLB_DATA
1488 + LOAD_REG_IMMEDIATE(r6, PAGE_OFFSET)
1489 + LOAD_REG_IMMEDIATE(r7, MI_SVALID | MI_PS8MEG | _PMD_ACCESSED)
1490 ++ li r8, 0
1491 + #ifdef CONFIG_PIN_TLB_IMMR
1492 + li r0, 3
1493 + #else
1494 +@@ -741,26 +742,26 @@ _GLOBAL(mmu_pin_tlb)
1495 + mtctr r0
1496 + cmpwi r4, 0
1497 + beq 4f
1498 +- LOAD_REG_IMMEDIATE(r8, 0xf0 | _PAGE_RO | _PAGE_SPS | _PAGE_SH | _PAGE_PRESENT)
1499 + LOAD_REG_ADDR(r9, _sinittext)
1500 +
1501 + 2: ori r0, r6, MD_EVALID
1502 ++ ori r12, r8, 0xf0 | _PAGE_RO | _PAGE_SPS | _PAGE_SH | _PAGE_PRESENT
1503 + mtspr SPRN_MD_CTR, r5
1504 + mtspr SPRN_MD_EPN, r0
1505 + mtspr SPRN_MD_TWC, r7
1506 +- mtspr SPRN_MD_RPN, r8
1507 ++ mtspr SPRN_MD_RPN, r12
1508 + addi r5, r5, 0x100
1509 + addis r6, r6, SZ_8M@h
1510 + addis r8, r8, SZ_8M@h
1511 + cmplw r6, r9
1512 + bdnzt lt, 2b
1513 +-
1514 +-4: LOAD_REG_IMMEDIATE(r8, 0xf0 | _PAGE_SPS | _PAGE_SH | _PAGE_PRESENT)
1515 ++4:
1516 + 2: ori r0, r6, MD_EVALID
1517 ++ ori r12, r8, 0xf0 | _PAGE_DIRTY | _PAGE_SPS | _PAGE_SH | _PAGE_PRESENT
1518 + mtspr SPRN_MD_CTR, r5
1519 + mtspr SPRN_MD_EPN, r0
1520 + mtspr SPRN_MD_TWC, r7
1521 +- mtspr SPRN_MD_RPN, r8
1522 ++ mtspr SPRN_MD_RPN, r12
1523 + addi r5, r5, 0x100
1524 + addis r6, r6, SZ_8M@h
1525 + addis r8, r8, SZ_8M@h
1526 +@@ -781,7 +782,7 @@ _GLOBAL(mmu_pin_tlb)
1527 + #endif
1528 + #if defined(CONFIG_PIN_TLB_IMMR) || defined(CONFIG_PIN_TLB_DATA)
1529 + lis r0, (MD_RSV4I | MD_TWAM)@h
1530 +- mtspr SPRN_MI_CTR, r0
1531 ++ mtspr SPRN_MD_CTR, r0
1532 + #endif
1533 + mtspr SPRN_SRR1, r10
1534 + mtspr SPRN_SRR0, r11
1535 +diff --git a/arch/powerpc/kernel/signal.h b/arch/powerpc/kernel/signal.h
1536 +index 1f07317964e49..618aeccdf6918 100644
1537 +--- a/arch/powerpc/kernel/signal.h
1538 ++++ b/arch/powerpc/kernel/signal.h
1539 +@@ -25,8 +25,14 @@ static inline int __get_user_sigset(sigset_t *dst, const sigset_t __user *src)
1540 +
1541 + return __get_user(dst->sig[0], (u64 __user *)&src->sig[0]);
1542 + }
1543 +-#define unsafe_get_user_sigset(dst, src, label) \
1544 +- unsafe_get_user((dst)->sig[0], (u64 __user *)&(src)->sig[0], label)
1545 ++#define unsafe_get_user_sigset(dst, src, label) do { \
1546 ++ sigset_t *__dst = dst; \
1547 ++ const sigset_t __user *__src = src; \
1548 ++ int i; \
1549 ++ \
1550 ++ for (i = 0; i < _NSIG_WORDS; i++) \
1551 ++ unsafe_get_user(__dst->sig[i], &__src->sig[i], label); \
1552 ++} while (0)
1553 +
1554 + #ifdef CONFIG_VSX
1555 + extern unsigned long copy_vsx_to_user(void __user *to,
1556 +diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
1557 +index 0608581967f09..f2da879264bcd 100644
1558 +--- a/arch/powerpc/kernel/signal_32.c
1559 ++++ b/arch/powerpc/kernel/signal_32.c
1560 +@@ -1062,8 +1062,10 @@ SYSCALL_DEFINE3(swapcontext, struct ucontext __user *, old_ctx,
1561 + * or if another thread unmaps the region containing the context.
1562 + * We kill the task with a SIGSEGV in this situation.
1563 + */
1564 +- if (do_setcontext(new_ctx, regs, 0))
1565 +- do_exit(SIGSEGV);
1566 ++ if (do_setcontext(new_ctx, regs, 0)) {
1567 ++ force_exit_sig(SIGSEGV);
1568 ++ return -EFAULT;
1569 ++ }
1570 +
1571 + set_thread_flag(TIF_RESTOREALL);
1572 + return 0;
1573 +diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
1574 +index 1831bba0582e1..bb9c077ac1322 100644
1575 +--- a/arch/powerpc/kernel/signal_64.c
1576 ++++ b/arch/powerpc/kernel/signal_64.c
1577 +@@ -703,15 +703,18 @@ SYSCALL_DEFINE3(swapcontext, struct ucontext __user *, old_ctx,
1578 + * We kill the task with a SIGSEGV in this situation.
1579 + */
1580 +
1581 +- if (__get_user_sigset(&set, &new_ctx->uc_sigmask))
1582 +- do_exit(SIGSEGV);
1583 ++ if (__get_user_sigset(&set, &new_ctx->uc_sigmask)) {
1584 ++ force_exit_sig(SIGSEGV);
1585 ++ return -EFAULT;
1586 ++ }
1587 + set_current_blocked(&set);
1588 +
1589 + if (!user_read_access_begin(new_ctx, ctx_size))
1590 + return -EFAULT;
1591 + if (__unsafe_restore_sigcontext(current, NULL, 0, &new_ctx->uc_mcontext)) {
1592 + user_read_access_end();
1593 +- do_exit(SIGSEGV);
1594 ++ force_exit_sig(SIGSEGV);
1595 ++ return -EFAULT;
1596 + }
1597 + user_read_access_end();
1598 +
1599 +diff --git a/arch/powerpc/kernel/watchdog.c b/arch/powerpc/kernel/watchdog.c
1600 +index f9ea0e5357f92..3fa6d240bade2 100644
1601 +--- a/arch/powerpc/kernel/watchdog.c
1602 ++++ b/arch/powerpc/kernel/watchdog.c
1603 +@@ -187,6 +187,12 @@ static void watchdog_smp_panic(int cpu, u64 tb)
1604 + if (sysctl_hardlockup_all_cpu_backtrace)
1605 + trigger_allbutself_cpu_backtrace();
1606 +
1607 ++ /*
1608 ++ * Force flush any remote buffers that might be stuck in IRQ context
1609 ++ * and therefore could not run their irq_work.
1610 ++ */
1611 ++ printk_trigger_flush();
1612 ++
1613 + if (hardlockup_panic)
1614 + nmi_panic(NULL, "Hard LOCKUP");
1615 +
1616 +diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
1617 +index eb776d0c5d8e9..32a4b4d412b92 100644
1618 +--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
1619 ++++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
1620 +@@ -2005,7 +2005,7 @@ hcall_real_table:
1621 + .globl hcall_real_table_end
1622 + hcall_real_table_end:
1623 +
1624 +-_GLOBAL(kvmppc_h_set_xdabr)
1625 ++_GLOBAL_TOC(kvmppc_h_set_xdabr)
1626 + EXPORT_SYMBOL_GPL(kvmppc_h_set_xdabr)
1627 + andi. r0, r5, DABRX_USER | DABRX_KERNEL
1628 + beq 6f
1629 +@@ -2015,7 +2015,7 @@ EXPORT_SYMBOL_GPL(kvmppc_h_set_xdabr)
1630 + 6: li r3, H_PARAMETER
1631 + blr
1632 +
1633 +-_GLOBAL(kvmppc_h_set_dabr)
1634 ++_GLOBAL_TOC(kvmppc_h_set_dabr)
1635 + EXPORT_SYMBOL_GPL(kvmppc_h_set_dabr)
1636 + li r5, DABRX_USER | DABRX_KERNEL
1637 + 3:
1638 +diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
1639 +index 6f14c8fb6359d..59d3cfcd78879 100644
1640 +--- a/arch/powerpc/mm/numa.c
1641 ++++ b/arch/powerpc/mm/numa.c
1642 +@@ -376,9 +376,9 @@ static void initialize_form2_numa_distance_lookup_table(void)
1643 + {
1644 + int i, j;
1645 + struct device_node *root;
1646 +- const __u8 *numa_dist_table;
1647 ++ const __u8 *form2_distances;
1648 + const __be32 *numa_lookup_index;
1649 +- int numa_dist_table_length;
1650 ++ int form2_distances_length;
1651 + int max_numa_index, distance_index;
1652 +
1653 + if (firmware_has_feature(FW_FEATURE_OPAL))
1654 +@@ -392,45 +392,41 @@ static void initialize_form2_numa_distance_lookup_table(void)
1655 + max_numa_index = of_read_number(&numa_lookup_index[0], 1);
1656 +
1657 + /* first element of the array is the size and is encode-int */
1658 +- numa_dist_table = of_get_property(root, "ibm,numa-distance-table", NULL);
1659 +- numa_dist_table_length = of_read_number((const __be32 *)&numa_dist_table[0], 1);
1660 ++ form2_distances = of_get_property(root, "ibm,numa-distance-table", NULL);
1661 ++ form2_distances_length = of_read_number((const __be32 *)&form2_distances[0], 1);
1662 + /* Skip the size which is encoded int */
1663 +- numa_dist_table += sizeof(__be32);
1664 ++ form2_distances += sizeof(__be32);
1665 +
1666 +- pr_debug("numa_dist_table_len = %d, numa_dist_indexes_len = %d\n",
1667 +- numa_dist_table_length, max_numa_index);
1668 ++ pr_debug("form2_distances_len = %d, numa_dist_indexes_len = %d\n",
1669 ++ form2_distances_length, max_numa_index);
1670 +
1671 + for (i = 0; i < max_numa_index; i++)
1672 + /* +1 skip the max_numa_index in the property */
1673 + numa_id_index_table[i] = of_read_number(&numa_lookup_index[i + 1], 1);
1674 +
1675 +
1676 +- if (numa_dist_table_length != max_numa_index * max_numa_index) {
1677 ++ if (form2_distances_length != max_numa_index * max_numa_index) {
1678 + WARN(1, "Wrong NUMA distance information\n");
1679 +- /* consider everybody else just remote. */
1680 +- for (i = 0; i < max_numa_index; i++) {
1681 +- for (j = 0; j < max_numa_index; j++) {
1682 +- int nodeA = numa_id_index_table[i];
1683 +- int nodeB = numa_id_index_table[j];
1684 +-
1685 +- if (nodeA == nodeB)
1686 +- numa_distance_table[nodeA][nodeB] = LOCAL_DISTANCE;
1687 +- else
1688 +- numa_distance_table[nodeA][nodeB] = REMOTE_DISTANCE;
1689 +- }
1690 +- }
1691 ++ form2_distances = NULL; // don't use it
1692 + }
1693 +-
1694 + distance_index = 0;
1695 + for (i = 0; i < max_numa_index; i++) {
1696 + for (j = 0; j < max_numa_index; j++) {
1697 + int nodeA = numa_id_index_table[i];
1698 + int nodeB = numa_id_index_table[j];
1699 +-
1700 +- numa_distance_table[nodeA][nodeB] = numa_dist_table[distance_index++];
1701 +- pr_debug("dist[%d][%d]=%d ", nodeA, nodeB, numa_distance_table[nodeA][nodeB]);
1702 ++ int dist;
1703 ++
1704 ++ if (form2_distances)
1705 ++ dist = form2_distances[distance_index++];
1706 ++ else if (nodeA == nodeB)
1707 ++ dist = LOCAL_DISTANCE;
1708 ++ else
1709 ++ dist = REMOTE_DISTANCE;
1710 ++ numa_distance_table[nodeA][nodeB] = dist;
1711 ++ pr_debug("dist[%d][%d]=%d ", nodeA, nodeB, dist);
1712 + }
1713 + }
1714 ++
1715 + of_node_put(root);
1716 + }
1717 +
1718 +diff --git a/arch/powerpc/sysdev/dcr-low.S b/arch/powerpc/sysdev/dcr-low.S
1719 +index efeeb1b885a17..329b9c4ae5429 100644
1720 +--- a/arch/powerpc/sysdev/dcr-low.S
1721 ++++ b/arch/powerpc/sysdev/dcr-low.S
1722 +@@ -11,7 +11,7 @@
1723 + #include <asm/export.h>
1724 +
1725 + #define DCR_ACCESS_PROLOG(table) \
1726 +- cmpli cr0,r3,1024; \
1727 ++ cmplwi cr0,r3,1024; \
1728 + rlwinm r3,r3,4,18,27; \
1729 + lis r5,table@h; \
1730 + ori r5,r5,table@l; \
1731 +diff --git a/arch/powerpc/sysdev/xive/Kconfig b/arch/powerpc/sysdev/xive/Kconfig
1732 +index 97796c6b63f04..785c292d104b7 100644
1733 +--- a/arch/powerpc/sysdev/xive/Kconfig
1734 ++++ b/arch/powerpc/sysdev/xive/Kconfig
1735 +@@ -3,7 +3,6 @@ config PPC_XIVE
1736 + bool
1737 + select PPC_SMP_MUXED_IPI
1738 + select HARDIRQS_SW_RESEND
1739 +- select IRQ_DOMAIN_NOMAP
1740 +
1741 + config PPC_XIVE_NATIVE
1742 + bool
1743 +diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c
1744 +index c5d75c02ad8b5..7b69299c29123 100644
1745 +--- a/arch/powerpc/sysdev/xive/common.c
1746 ++++ b/arch/powerpc/sysdev/xive/common.c
1747 +@@ -1443,8 +1443,7 @@ static const struct irq_domain_ops xive_irq_domain_ops = {
1748 +
1749 + static void __init xive_init_host(struct device_node *np)
1750 + {
1751 +- xive_irq_domain = irq_domain_add_nomap(np, XIVE_MAX_IRQ,
1752 +- &xive_irq_domain_ops, NULL);
1753 ++ xive_irq_domain = irq_domain_add_tree(np, &xive_irq_domain_ops, NULL);
1754 + if (WARN_ON(xive_irq_domain == NULL))
1755 + return;
1756 + irq_set_default_host(xive_irq_domain);
1757 +diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
1758 +index 0eb4568fbd290..41f3a75fe2ec8 100644
1759 +--- a/arch/riscv/Makefile
1760 ++++ b/arch/riscv/Makefile
1761 +@@ -108,11 +108,13 @@ PHONY += vdso_install
1762 + vdso_install:
1763 + $(Q)$(MAKE) $(build)=arch/riscv/kernel/vdso $@
1764 +
1765 ++ifeq ($(KBUILD_EXTMOD),)
1766 + ifeq ($(CONFIG_MMU),y)
1767 + prepare: vdso_prepare
1768 + vdso_prepare: prepare0
1769 + $(Q)$(MAKE) $(build)=arch/riscv/kernel/vdso include/generated/vdso-offsets.h
1770 + endif
1771 ++endif
1772 +
1773 + ifneq ($(CONFIG_XIP_KERNEL),y)
1774 + ifeq ($(CONFIG_RISCV_M_MODE)$(CONFIG_SOC_CANAAN),yy)
1775 +diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
1776 +index b86de61b8caa2..797041b5109a2 100644
1777 +--- a/arch/s390/Kconfig
1778 ++++ b/arch/s390/Kconfig
1779 +@@ -47,7 +47,7 @@ config ARCH_SUPPORTS_UPROBES
1780 + config KASAN_SHADOW_OFFSET
1781 + hex
1782 + depends on KASAN
1783 +- default 0x18000000000000
1784 ++ default 0x1C000000000000
1785 +
1786 + config S390
1787 + def_bool y
1788 +diff --git a/arch/s390/Makefile b/arch/s390/Makefile
1789 +index 450b351dfa8ef..d4fd1426a8226 100644
1790 +--- a/arch/s390/Makefile
1791 ++++ b/arch/s390/Makefile
1792 +@@ -79,10 +79,12 @@ KBUILD_AFLAGS_DECOMPRESSOR += $(aflags-y)
1793 + KBUILD_CFLAGS_DECOMPRESSOR += $(cflags-y)
1794 +
1795 + ifneq ($(call cc-option,-mstack-size=8192 -mstack-guard=128),)
1796 +-cflags-$(CONFIG_CHECK_STACK) += -mstack-size=$(STACK_SIZE)
1797 +-ifeq ($(call cc-option,-mstack-size=8192),)
1798 +-cflags-$(CONFIG_CHECK_STACK) += -mstack-guard=$(CONFIG_STACK_GUARD)
1799 +-endif
1800 ++ CC_FLAGS_CHECK_STACK := -mstack-size=$(STACK_SIZE)
1801 ++ ifeq ($(call cc-option,-mstack-size=8192),)
1802 ++ CC_FLAGS_CHECK_STACK += -mstack-guard=$(CONFIG_STACK_GUARD)
1803 ++ endif
1804 ++ export CC_FLAGS_CHECK_STACK
1805 ++ cflags-$(CONFIG_CHECK_STACK) += $(CC_FLAGS_CHECK_STACK)
1806 + endif
1807 +
1808 + ifdef CONFIG_EXPOLINE
1809 +diff --git a/arch/s390/boot/startup.c b/arch/s390/boot/startup.c
1810 +index 6dc8d0a538640..b13352dd1e1cf 100644
1811 +--- a/arch/s390/boot/startup.c
1812 ++++ b/arch/s390/boot/startup.c
1813 +@@ -148,82 +148,56 @@ static void setup_ident_map_size(unsigned long max_physmem_end)
1814 +
1815 + static void setup_kernel_memory_layout(void)
1816 + {
1817 +- bool vmalloc_size_verified = false;
1818 +- unsigned long vmemmap_off;
1819 +- unsigned long vspace_left;
1820 ++ unsigned long vmemmap_start;
1821 + unsigned long rte_size;
1822 + unsigned long pages;
1823 +- unsigned long vmax;
1824 +
1825 + pages = ident_map_size / PAGE_SIZE;
1826 + /* vmemmap contains a multiple of PAGES_PER_SECTION struct pages */
1827 + vmemmap_size = SECTION_ALIGN_UP(pages) * sizeof(struct page);
1828 +
1829 + /* choose kernel address space layout: 4 or 3 levels. */
1830 +- vmemmap_off = round_up(ident_map_size, _REGION3_SIZE);
1831 ++ vmemmap_start = round_up(ident_map_size, _REGION3_SIZE);
1832 + if (IS_ENABLED(CONFIG_KASAN) ||
1833 + vmalloc_size > _REGION2_SIZE ||
1834 +- vmemmap_off + vmemmap_size + vmalloc_size + MODULES_LEN > _REGION2_SIZE)
1835 +- vmax = _REGION1_SIZE;
1836 +- else
1837 +- vmax = _REGION2_SIZE;
1838 +-
1839 +- /* keep vmemmap_off aligned to a top level region table entry */
1840 +- rte_size = vmax == _REGION1_SIZE ? _REGION2_SIZE : _REGION3_SIZE;
1841 +- MODULES_END = vmax;
1842 +- if (is_prot_virt_host()) {
1843 +- /*
1844 +- * forcing modules and vmalloc area under the ultravisor
1845 +- * secure storage limit, so that any vmalloc allocation
1846 +- * we do could be used to back secure guest storage.
1847 +- */
1848 +- adjust_to_uv_max(&MODULES_END);
1849 +- }
1850 +-
1851 +-#ifdef CONFIG_KASAN
1852 +- if (MODULES_END < vmax) {
1853 +- /* force vmalloc and modules below kasan shadow */
1854 +- MODULES_END = min(MODULES_END, KASAN_SHADOW_START);
1855 ++ vmemmap_start + vmemmap_size + vmalloc_size + MODULES_LEN >
1856 ++ _REGION2_SIZE) {
1857 ++ MODULES_END = _REGION1_SIZE;
1858 ++ rte_size = _REGION2_SIZE;
1859 + } else {
1860 +- /*
1861 +- * leave vmalloc and modules above kasan shadow but make
1862 +- * sure they don't overlap with it
1863 +- */
1864 +- vmalloc_size = min(vmalloc_size, vmax - KASAN_SHADOW_END - MODULES_LEN);
1865 +- vmalloc_size_verified = true;
1866 +- vspace_left = KASAN_SHADOW_START;
1867 ++ MODULES_END = _REGION2_SIZE;
1868 ++ rte_size = _REGION3_SIZE;
1869 + }
1870 ++ /*
1871 ++ * forcing modules and vmalloc area under the ultravisor
1872 ++ * secure storage limit, so that any vmalloc allocation
1873 ++ * we do could be used to back secure guest storage.
1874 ++ */
1875 ++ adjust_to_uv_max(&MODULES_END);
1876 ++#ifdef CONFIG_KASAN
1877 ++ /* force vmalloc and modules below kasan shadow */
1878 ++ MODULES_END = min(MODULES_END, KASAN_SHADOW_START);
1879 + #endif
1880 + MODULES_VADDR = MODULES_END - MODULES_LEN;
1881 + VMALLOC_END = MODULES_VADDR;
1882 +
1883 +- if (vmalloc_size_verified) {
1884 +- VMALLOC_START = VMALLOC_END - vmalloc_size;
1885 +- } else {
1886 +- vmemmap_off = round_up(ident_map_size, rte_size);
1887 +-
1888 +- if (vmemmap_off + vmemmap_size > VMALLOC_END ||
1889 +- vmalloc_size > VMALLOC_END - vmemmap_off - vmemmap_size) {
1890 +- /*
1891 +- * allow vmalloc area to occupy up to 1/2 of
1892 +- * the rest virtual space left.
1893 +- */
1894 +- vmalloc_size = min(vmalloc_size, VMALLOC_END / 2);
1895 +- }
1896 +- VMALLOC_START = VMALLOC_END - vmalloc_size;
1897 +- vspace_left = VMALLOC_START;
1898 +- }
1899 ++ /* allow vmalloc area to occupy up to about 1/2 of the rest virtual space left */
1900 ++ vmalloc_size = min(vmalloc_size, round_down(VMALLOC_END / 2, _REGION3_SIZE));
1901 ++ VMALLOC_START = VMALLOC_END - vmalloc_size;
1902 +
1903 +- pages = vspace_left / (PAGE_SIZE + sizeof(struct page));
1904 ++ /* split remaining virtual space between 1:1 mapping & vmemmap array */
1905 ++ pages = VMALLOC_START / (PAGE_SIZE + sizeof(struct page));
1906 + pages = SECTION_ALIGN_UP(pages);
1907 +- vmemmap_off = round_up(vspace_left - pages * sizeof(struct page), rte_size);
1908 +- /* keep vmemmap left most starting from a fresh region table entry */
1909 +- vmemmap_off = min(vmemmap_off, round_up(ident_map_size, rte_size));
1910 +- /* take care that identity map is lower then vmemmap */
1911 +- ident_map_size = min(ident_map_size, vmemmap_off);
1912 ++ /* keep vmemmap_start aligned to a top level region table entry */
1913 ++ vmemmap_start = round_down(VMALLOC_START - pages * sizeof(struct page), rte_size);
1914 ++ /* vmemmap_start is the future VMEM_MAX_PHYS, make sure it is within MAX_PHYSMEM */
1915 ++ vmemmap_start = min(vmemmap_start, 1UL << MAX_PHYSMEM_BITS);
1916 ++ /* make sure identity map doesn't overlay with vmemmap */
1917 ++ ident_map_size = min(ident_map_size, vmemmap_start);
1918 + vmemmap_size = SECTION_ALIGN_UP(ident_map_size / PAGE_SIZE) * sizeof(struct page);
1919 +- VMALLOC_START = max(vmemmap_off + vmemmap_size, VMALLOC_START);
1920 +- vmemmap = (struct page *)vmemmap_off;
1921 ++ /* make sure vmemmap doesn't overlay with vmalloc area */
1922 ++ VMALLOC_START = max(vmemmap_start + vmemmap_size, VMALLOC_START);
1923 ++ vmemmap = (struct page *)vmemmap_start;
1924 + }
1925 +
1926 + /*
1927 +diff --git a/arch/s390/include/asm/kexec.h b/arch/s390/include/asm/kexec.h
1928 +index ea398a05f6432..7f3c9ac34bd8d 100644
1929 +--- a/arch/s390/include/asm/kexec.h
1930 ++++ b/arch/s390/include/asm/kexec.h
1931 +@@ -74,6 +74,12 @@ void *kexec_file_add_components(struct kimage *image,
1932 + int arch_kexec_do_relocs(int r_type, void *loc, unsigned long val,
1933 + unsigned long addr);
1934 +
1935 ++#define ARCH_HAS_KIMAGE_ARCH
1936 ++
1937 ++struct kimage_arch {
1938 ++ void *ipl_buf;
1939 ++};
1940 ++
1941 + extern const struct kexec_file_ops s390_kexec_image_ops;
1942 + extern const struct kexec_file_ops s390_kexec_elf_ops;
1943 +
1944 +diff --git a/arch/s390/kernel/crash_dump.c b/arch/s390/kernel/crash_dump.c
1945 +index d72a6df058d79..785d54c9350c4 100644
1946 +--- a/arch/s390/kernel/crash_dump.c
1947 ++++ b/arch/s390/kernel/crash_dump.c
1948 +@@ -191,8 +191,8 @@ static int copy_oldmem_user(void __user *dst, void *src, size_t count)
1949 + return rc;
1950 + } else {
1951 + /* Check for swapped kdump oldmem areas */
1952 +- if (oldmem_data.start && from - oldmem_data.size < oldmem_data.size) {
1953 +- from -= oldmem_data.size;
1954 ++ if (oldmem_data.start && from - oldmem_data.start < oldmem_data.size) {
1955 ++ from -= oldmem_data.start;
1956 + len = min(count, oldmem_data.size - from);
1957 + } else if (oldmem_data.start && from < oldmem_data.size) {
1958 + len = min(count, oldmem_data.size - from);
1959 +diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
1960 +index e2cc35775b996..5ad1dde23dc59 100644
1961 +--- a/arch/s390/kernel/ipl.c
1962 ++++ b/arch/s390/kernel/ipl.c
1963 +@@ -2156,7 +2156,7 @@ void *ipl_report_finish(struct ipl_report *report)
1964 +
1965 + buf = vzalloc(report->size);
1966 + if (!buf)
1967 +- return ERR_PTR(-ENOMEM);
1968 ++ goto out;
1969 + ptr = buf;
1970 +
1971 + memcpy(ptr, report->ipib, report->ipib->hdr.len);
1972 +@@ -2195,6 +2195,7 @@ void *ipl_report_finish(struct ipl_report *report)
1973 + }
1974 +
1975 + BUG_ON(ptr > buf + report->size);
1976 ++out:
1977 + return buf;
1978 + }
1979 +
1980 +diff --git a/arch/s390/kernel/machine_kexec_file.c b/arch/s390/kernel/machine_kexec_file.c
1981 +index f9e4baa64b675..e7435f3a3d2d2 100644
1982 +--- a/arch/s390/kernel/machine_kexec_file.c
1983 ++++ b/arch/s390/kernel/machine_kexec_file.c
1984 +@@ -12,6 +12,7 @@
1985 + #include <linux/kexec.h>
1986 + #include <linux/module_signature.h>
1987 + #include <linux/verification.h>
1988 ++#include <linux/vmalloc.h>
1989 + #include <asm/boot_data.h>
1990 + #include <asm/ipl.h>
1991 + #include <asm/setup.h>
1992 +@@ -170,6 +171,7 @@ static int kexec_file_add_ipl_report(struct kimage *image,
1993 + struct kexec_buf buf;
1994 + unsigned long addr;
1995 + void *ptr, *end;
1996 ++ int ret;
1997 +
1998 + buf.image = image;
1999 +
2000 +@@ -199,9 +201,13 @@ static int kexec_file_add_ipl_report(struct kimage *image,
2001 + ptr += len;
2002 + }
2003 +
2004 ++ ret = -ENOMEM;
2005 + buf.buffer = ipl_report_finish(data->report);
2006 ++ if (!buf.buffer)
2007 ++ goto out;
2008 + buf.bufsz = data->report->size;
2009 + buf.memsz = buf.bufsz;
2010 ++ image->arch.ipl_buf = buf.buffer;
2011 +
2012 + data->memsz += buf.memsz;
2013 +
2014 +@@ -209,7 +215,9 @@ static int kexec_file_add_ipl_report(struct kimage *image,
2015 + data->kernel_buf + offsetof(struct lowcore, ipl_parmblock_ptr);
2016 + *lc_ipl_parmblock_ptr = (__u32)buf.mem;
2017 +
2018 +- return kexec_add_buffer(&buf);
2019 ++ ret = kexec_add_buffer(&buf);
2020 ++out:
2021 ++ return ret;
2022 + }
2023 +
2024 + void *kexec_file_add_components(struct kimage *image,
2025 +@@ -321,3 +329,11 @@ int arch_kexec_kernel_image_probe(struct kimage *image, void *buf,
2026 +
2027 + return kexec_image_probe_default(image, buf, buf_len);
2028 + }
2029 ++
2030 ++int arch_kimage_file_post_load_cleanup(struct kimage *image)
2031 ++{
2032 ++ vfree(image->arch.ipl_buf);
2033 ++ image->arch.ipl_buf = NULL;
2034 ++
2035 ++ return kexec_image_post_load_cleanup_default(image);
2036 ++}
2037 +diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
2038 +index 67e5fff96ee06..d77269f168948 100644
2039 +--- a/arch/s390/kernel/setup.c
2040 ++++ b/arch/s390/kernel/setup.c
2041 +@@ -633,14 +633,6 @@ static struct notifier_block kdump_mem_nb = {
2042 +
2043 + #endif
2044 +
2045 +-/*
2046 +- * Make sure that the area above identity mapping is protected
2047 +- */
2048 +-static void __init reserve_above_ident_map(void)
2049 +-{
2050 +- memblock_reserve(ident_map_size, ULONG_MAX);
2051 +-}
2052 +-
2053 + /*
2054 + * Reserve memory for kdump kernel to be loaded with kexec
2055 + */
2056 +@@ -1005,11 +997,11 @@ void __init setup_arch(char **cmdline_p)
2057 + setup_control_program_code();
2058 +
2059 + /* Do some memory reservations *before* memory is added to memblock */
2060 +- reserve_above_ident_map();
2061 + reserve_kernel();
2062 + reserve_initrd();
2063 + reserve_certificate_list();
2064 + reserve_mem_detect_info();
2065 ++ memblock_set_current_limit(ident_map_size);
2066 + memblock_allow_resize();
2067 +
2068 + /* Get information about *all* installed memory */
2069 +diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
2070 +index bcefc2173de45..12d28ff5281fa 100644
2071 +--- a/arch/s390/kernel/traps.c
2072 ++++ b/arch/s390/kernel/traps.c
2073 +@@ -84,7 +84,7 @@ static void default_trap_handler(struct pt_regs *regs)
2074 + {
2075 + if (user_mode(regs)) {
2076 + report_user_fault(regs, SIGSEGV, 0);
2077 +- do_exit(SIGSEGV);
2078 ++ force_exit_sig(SIGSEGV);
2079 + } else
2080 + die(regs, "Unknown program exception");
2081 + }
2082 +diff --git a/arch/s390/kernel/vdso64/Makefile b/arch/s390/kernel/vdso64/Makefile
2083 +index 6568de2367010..0dea82b87e54b 100644
2084 +--- a/arch/s390/kernel/vdso64/Makefile
2085 ++++ b/arch/s390/kernel/vdso64/Makefile
2086 +@@ -8,8 +8,9 @@ ARCH_REL_TYPE_ABS += R_390_GOT|R_390_PLT
2087 + include $(srctree)/lib/vdso/Makefile
2088 + obj-vdso64 = vdso_user_wrapper.o note.o
2089 + obj-cvdso64 = vdso64_generic.o getcpu.o
2090 +-CFLAGS_REMOVE_getcpu.o = -pg $(CC_FLAGS_FTRACE) $(CC_FLAGS_EXPOLINE)
2091 +-CFLAGS_REMOVE_vdso64_generic.o = -pg $(CC_FLAGS_FTRACE) $(CC_FLAGS_EXPOLINE)
2092 ++VDSO_CFLAGS_REMOVE := -pg $(CC_FLAGS_FTRACE) $(CC_FLAGS_EXPOLINE) $(CC_FLAGS_CHECK_STACK)
2093 ++CFLAGS_REMOVE_getcpu.o = $(VDSO_CFLAGS_REMOVE)
2094 ++CFLAGS_REMOVE_vdso64_generic.o = $(VDSO_CFLAGS_REMOVE)
2095 +
2096 + # Build rules
2097 +
2098 +diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug
2099 +index 958f790273ab9..10290e5c1f438 100644
2100 +--- a/arch/sh/Kconfig.debug
2101 ++++ b/arch/sh/Kconfig.debug
2102 +@@ -54,6 +54,7 @@ config DUMP_CODE
2103 +
2104 + config DWARF_UNWINDER
2105 + bool "Enable the DWARF unwinder for stacktraces"
2106 ++ depends on DEBUG_KERNEL
2107 + select FRAME_POINTER
2108 + default n
2109 + help
2110 +diff --git a/arch/sh/include/asm/sfp-machine.h b/arch/sh/include/asm/sfp-machine.h
2111 +index cbc7cf8c97ce6..2d2423478b71d 100644
2112 +--- a/arch/sh/include/asm/sfp-machine.h
2113 ++++ b/arch/sh/include/asm/sfp-machine.h
2114 +@@ -13,6 +13,14 @@
2115 + #ifndef _SFP_MACHINE_H
2116 + #define _SFP_MACHINE_H
2117 +
2118 ++#ifdef __BIG_ENDIAN__
2119 ++#define __BYTE_ORDER __BIG_ENDIAN
2120 ++#define __LITTLE_ENDIAN 0
2121 ++#else
2122 ++#define __BYTE_ORDER __LITTLE_ENDIAN
2123 ++#define __BIG_ENDIAN 0
2124 ++#endif
2125 ++
2126 + #define _FP_W_TYPE_SIZE 32
2127 + #define _FP_W_TYPE unsigned long
2128 + #define _FP_WS_TYPE signed long
2129 +diff --git a/arch/sh/kernel/cpu/sh4a/smp-shx3.c b/arch/sh/kernel/cpu/sh4a/smp-shx3.c
2130 +index f8a2bec0f260b..1261dc7b84e8b 100644
2131 +--- a/arch/sh/kernel/cpu/sh4a/smp-shx3.c
2132 ++++ b/arch/sh/kernel/cpu/sh4a/smp-shx3.c
2133 +@@ -73,8 +73,9 @@ static void shx3_prepare_cpus(unsigned int max_cpus)
2134 + BUILD_BUG_ON(SMP_MSG_NR >= 8);
2135 +
2136 + for (i = 0; i < SMP_MSG_NR; i++)
2137 +- request_irq(104 + i, ipi_interrupt_handler,
2138 +- IRQF_PERCPU, "IPI", (void *)(long)i);
2139 ++ if (request_irq(104 + i, ipi_interrupt_handler,
2140 ++ IRQF_PERCPU, "IPI", (void *)(long)i))
2141 ++ pr_err("Failed to request irq %d\n", i);
2142 +
2143 + for (i = 0; i < max_cpus; i++)
2144 + set_cpu_present(i, true);
2145 +diff --git a/arch/sh/math-emu/math.c b/arch/sh/math-emu/math.c
2146 +index e8be0eca0444a..615ba932c398e 100644
2147 +--- a/arch/sh/math-emu/math.c
2148 ++++ b/arch/sh/math-emu/math.c
2149 +@@ -467,109 +467,6 @@ static int fpu_emulate(u16 code, struct sh_fpu_soft_struct *fregs, struct pt_reg
2150 + return id_sys(fregs, regs, code);
2151 + }
2152 +
2153 +-/**
2154 +- * denormal_to_double - Given denormalized float number,
2155 +- * store double float
2156 +- *
2157 +- * @fpu: Pointer to sh_fpu_soft structure
2158 +- * @n: Index to FP register
2159 +- */
2160 +-static void denormal_to_double(struct sh_fpu_soft_struct *fpu, int n)
2161 +-{
2162 +- unsigned long du, dl;
2163 +- unsigned long x = fpu->fpul;
2164 +- int exp = 1023 - 126;
2165 +-
2166 +- if (x != 0 && (x & 0x7f800000) == 0) {
2167 +- du = (x & 0x80000000);
2168 +- while ((x & 0x00800000) == 0) {
2169 +- x <<= 1;
2170 +- exp--;
2171 +- }
2172 +- x &= 0x007fffff;
2173 +- du |= (exp << 20) | (x >> 3);
2174 +- dl = x << 29;
2175 +-
2176 +- fpu->fp_regs[n] = du;
2177 +- fpu->fp_regs[n+1] = dl;
2178 +- }
2179 +-}
2180 +-
2181 +-/**
2182 +- * ieee_fpe_handler - Handle denormalized number exception
2183 +- *
2184 +- * @regs: Pointer to register structure
2185 +- *
2186 +- * Returns 1 when it's handled (should not cause exception).
2187 +- */
2188 +-static int ieee_fpe_handler(struct pt_regs *regs)
2189 +-{
2190 +- unsigned short insn = *(unsigned short *)regs->pc;
2191 +- unsigned short finsn;
2192 +- unsigned long nextpc;
2193 +- int nib[4] = {
2194 +- (insn >> 12) & 0xf,
2195 +- (insn >> 8) & 0xf,
2196 +- (insn >> 4) & 0xf,
2197 +- insn & 0xf};
2198 +-
2199 +- if (nib[0] == 0xb ||
2200 +- (nib[0] == 0x4 && nib[2] == 0x0 && nib[3] == 0xb)) /* bsr & jsr */
2201 +- regs->pr = regs->pc + 4;
2202 +-
2203 +- if (nib[0] == 0xa || nib[0] == 0xb) { /* bra & bsr */
2204 +- nextpc = regs->pc + 4 + ((short) ((insn & 0xfff) << 4) >> 3);
2205 +- finsn = *(unsigned short *) (regs->pc + 2);
2206 +- } else if (nib[0] == 0x8 && nib[1] == 0xd) { /* bt/s */
2207 +- if (regs->sr & 1)
2208 +- nextpc = regs->pc + 4 + ((char) (insn & 0xff) << 1);
2209 +- else
2210 +- nextpc = regs->pc + 4;
2211 +- finsn = *(unsigned short *) (regs->pc + 2);
2212 +- } else if (nib[0] == 0x8 && nib[1] == 0xf) { /* bf/s */
2213 +- if (regs->sr & 1)
2214 +- nextpc = regs->pc + 4;
2215 +- else
2216 +- nextpc = regs->pc + 4 + ((char) (insn & 0xff) << 1);
2217 +- finsn = *(unsigned short *) (regs->pc + 2);
2218 +- } else if (nib[0] == 0x4 && nib[3] == 0xb &&
2219 +- (nib[2] == 0x0 || nib[2] == 0x2)) { /* jmp & jsr */
2220 +- nextpc = regs->regs[nib[1]];
2221 +- finsn = *(unsigned short *) (regs->pc + 2);
2222 +- } else if (nib[0] == 0x0 && nib[3] == 0x3 &&
2223 +- (nib[2] == 0x0 || nib[2] == 0x2)) { /* braf & bsrf */
2224 +- nextpc = regs->pc + 4 + regs->regs[nib[1]];
2225 +- finsn = *(unsigned short *) (regs->pc + 2);
2226 +- } else if (insn == 0x000b) { /* rts */
2227 +- nextpc = regs->pr;
2228 +- finsn = *(unsigned short *) (regs->pc + 2);
2229 +- } else {
2230 +- nextpc = regs->pc + 2;
2231 +- finsn = insn;
2232 +- }
2233 +-
2234 +- if ((finsn & 0xf1ff) == 0xf0ad) { /* fcnvsd */
2235 +- struct task_struct *tsk = current;
2236 +-
2237 +- if ((tsk->thread.xstate->softfpu.fpscr & (1 << 17))) {
2238 +- /* FPU error */
2239 +- denormal_to_double (&tsk->thread.xstate->softfpu,
2240 +- (finsn >> 8) & 0xf);
2241 +- tsk->thread.xstate->softfpu.fpscr &=
2242 +- ~(FPSCR_CAUSE_MASK | FPSCR_FLAG_MASK);
2243 +- task_thread_info(tsk)->status |= TS_USEDFPU;
2244 +- } else {
2245 +- force_sig_fault(SIGFPE, FPE_FLTINV,
2246 +- (void __user *)regs->pc);
2247 +- }
2248 +-
2249 +- regs->pc = nextpc;
2250 +- return 1;
2251 +- }
2252 +-
2253 +- return 0;
2254 +-}
2255 +-
2256 + /**
2257 + * fpu_init - Initialize FPU registers
2258 + * @fpu: Pointer to software emulated FPU registers.
2259 +diff --git a/arch/sparc/kernel/signal_32.c b/arch/sparc/kernel/signal_32.c
2260 +index 02f3ad55dfe31..ffab16369beac 100644
2261 +--- a/arch/sparc/kernel/signal_32.c
2262 ++++ b/arch/sparc/kernel/signal_32.c
2263 +@@ -244,7 +244,7 @@ static int setup_frame(struct ksignal *ksig, struct pt_regs *regs,
2264 + get_sigframe(ksig, regs, sigframe_size);
2265 +
2266 + if (invalid_frame_pointer(sf, sigframe_size)) {
2267 +- do_exit(SIGILL);
2268 ++ force_exit_sig(SIGILL);
2269 + return -EINVAL;
2270 + }
2271 +
2272 +@@ -336,7 +336,7 @@ static int setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs,
2273 + sf = (struct rt_signal_frame __user *)
2274 + get_sigframe(ksig, regs, sigframe_size);
2275 + if (invalid_frame_pointer(sf, sigframe_size)) {
2276 +- do_exit(SIGILL);
2277 ++ force_exit_sig(SIGILL);
2278 + return -EINVAL;
2279 + }
2280 +
2281 +diff --git a/arch/sparc/kernel/windows.c b/arch/sparc/kernel/windows.c
2282 +index 69a6ba6e92937..8f20862ccc83e 100644
2283 +--- a/arch/sparc/kernel/windows.c
2284 ++++ b/arch/sparc/kernel/windows.c
2285 +@@ -121,8 +121,10 @@ void try_to_clear_window_buffer(struct pt_regs *regs, int who)
2286 +
2287 + if ((sp & 7) ||
2288 + copy_to_user((char __user *) sp, &tp->reg_window[window],
2289 +- sizeof(struct reg_window32)))
2290 +- do_exit(SIGILL);
2291 ++ sizeof(struct reg_window32))) {
2292 ++ force_exit_sig(SIGILL);
2293 ++ return;
2294 ++ }
2295 + }
2296 + tp->w_saved = 0;
2297 + }
2298 +diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c
2299 +index 3198c47673879..c32efb09db214 100644
2300 +--- a/arch/um/kernel/trap.c
2301 ++++ b/arch/um/kernel/trap.c
2302 +@@ -158,7 +158,7 @@ static void bad_segv(struct faultinfo fi, unsigned long ip)
2303 +
2304 + void fatal_sigsegv(void)
2305 + {
2306 +- force_sigsegv(SIGSEGV);
2307 ++ force_fatal_sig(SIGSEGV);
2308 + do_signal(&current->thread.regs);
2309 + /*
2310 + * This is to tell gcc that we're not returning - do_signal
2311 +diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
2312 +index ab9a4cbda78b8..6ce906815bb28 100644
2313 +--- a/arch/x86/Kconfig
2314 ++++ b/arch/x86/Kconfig
2315 +@@ -1256,7 +1256,8 @@ config TOSHIBA
2316 +
2317 + config I8K
2318 + tristate "Dell i8k legacy laptop support"
2319 +- select HWMON
2320 ++ depends on HWMON
2321 ++ depends on PROC_FS
2322 + select SENSORS_DELL_SMM
2323 + help
2324 + This option enables legacy /proc/i8k userspace interface in hwmon
2325 +diff --git a/arch/x86/entry/vsyscall/vsyscall_64.c b/arch/x86/entry/vsyscall/vsyscall_64.c
2326 +index 1b40b92970831..fd2ee9408e914 100644
2327 +--- a/arch/x86/entry/vsyscall/vsyscall_64.c
2328 ++++ b/arch/x86/entry/vsyscall/vsyscall_64.c
2329 +@@ -226,7 +226,8 @@ bool emulate_vsyscall(unsigned long error_code,
2330 + if ((!tmp && regs->orig_ax != syscall_nr) || regs->ip != address) {
2331 + warn_bad_vsyscall(KERN_DEBUG, regs,
2332 + "seccomp tried to change syscall nr or ip");
2333 +- do_exit(SIGSYS);
2334 ++ force_exit_sig(SIGSYS);
2335 ++ return true;
2336 + }
2337 + regs->orig_ax = -1;
2338 + if (tmp)
2339 +diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
2340 +index bc3f97f834011..c7f1cc433a6aa 100644
2341 +--- a/arch/x86/events/intel/core.c
2342 ++++ b/arch/x86/events/intel/core.c
2343 +@@ -2999,8 +2999,10 @@ intel_vlbr_constraints(struct perf_event *event)
2344 + {
2345 + struct event_constraint *c = &vlbr_constraint;
2346 +
2347 +- if (unlikely(constraint_match(c, event->hw.config)))
2348 ++ if (unlikely(constraint_match(c, event->hw.config))) {
2349 ++ event->hw.flags |= c->flags;
2350 + return c;
2351 ++ }
2352 +
2353 + return NULL;
2354 + }
2355 +diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c
2356 +index eb2c6cea9d0d5..3660f698fb2aa 100644
2357 +--- a/arch/x86/events/intel/uncore_snbep.c
2358 ++++ b/arch/x86/events/intel/uncore_snbep.c
2359 +@@ -3608,6 +3608,9 @@ static int skx_cha_hw_config(struct intel_uncore_box *box, struct perf_event *ev
2360 + struct hw_perf_event_extra *reg1 = &event->hw.extra_reg;
2361 + struct extra_reg *er;
2362 + int idx = 0;
2363 ++ /* Any of the CHA events may be filtered by Thread/Core-ID.*/
2364 ++ if (event->hw.config & SNBEP_CBO_PMON_CTL_TID_EN)
2365 ++ idx = SKX_CHA_MSR_PMON_BOX_FILTER_TID;
2366 +
2367 + for (er = skx_uncore_cha_extra_regs; er->msr; er++) {
2368 + if (er->event != (event->hw.config & er->config_mask))
2369 +@@ -3675,6 +3678,7 @@ static struct event_constraint skx_uncore_iio_constraints[] = {
2370 + UNCORE_EVENT_CONSTRAINT(0xc0, 0xc),
2371 + UNCORE_EVENT_CONSTRAINT(0xc5, 0xc),
2372 + UNCORE_EVENT_CONSTRAINT(0xd4, 0xc),
2373 ++ UNCORE_EVENT_CONSTRAINT(0xd5, 0xc),
2374 + EVENT_CONSTRAINT_END
2375 + };
2376 +
2377 +@@ -4525,6 +4529,13 @@ static void snr_iio_cleanup_mapping(struct intel_uncore_type *type)
2378 + pmu_iio_cleanup_mapping(type, &snr_iio_mapping_group);
2379 + }
2380 +
2381 ++static struct event_constraint snr_uncore_iio_constraints[] = {
2382 ++ UNCORE_EVENT_CONSTRAINT(0x83, 0x3),
2383 ++ UNCORE_EVENT_CONSTRAINT(0xc0, 0xc),
2384 ++ UNCORE_EVENT_CONSTRAINT(0xd5, 0xc),
2385 ++ EVENT_CONSTRAINT_END
2386 ++};
2387 ++
2388 + static struct intel_uncore_type snr_uncore_iio = {
2389 + .name = "iio",
2390 + .num_counters = 4,
2391 +@@ -4536,6 +4547,7 @@ static struct intel_uncore_type snr_uncore_iio = {
2392 + .event_mask_ext = SNR_IIO_PMON_RAW_EVENT_MASK_EXT,
2393 + .box_ctl = SNR_IIO_MSR_PMON_BOX_CTL,
2394 + .msr_offset = SNR_IIO_MSR_OFFSET,
2395 ++ .constraints = snr_uncore_iio_constraints,
2396 + .ops = &ivbep_uncore_msr_ops,
2397 + .format_group = &snr_uncore_iio_format_group,
2398 + .attr_update = snr_iio_attr_update,
2399 +diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c
2400 +index 179fc173104d7..d20eef3d452a5 100644
2401 +--- a/arch/x86/hyperv/hv_init.c
2402 ++++ b/arch/x86/hyperv/hv_init.c
2403 +@@ -147,6 +147,9 @@ void set_hv_tscchange_cb(void (*cb)(void))
2404 + return;
2405 + }
2406 +
2407 ++ if (!hv_vp_index)
2408 ++ return;
2409 ++
2410 + hv_reenlightenment_cb = cb;
2411 +
2412 + /* Make sure callback is registered before we write to MSRs */
2413 +diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
2414 +index 750f74da9793c..fa24fd4d138df 100644
2415 +--- a/arch/x86/include/asm/kvm_host.h
2416 ++++ b/arch/x86/include/asm/kvm_host.h
2417 +@@ -364,6 +364,7 @@ union kvm_mmu_extended_role {
2418 + unsigned int cr4_smap:1;
2419 + unsigned int cr4_smep:1;
2420 + unsigned int cr4_la57:1;
2421 ++ unsigned int efer_lma:1;
2422 + };
2423 + };
2424 +
2425 +diff --git a/arch/x86/kernel/cpu/sgx/main.c b/arch/x86/kernel/cpu/sgx/main.c
2426 +index 63d3de02bbccb..8471a8b9b48e8 100644
2427 +--- a/arch/x86/kernel/cpu/sgx/main.c
2428 ++++ b/arch/x86/kernel/cpu/sgx/main.c
2429 +@@ -28,8 +28,7 @@ static DECLARE_WAIT_QUEUE_HEAD(ksgxd_waitq);
2430 + static LIST_HEAD(sgx_active_page_list);
2431 + static DEFINE_SPINLOCK(sgx_reclaimer_lock);
2432 +
2433 +-/* The free page list lock protected variables prepend the lock. */
2434 +-static unsigned long sgx_nr_free_pages;
2435 ++static atomic_long_t sgx_nr_free_pages = ATOMIC_LONG_INIT(0);
2436 +
2437 + /* Nodes with one or more EPC sections. */
2438 + static nodemask_t sgx_numa_mask;
2439 +@@ -403,14 +402,15 @@ skip:
2440 +
2441 + spin_lock(&node->lock);
2442 + list_add_tail(&epc_page->list, &node->free_page_list);
2443 +- sgx_nr_free_pages++;
2444 + spin_unlock(&node->lock);
2445 ++ atomic_long_inc(&sgx_nr_free_pages);
2446 + }
2447 + }
2448 +
2449 + static bool sgx_should_reclaim(unsigned long watermark)
2450 + {
2451 +- return sgx_nr_free_pages < watermark && !list_empty(&sgx_active_page_list);
2452 ++ return atomic_long_read(&sgx_nr_free_pages) < watermark &&
2453 ++ !list_empty(&sgx_active_page_list);
2454 + }
2455 +
2456 + static int ksgxd(void *p)
2457 +@@ -471,9 +471,9 @@ static struct sgx_epc_page *__sgx_alloc_epc_page_from_node(int nid)
2458 +
2459 + page = list_first_entry(&node->free_page_list, struct sgx_epc_page, list);
2460 + list_del_init(&page->list);
2461 +- sgx_nr_free_pages--;
2462 +
2463 + spin_unlock(&node->lock);
2464 ++ atomic_long_dec(&sgx_nr_free_pages);
2465 +
2466 + return page;
2467 + }
2468 +@@ -625,9 +625,9 @@ void sgx_free_epc_page(struct sgx_epc_page *page)
2469 + spin_lock(&node->lock);
2470 +
2471 + list_add_tail(&page->list, &node->free_page_list);
2472 +- sgx_nr_free_pages++;
2473 +
2474 + spin_unlock(&node->lock);
2475 ++ atomic_long_inc(&sgx_nr_free_pages);
2476 + }
2477 +
2478 + static bool __init sgx_setup_epc_section(u64 phys_addr, u64 size,
2479 +diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
2480 +index 40ed44ead0631..d71267081153f 100644
2481 +--- a/arch/x86/kernel/setup.c
2482 ++++ b/arch/x86/kernel/setup.c
2483 +@@ -742,6 +742,28 @@ dump_kernel_offset(struct notifier_block *self, unsigned long v, void *p)
2484 + return 0;
2485 + }
2486 +
2487 ++static char *prepare_command_line(void)
2488 ++{
2489 ++#ifdef CONFIG_CMDLINE_BOOL
2490 ++#ifdef CONFIG_CMDLINE_OVERRIDE
2491 ++ strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
2492 ++#else
2493 ++ if (builtin_cmdline[0]) {
2494 ++ /* append boot loader cmdline to builtin */
2495 ++ strlcat(builtin_cmdline, " ", COMMAND_LINE_SIZE);
2496 ++ strlcat(builtin_cmdline, boot_command_line, COMMAND_LINE_SIZE);
2497 ++ strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
2498 ++ }
2499 ++#endif
2500 ++#endif
2501 ++
2502 ++ strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
2503 ++
2504 ++ parse_early_param();
2505 ++
2506 ++ return command_line;
2507 ++}
2508 ++
2509 + /*
2510 + * Determine if we were loaded by an EFI loader. If so, then we have also been
2511 + * passed the efi memmap, systab, etc., so we should use these data structures
2512 +@@ -830,6 +852,23 @@ void __init setup_arch(char **cmdline_p)
2513 +
2514 + x86_init.oem.arch_setup();
2515 +
2516 ++ /*
2517 ++ * x86_configure_nx() is called before parse_early_param() (called by
2518 ++ * prepare_command_line()) to detect whether hardware doesn't support
2519 ++ * NX (so that the early EHCI debug console setup can safely call
2520 ++ * set_fixmap()). It may then be called again from within noexec_setup()
2521 ++ * during parsing early parameters to honor the respective command line
2522 ++ * option.
2523 ++ */
2524 ++ x86_configure_nx();
2525 ++
2526 ++ /*
2527 ++ * This parses early params and it needs to run before
2528 ++ * early_reserve_memory() because latter relies on such settings
2529 ++ * supplied as early params.
2530 ++ */
2531 ++ *cmdline_p = prepare_command_line();
2532 ++
2533 + /*
2534 + * Do some memory reservations *before* memory is added to memblock, so
2535 + * memblock allocations won't overwrite it.
2536 +@@ -863,33 +902,6 @@ void __init setup_arch(char **cmdline_p)
2537 + bss_resource.start = __pa_symbol(__bss_start);
2538 + bss_resource.end = __pa_symbol(__bss_stop)-1;
2539 +
2540 +-#ifdef CONFIG_CMDLINE_BOOL
2541 +-#ifdef CONFIG_CMDLINE_OVERRIDE
2542 +- strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
2543 +-#else
2544 +- if (builtin_cmdline[0]) {
2545 +- /* append boot loader cmdline to builtin */
2546 +- strlcat(builtin_cmdline, " ", COMMAND_LINE_SIZE);
2547 +- strlcat(builtin_cmdline, boot_command_line, COMMAND_LINE_SIZE);
2548 +- strlcpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE);
2549 +- }
2550 +-#endif
2551 +-#endif
2552 +-
2553 +- strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
2554 +- *cmdline_p = command_line;
2555 +-
2556 +- /*
2557 +- * x86_configure_nx() is called before parse_early_param() to detect
2558 +- * whether hardware doesn't support NX (so that the early EHCI debug
2559 +- * console setup can safely call set_fixmap()). It may then be called
2560 +- * again from within noexec_setup() during parsing early parameters
2561 +- * to honor the respective command line option.
2562