Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:5.6 commit in: /
Date: Sat, 02 May 2020 13:26:55
Message-Id: 1588425995.6325bd142c1dd00cc25073175adc64ba81e7a604.mpagano@gentoo
1 commit: 6325bd142c1dd00cc25073175adc64ba81e7a604
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 2 13:26:35 2020 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Sat May 2 13:26:35 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=6325bd14
7
8 Linux patch 5.6.9
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 +
13 1008_linux-5.6.9.patch | 4807 ++++++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 4811 insertions(+)
15
16 diff --git a/0000_README b/0000_README
17 index d756ad3..8794f80 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -75,6 +75,10 @@ Patch: 1007_linux-5.6.8.patch
21 From: http://www.kernel.org
22 Desc: Linux 5.6.8
23
24 +Patch: 1008_linux-5.6.9.patch
25 +From: http://www.kernel.org
26 +Desc: Linux 5.6.9
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/1008_linux-5.6.9.patch b/1008_linux-5.6.9.patch
33 new file mode 100644
34 index 0000000..1ec7c3d
35 --- /dev/null
36 +++ b/1008_linux-5.6.9.patch
37 @@ -0,0 +1,4807 @@
38 +diff --git a/Makefile b/Makefile
39 +index e7101c99d81b..2fc8ba07d930 100644
40 +--- a/Makefile
41 ++++ b/Makefile
42 +@@ -1,7 +1,7 @@
43 + # SPDX-License-Identifier: GPL-2.0
44 + VERSION = 5
45 + PATCHLEVEL = 6
46 +-SUBLEVEL = 8
47 ++SUBLEVEL = 9
48 + EXTRAVERSION =
49 + NAME = Kleptomaniac Octopus
50 +
51 +diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
52 +index fd2c766e0f71..f7ae5a4530b8 100644
53 +--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
54 ++++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
55 +@@ -14,6 +14,9 @@
56 + soc {
57 + firmware: firmware {
58 + compatible = "raspberrypi,bcm2835-firmware", "simple-bus";
59 ++ #address-cells = <1>;
60 ++ #size-cells = <1>;
61 ++
62 + mboxes = <&mailbox>;
63 + dma-ranges;
64 + };
65 +diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
66 +index e1abe8c730ce..b83a864e2e8b 100644
67 +--- a/arch/arm/boot/dts/bcm283x.dtsi
68 ++++ b/arch/arm/boot/dts/bcm283x.dtsi
69 +@@ -372,6 +372,7 @@
70 + "dsi0_ddr2",
71 + "dsi0_ddr";
72 +
73 ++ status = "disabled";
74 + };
75 +
76 + aux: aux@7e215000 {
77 +diff --git a/arch/arm/boot/dts/omap3-n950-n9.dtsi b/arch/arm/boot/dts/omap3-n950-n9.dtsi
78 +index a075b63f3087..11d41e86f814 100644
79 +--- a/arch/arm/boot/dts/omap3-n950-n9.dtsi
80 ++++ b/arch/arm/boot/dts/omap3-n950-n9.dtsi
81 +@@ -341,6 +341,11 @@
82 + status = "disabled";
83 + };
84 +
85 ++/* RNG not directly accessible on N950/N9. */
86 ++&rng_target {
87 ++ status = "disabled";
88 ++};
89 ++
90 + &usb_otg_hs {
91 + interface-type = <0>;
92 + usb-phy = <&usb2_phy>;
93 +diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h
94 +index b91570ff9db1..931037500e83 100644
95 +--- a/arch/arm64/include/asm/sysreg.h
96 ++++ b/arch/arm64/include/asm/sysreg.h
97 +@@ -49,7 +49,9 @@
98 + #ifndef CONFIG_BROKEN_GAS_INST
99 +
100 + #ifdef __ASSEMBLY__
101 +-#define __emit_inst(x) .inst (x)
102 ++// The space separator is omitted so that __emit_inst(x) can be parsed as
103 ++// either an assembler directive or an assembler macro argument.
104 ++#define __emit_inst(x) .inst(x)
105 + #else
106 + #define __emit_inst(x) ".inst " __stringify((x)) "\n\t"
107 + #endif
108 +diff --git a/arch/s390/kernel/diag.c b/arch/s390/kernel/diag.c
109 +index 61f2b0412345..ccba63aaeb47 100644
110 +--- a/arch/s390/kernel/diag.c
111 ++++ b/arch/s390/kernel/diag.c
112 +@@ -133,7 +133,7 @@ void diag_stat_inc(enum diag_stat_enum nr)
113 + }
114 + EXPORT_SYMBOL(diag_stat_inc);
115 +
116 +-void diag_stat_inc_norecursion(enum diag_stat_enum nr)
117 ++void notrace diag_stat_inc_norecursion(enum diag_stat_enum nr)
118 + {
119 + this_cpu_inc(diag_stat.counter[nr]);
120 + trace_s390_diagnose_norecursion(diag_map[nr].code);
121 +diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
122 +index f87d4e14269c..4f8cb8d1c51b 100644
123 +--- a/arch/s390/kernel/smp.c
124 ++++ b/arch/s390/kernel/smp.c
125 +@@ -403,7 +403,7 @@ int smp_find_processor_id(u16 address)
126 + return -1;
127 + }
128 +
129 +-bool arch_vcpu_is_preempted(int cpu)
130 ++bool notrace arch_vcpu_is_preempted(int cpu)
131 + {
132 + if (test_cpu_flag_of(CIF_ENABLED_WAIT, cpu))
133 + return false;
134 +@@ -413,7 +413,7 @@ bool arch_vcpu_is_preempted(int cpu)
135 + }
136 + EXPORT_SYMBOL(arch_vcpu_is_preempted);
137 +
138 +-void smp_yield_cpu(int cpu)
139 ++void notrace smp_yield_cpu(int cpu)
140 + {
141 + if (!MACHINE_HAS_DIAG9C)
142 + return;
143 +diff --git a/arch/s390/kernel/trace.c b/arch/s390/kernel/trace.c
144 +index 490b52e85014..11a669f3cc93 100644
145 +--- a/arch/s390/kernel/trace.c
146 ++++ b/arch/s390/kernel/trace.c
147 +@@ -14,7 +14,7 @@ EXPORT_TRACEPOINT_SYMBOL(s390_diagnose);
148 +
149 + static DEFINE_PER_CPU(unsigned int, diagnose_trace_depth);
150 +
151 +-void trace_s390_diagnose_norecursion(int diag_nr)
152 ++void notrace trace_s390_diagnose_norecursion(int diag_nr)
153 + {
154 + unsigned long flags;
155 + unsigned int *depth;
156 +diff --git a/arch/s390/pci/pci_irq.c b/arch/s390/pci/pci_irq.c
157 +index fbe97ab2e228..743f257cf2cb 100644
158 +--- a/arch/s390/pci/pci_irq.c
159 ++++ b/arch/s390/pci/pci_irq.c
160 +@@ -115,7 +115,6 @@ static struct irq_chip zpci_irq_chip = {
161 + .name = "PCI-MSI",
162 + .irq_unmask = pci_msi_unmask_irq,
163 + .irq_mask = pci_msi_mask_irq,
164 +- .irq_set_affinity = zpci_set_irq_affinity,
165 + };
166 +
167 + static void zpci_handle_cpu_local_irq(bool rescan)
168 +@@ -276,7 +275,9 @@ int arch_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
169 + rc = -EIO;
170 + if (hwirq - bit >= msi_vecs)
171 + break;
172 +- irq = __irq_alloc_descs(-1, 0, 1, 0, THIS_MODULE, msi->affinity);
173 ++ irq = __irq_alloc_descs(-1, 0, 1, 0, THIS_MODULE,
174 ++ (irq_delivery == DIRECTED) ?
175 ++ msi->affinity : NULL);
176 + if (irq < 0)
177 + return -ENOMEM;
178 + rc = irq_set_msi_desc(irq, msi);
179 +diff --git a/arch/um/Makefile b/arch/um/Makefile
180 +index d2daa206872d..275f5ffdf6f0 100644
181 +--- a/arch/um/Makefile
182 ++++ b/arch/um/Makefile
183 +@@ -140,6 +140,7 @@ export CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS) $(LD_FLAGS_CMDLINE)
184 + # When cleaning we don't include .config, so we don't include
185 + # TT or skas makefiles and don't clean skas_ptregs.h.
186 + CLEAN_FILES += linux x.i gmon.out
187 ++MRPROPER_DIRS += arch/$(SUBARCH)/include/generated
188 +
189 + archclean:
190 + @find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \
191 +diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
192 +index 5e296a7e6036..ebf34c7bc8bc 100644
193 +--- a/arch/x86/kernel/cpu/mshyperv.c
194 ++++ b/arch/x86/kernel/cpu/mshyperv.c
195 +@@ -227,8 +227,8 @@ static void __init ms_hyperv_init_platform(void)
196 + ms_hyperv.misc_features = cpuid_edx(HYPERV_CPUID_FEATURES);
197 + ms_hyperv.hints = cpuid_eax(HYPERV_CPUID_ENLIGHTMENT_INFO);
198 +
199 +- pr_info("Hyper-V: features 0x%x, hints 0x%x\n",
200 +- ms_hyperv.features, ms_hyperv.hints);
201 ++ pr_info("Hyper-V: features 0x%x, hints 0x%x, misc 0x%x\n",
202 ++ ms_hyperv.features, ms_hyperv.hints, ms_hyperv.misc_features);
203 +
204 + ms_hyperv.max_vp_index = cpuid_eax(HYPERV_CPUID_IMPLEMENT_LIMITS);
205 + ms_hyperv.max_lp_index = cpuid_ebx(HYPERV_CPUID_IMPLEMENT_LIMITS);
206 +diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c
207 +index 9ba08e9abc09..6aa53c33b471 100644
208 +--- a/arch/x86/net/bpf_jit_comp.c
209 ++++ b/arch/x86/net/bpf_jit_comp.c
210 +@@ -158,6 +158,19 @@ static bool is_ereg(u32 reg)
211 + BIT(BPF_REG_AX));
212 + }
213 +
214 ++/*
215 ++ * is_ereg_8l() == true if BPF register 'reg' is mapped to access x86-64
216 ++ * lower 8-bit registers dil,sil,bpl,spl,r8b..r15b, which need extra byte
217 ++ * of encoding. al,cl,dl,bl have simpler encoding.
218 ++ */
219 ++static bool is_ereg_8l(u32 reg)
220 ++{
221 ++ return is_ereg(reg) ||
222 ++ (1 << reg) & (BIT(BPF_REG_1) |
223 ++ BIT(BPF_REG_2) |
224 ++ BIT(BPF_REG_FP));
225 ++}
226 ++
227 + static bool is_axreg(u32 reg)
228 + {
229 + return reg == BPF_REG_0;
230 +@@ -598,9 +611,8 @@ static void emit_stx(u8 **pprog, u32 size, u32 dst_reg, u32 src_reg, int off)
231 + switch (size) {
232 + case BPF_B:
233 + /* Emit 'mov byte ptr [rax + off], al' */
234 +- if (is_ereg(dst_reg) || is_ereg(src_reg) ||
235 +- /* We have to add extra byte for x86 SIL, DIL regs */
236 +- src_reg == BPF_REG_1 || src_reg == BPF_REG_2)
237 ++ if (is_ereg(dst_reg) || is_ereg_8l(src_reg))
238 ++ /* Add extra byte for eregs or SIL,DIL,BPL in src_reg */
239 + EMIT2(add_2mod(0x40, dst_reg, src_reg), 0x88);
240 + else
241 + EMIT1(0x88);
242 +diff --git a/arch/x86/net/bpf_jit_comp32.c b/arch/x86/net/bpf_jit_comp32.c
243 +index 4d2a7a764602..66cd150b7e54 100644
244 +--- a/arch/x86/net/bpf_jit_comp32.c
245 ++++ b/arch/x86/net/bpf_jit_comp32.c
246 +@@ -1847,14 +1847,16 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
247 + case BPF_B:
248 + case BPF_H:
249 + case BPF_W:
250 +- if (!bpf_prog->aux->verifier_zext)
251 ++ if (bpf_prog->aux->verifier_zext)
252 + break;
253 + if (dstk) {
254 + EMIT3(0xC7, add_1reg(0x40, IA32_EBP),
255 + STACK_VAR(dst_hi));
256 + EMIT(0x0, 4);
257 + } else {
258 +- EMIT3(0xC7, add_1reg(0xC0, dst_hi), 0);
259 ++ /* xor dst_hi,dst_hi */
260 ++ EMIT2(0x33,
261 ++ add_2reg(0xC0, dst_hi, dst_hi));
262 + }
263 + break;
264 + case BPF_DW:
265 +@@ -2013,8 +2015,8 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
266 + case BPF_JMP | BPF_JSET | BPF_X:
267 + case BPF_JMP32 | BPF_JSET | BPF_X: {
268 + bool is_jmp64 = BPF_CLASS(insn->code) == BPF_JMP;
269 +- u8 dreg_lo = dstk ? IA32_EAX : dst_lo;
270 +- u8 dreg_hi = dstk ? IA32_EDX : dst_hi;
271 ++ u8 dreg_lo = IA32_EAX;
272 ++ u8 dreg_hi = IA32_EDX;
273 + u8 sreg_lo = sstk ? IA32_ECX : src_lo;
274 + u8 sreg_hi = sstk ? IA32_EBX : src_hi;
275 +
276 +@@ -2026,6 +2028,13 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
277 + add_2reg(0x40, IA32_EBP,
278 + IA32_EDX),
279 + STACK_VAR(dst_hi));
280 ++ } else {
281 ++ /* mov dreg_lo,dst_lo */
282 ++ EMIT2(0x89, add_2reg(0xC0, dreg_lo, dst_lo));
283 ++ if (is_jmp64)
284 ++ /* mov dreg_hi,dst_hi */
285 ++ EMIT2(0x89,
286 ++ add_2reg(0xC0, dreg_hi, dst_hi));
287 + }
288 +
289 + if (sstk) {
290 +@@ -2050,8 +2059,8 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
291 + case BPF_JMP | BPF_JSET | BPF_K:
292 + case BPF_JMP32 | BPF_JSET | BPF_K: {
293 + bool is_jmp64 = BPF_CLASS(insn->code) == BPF_JMP;
294 +- u8 dreg_lo = dstk ? IA32_EAX : dst_lo;
295 +- u8 dreg_hi = dstk ? IA32_EDX : dst_hi;
296 ++ u8 dreg_lo = IA32_EAX;
297 ++ u8 dreg_hi = IA32_EDX;
298 + u8 sreg_lo = IA32_ECX;
299 + u8 sreg_hi = IA32_EBX;
300 + u32 hi;
301 +@@ -2064,6 +2073,13 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
302 + add_2reg(0x40, IA32_EBP,
303 + IA32_EDX),
304 + STACK_VAR(dst_hi));
305 ++ } else {
306 ++ /* mov dreg_lo,dst_lo */
307 ++ EMIT2(0x89, add_2reg(0xC0, dreg_lo, dst_lo));
308 ++ if (is_jmp64)
309 ++ /* mov dreg_hi,dst_hi */
310 ++ EMIT2(0x89,
311 ++ add_2reg(0xC0, dreg_hi, dst_hi));
312 + }
313 +
314 + /* mov ecx,imm32 */
315 +diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c
316 +index a47294063882..a20914b38e6a 100644
317 +--- a/arch/x86/platform/efi/efi_64.c
318 ++++ b/arch/x86/platform/efi/efi_64.c
319 +@@ -202,7 +202,7 @@ virt_to_phys_or_null_size(void *va, unsigned long size)
320 +
321 + int __init efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages)
322 + {
323 +- unsigned long pfn, text, pf;
324 ++ unsigned long pfn, text, pf, rodata;
325 + struct page *page;
326 + unsigned npages;
327 + pgd_t *pgd = efi_mm.pgd;
328 +@@ -256,7 +256,7 @@ int __init efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages)
329 +
330 + efi_scratch.phys_stack = page_to_phys(page + 1); /* stack grows down */
331 +
332 +- npages = (__end_rodata_aligned - _text) >> PAGE_SHIFT;
333 ++ npages = (_etext - _text) >> PAGE_SHIFT;
334 + text = __pa(_text);
335 + pfn = text >> PAGE_SHIFT;
336 +
337 +@@ -266,6 +266,14 @@ int __init efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages)
338 + return 1;
339 + }
340 +
341 ++ npages = (__end_rodata - __start_rodata) >> PAGE_SHIFT;
342 ++ rodata = __pa(__start_rodata);
343 ++ pfn = rodata >> PAGE_SHIFT;
344 ++ if (kernel_map_pages_in_pgd(pgd, pfn, rodata, npages, pf)) {
345 ++ pr_err("Failed to map kernel rodata 1:1\n");
346 ++ return 1;
347 ++ }
348 ++
349 + return 0;
350 + }
351 +
352 +diff --git a/block/blk-iocost.c b/block/blk-iocost.c
353 +index 9a599cc28c29..2dc5dc54e257 100644
354 +--- a/block/blk-iocost.c
355 ++++ b/block/blk-iocost.c
356 +@@ -1594,7 +1594,7 @@ skip_surplus_transfers:
357 + vrate_min, vrate_max);
358 + }
359 +
360 +- trace_iocost_ioc_vrate_adj(ioc, vrate, &missed_ppm, rq_wait_pct,
361 ++ trace_iocost_ioc_vrate_adj(ioc, vrate, missed_ppm, rq_wait_pct,
362 + nr_lagging, nr_shortages,
363 + nr_surpluses);
364 +
365 +@@ -1603,7 +1603,7 @@ skip_surplus_transfers:
366 + ioc->period_us * vrate * INUSE_MARGIN_PCT, 100);
367 + } else if (ioc->busy_level != prev_busy_level || nr_lagging) {
368 + trace_iocost_ioc_vrate_adj(ioc, atomic64_read(&ioc->vtime_rate),
369 +- &missed_ppm, rq_wait_pct, nr_lagging,
370 ++ missed_ppm, rq_wait_pct, nr_lagging,
371 + nr_shortages, nr_surpluses);
372 + }
373 +
374 +diff --git a/block/blk-mq.c b/block/blk-mq.c
375 +index 37ff8dfb8ab9..2c3a1b2e0753 100644
376 +--- a/block/blk-mq.c
377 ++++ b/block/blk-mq.c
378 +@@ -1205,8 +1205,10 @@ bool blk_mq_dispatch_rq_list(struct request_queue *q, struct list_head *list,
379 + rq = list_first_entry(list, struct request, queuelist);
380 +
381 + hctx = rq->mq_hctx;
382 +- if (!got_budget && !blk_mq_get_dispatch_budget(hctx))
383 ++ if (!got_budget && !blk_mq_get_dispatch_budget(hctx)) {
384 ++ blk_mq_put_driver_tag(rq);
385 + break;
386 ++ }
387 +
388 + if (!blk_mq_get_driver_tag(rq)) {
389 + /*
390 +diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
391 +index 0e99a760aebd..8646147dc194 100644
392 +--- a/drivers/base/power/main.c
393 ++++ b/drivers/base/power/main.c
394 +@@ -726,7 +726,7 @@ static bool dpm_async_fn(struct device *dev, async_func_t func)
395 +
396 + if (is_async(dev)) {
397 + get_device(dev);
398 +- async_schedule(func, dev);
399 ++ async_schedule_dev(func, dev);
400 + return true;
401 + }
402 +
403 +diff --git a/drivers/clk/clk-asm9260.c b/drivers/clk/clk-asm9260.c
404 +index 536b59aabd2c..bacebd457e6f 100644
405 +--- a/drivers/clk/clk-asm9260.c
406 ++++ b/drivers/clk/clk-asm9260.c
407 +@@ -276,7 +276,7 @@ static void __init asm9260_acc_init(struct device_node *np)
408 +
409 + /* TODO: Convert to DT parent scheme */
410 + ref_clk = of_clk_get_parent_name(np, 0);
411 +- hw = __clk_hw_register_fixed_rate_with_accuracy(NULL, NULL, pll_clk,
412 ++ hw = __clk_hw_register_fixed_rate(NULL, NULL, pll_clk,
413 + ref_clk, NULL, NULL, 0, rate, 0,
414 + CLK_FIXED_RATE_PARENT_ACCURACY);
415 +
416 +diff --git a/drivers/counter/104-quad-8.c b/drivers/counter/104-quad-8.c
417 +index 17e67a84777d..dd0a57f80988 100644
418 +--- a/drivers/counter/104-quad-8.c
419 ++++ b/drivers/counter/104-quad-8.c
420 +@@ -42,6 +42,7 @@ MODULE_PARM_DESC(base, "ACCES 104-QUAD-8 base addresses");
421 + * @base: base port address of the IIO device
422 + */
423 + struct quad8_iio {
424 ++ struct mutex lock;
425 + struct counter_device counter;
426 + unsigned int preset[QUAD8_NUM_COUNTERS];
427 + unsigned int count_mode[QUAD8_NUM_COUNTERS];
428 +@@ -116,6 +117,8 @@ static int quad8_read_raw(struct iio_dev *indio_dev,
429 + /* Borrow XOR Carry effectively doubles count range */
430 + *val = (borrow ^ carry) << 24;
431 +
432 ++ mutex_lock(&priv->lock);
433 ++
434 + /* Reset Byte Pointer; transfer Counter to Output Latch */
435 + outb(QUAD8_CTR_RLD | QUAD8_RLD_RESET_BP | QUAD8_RLD_CNTR_OUT,
436 + base_offset + 1);
437 +@@ -123,6 +126,8 @@ static int quad8_read_raw(struct iio_dev *indio_dev,
438 + for (i = 0; i < 3; i++)
439 + *val |= (unsigned int)inb(base_offset) << (8 * i);
440 +
441 ++ mutex_unlock(&priv->lock);
442 ++
443 + return IIO_VAL_INT;
444 + case IIO_CHAN_INFO_ENABLE:
445 + *val = priv->ab_enable[chan->channel];
446 +@@ -153,6 +158,8 @@ static int quad8_write_raw(struct iio_dev *indio_dev,
447 + if ((unsigned int)val > 0xFFFFFF)
448 + return -EINVAL;
449 +
450 ++ mutex_lock(&priv->lock);
451 ++
452 + /* Reset Byte Pointer */
453 + outb(QUAD8_CTR_RLD | QUAD8_RLD_RESET_BP, base_offset + 1);
454 +
455 +@@ -176,12 +183,16 @@ static int quad8_write_raw(struct iio_dev *indio_dev,
456 + /* Reset Error flag */
457 + outb(QUAD8_CTR_RLD | QUAD8_RLD_RESET_E, base_offset + 1);
458 +
459 ++ mutex_unlock(&priv->lock);
460 ++
461 + return 0;
462 + case IIO_CHAN_INFO_ENABLE:
463 + /* only boolean values accepted */
464 + if (val < 0 || val > 1)
465 + return -EINVAL;
466 +
467 ++ mutex_lock(&priv->lock);
468 ++
469 + priv->ab_enable[chan->channel] = val;
470 +
471 + ior_cfg = val | priv->preset_enable[chan->channel] << 1;
472 +@@ -189,11 +200,18 @@ static int quad8_write_raw(struct iio_dev *indio_dev,
473 + /* Load I/O control configuration */
474 + outb(QUAD8_CTR_IOR | ior_cfg, base_offset + 1);
475 +
476 ++ mutex_unlock(&priv->lock);
477 ++
478 + return 0;
479 + case IIO_CHAN_INFO_SCALE:
480 ++ mutex_lock(&priv->lock);
481 ++
482 + /* Quadrature scaling only available in quadrature mode */
483 +- if (!priv->quadrature_mode[chan->channel] && (val2 || val != 1))
484 ++ if (!priv->quadrature_mode[chan->channel] &&
485 ++ (val2 || val != 1)) {
486 ++ mutex_unlock(&priv->lock);
487 + return -EINVAL;
488 ++ }
489 +
490 + /* Only three gain states (1, 0.5, 0.25) */
491 + if (val == 1 && !val2)
492 +@@ -207,11 +225,15 @@ static int quad8_write_raw(struct iio_dev *indio_dev,
493 + priv->quadrature_scale[chan->channel] = 2;
494 + break;
495 + default:
496 ++ mutex_unlock(&priv->lock);
497 + return -EINVAL;
498 + }
499 +- else
500 ++ else {
501 ++ mutex_unlock(&priv->lock);
502 + return -EINVAL;
503 ++ }
504 +
505 ++ mutex_unlock(&priv->lock);
506 + return 0;
507 + }
508 +
509 +@@ -248,6 +270,8 @@ static ssize_t quad8_write_preset(struct iio_dev *indio_dev, uintptr_t private,
510 + if (preset > 0xFFFFFF)
511 + return -EINVAL;
512 +
513 ++ mutex_lock(&priv->lock);
514 ++
515 + priv->preset[chan->channel] = preset;
516 +
517 + /* Reset Byte Pointer */
518 +@@ -257,6 +281,8 @@ static ssize_t quad8_write_preset(struct iio_dev *indio_dev, uintptr_t private,
519 + for (i = 0; i < 3; i++)
520 + outb(preset >> (8 * i), base_offset);
521 +
522 ++ mutex_unlock(&priv->lock);
523 ++
524 + return len;
525 + }
526 +
527 +@@ -286,6 +312,8 @@ static ssize_t quad8_write_set_to_preset_on_index(struct iio_dev *indio_dev,
528 + /* Preset enable is active low in Input/Output Control register */
529 + preset_enable = !preset_enable;
530 +
531 ++ mutex_lock(&priv->lock);
532 ++
533 + priv->preset_enable[chan->channel] = preset_enable;
534 +
535 + ior_cfg = priv->ab_enable[chan->channel] |
536 +@@ -294,6 +322,8 @@ static ssize_t quad8_write_set_to_preset_on_index(struct iio_dev *indio_dev,
537 + /* Load I/O control configuration to Input / Output Control Register */
538 + outb(QUAD8_CTR_IOR | ior_cfg, base_offset);
539 +
540 ++ mutex_unlock(&priv->lock);
541 ++
542 + return len;
543 + }
544 +
545 +@@ -351,6 +381,8 @@ static int quad8_set_count_mode(struct iio_dev *indio_dev,
546 + unsigned int mode_cfg = cnt_mode << 1;
547 + const int base_offset = priv->base + 2 * chan->channel + 1;
548 +
549 ++ mutex_lock(&priv->lock);
550 ++
551 + priv->count_mode[chan->channel] = cnt_mode;
552 +
553 + /* Add quadrature mode configuration */
554 +@@ -360,6 +392,8 @@ static int quad8_set_count_mode(struct iio_dev *indio_dev,
555 + /* Load mode configuration to Counter Mode Register */
556 + outb(QUAD8_CTR_CMR | mode_cfg, base_offset);
557 +
558 ++ mutex_unlock(&priv->lock);
559 ++
560 + return 0;
561 + }
562 +
563 +@@ -387,19 +421,26 @@ static int quad8_set_synchronous_mode(struct iio_dev *indio_dev,
564 + const struct iio_chan_spec *chan, unsigned int synchronous_mode)
565 + {
566 + struct quad8_iio *const priv = iio_priv(indio_dev);
567 +- const unsigned int idr_cfg = synchronous_mode |
568 +- priv->index_polarity[chan->channel] << 1;
569 + const int base_offset = priv->base + 2 * chan->channel + 1;
570 ++ unsigned int idr_cfg = synchronous_mode;
571 ++
572 ++ mutex_lock(&priv->lock);
573 ++
574 ++ idr_cfg |= priv->index_polarity[chan->channel] << 1;
575 +
576 + /* Index function must be non-synchronous in non-quadrature mode */
577 +- if (synchronous_mode && !priv->quadrature_mode[chan->channel])
578 ++ if (synchronous_mode && !priv->quadrature_mode[chan->channel]) {
579 ++ mutex_unlock(&priv->lock);
580 + return -EINVAL;
581 ++ }
582 +
583 + priv->synchronous_mode[chan->channel] = synchronous_mode;
584 +
585 + /* Load Index Control configuration to Index Control Register */
586 + outb(QUAD8_CTR_IDR | idr_cfg, base_offset);
587 +
588 ++ mutex_unlock(&priv->lock);
589 ++
590 + return 0;
591 + }
592 +
593 +@@ -427,8 +468,12 @@ static int quad8_set_quadrature_mode(struct iio_dev *indio_dev,
594 + const struct iio_chan_spec *chan, unsigned int quadrature_mode)
595 + {
596 + struct quad8_iio *const priv = iio_priv(indio_dev);
597 +- unsigned int mode_cfg = priv->count_mode[chan->channel] << 1;
598 + const int base_offset = priv->base + 2 * chan->channel + 1;
599 ++ unsigned int mode_cfg;
600 ++
601 ++ mutex_lock(&priv->lock);
602 ++
603 ++ mode_cfg = priv->count_mode[chan->channel] << 1;
604 +
605 + if (quadrature_mode)
606 + mode_cfg |= (priv->quadrature_scale[chan->channel] + 1) << 3;
607 +@@ -446,6 +491,8 @@ static int quad8_set_quadrature_mode(struct iio_dev *indio_dev,
608 + /* Load mode configuration to Counter Mode Register */
609 + outb(QUAD8_CTR_CMR | mode_cfg, base_offset);
610 +
611 ++ mutex_unlock(&priv->lock);
612 ++
613 + return 0;
614 + }
615 +
616 +@@ -473,15 +520,20 @@ static int quad8_set_index_polarity(struct iio_dev *indio_dev,
617 + const struct iio_chan_spec *chan, unsigned int index_polarity)
618 + {
619 + struct quad8_iio *const priv = iio_priv(indio_dev);
620 +- const unsigned int idr_cfg = priv->synchronous_mode[chan->channel] |
621 +- index_polarity << 1;
622 + const int base_offset = priv->base + 2 * chan->channel + 1;
623 ++ unsigned int idr_cfg = index_polarity << 1;
624 ++
625 ++ mutex_lock(&priv->lock);
626 ++
627 ++ idr_cfg |= priv->synchronous_mode[chan->channel];
628 +
629 + priv->index_polarity[chan->channel] = index_polarity;
630 +
631 + /* Load Index Control configuration to Index Control Register */
632 + outb(QUAD8_CTR_IDR | idr_cfg, base_offset);
633 +
634 ++ mutex_unlock(&priv->lock);
635 ++
636 + return 0;
637 + }
638 +
639 +@@ -582,7 +634,7 @@ static int quad8_signal_read(struct counter_device *counter,
640 + static int quad8_count_read(struct counter_device *counter,
641 + struct counter_count *count, unsigned long *val)
642 + {
643 +- const struct quad8_iio *const priv = counter->priv;
644 ++ struct quad8_iio *const priv = counter->priv;
645 + const int base_offset = priv->base + 2 * count->id;
646 + unsigned int flags;
647 + unsigned int borrow;
648 +@@ -596,6 +648,8 @@ static int quad8_count_read(struct counter_device *counter,
649 + /* Borrow XOR Carry effectively doubles count range */
650 + *val = (unsigned long)(borrow ^ carry) << 24;
651 +
652 ++ mutex_lock(&priv->lock);
653 ++
654 + /* Reset Byte Pointer; transfer Counter to Output Latch */
655 + outb(QUAD8_CTR_RLD | QUAD8_RLD_RESET_BP | QUAD8_RLD_CNTR_OUT,
656 + base_offset + 1);
657 +@@ -603,13 +657,15 @@ static int quad8_count_read(struct counter_device *counter,
658 + for (i = 0; i < 3; i++)
659 + *val |= (unsigned long)inb(base_offset) << (8 * i);
660 +
661 ++ mutex_unlock(&priv->lock);
662 ++
663 + return 0;
664 + }
665 +
666 + static int quad8_count_write(struct counter_device *counter,
667 + struct counter_count *count, unsigned long val)
668 + {
669 +- const struct quad8_iio *const priv = counter->priv;
670 ++ struct quad8_iio *const priv = counter->priv;
671 + const int base_offset = priv->base + 2 * count->id;
672 + int i;
673 +
674 +@@ -617,6 +673,8 @@ static int quad8_count_write(struct counter_device *counter,
675 + if (val > 0xFFFFFF)
676 + return -EINVAL;
677 +
678 ++ mutex_lock(&priv->lock);
679 ++
680 + /* Reset Byte Pointer */
681 + outb(QUAD8_CTR_RLD | QUAD8_RLD_RESET_BP, base_offset + 1);
682 +
683 +@@ -640,6 +698,8 @@ static int quad8_count_write(struct counter_device *counter,
684 + /* Reset Error flag */
685 + outb(QUAD8_CTR_RLD | QUAD8_RLD_RESET_E, base_offset + 1);
686 +
687 ++ mutex_unlock(&priv->lock);
688 ++
689 + return 0;
690 + }
691 +
692 +@@ -660,13 +720,13 @@ static enum counter_count_function quad8_count_functions_list[] = {
693 + static int quad8_function_get(struct counter_device *counter,
694 + struct counter_count *count, size_t *function)
695 + {
696 +- const struct quad8_iio *const priv = counter->priv;
697 ++ struct quad8_iio *const priv = counter->priv;
698 + const int id = count->id;
699 +- const unsigned int quadrature_mode = priv->quadrature_mode[id];
700 +- const unsigned int scale = priv->quadrature_scale[id];
701 +
702 +- if (quadrature_mode)
703 +- switch (scale) {
704 ++ mutex_lock(&priv->lock);
705 ++
706 ++ if (priv->quadrature_mode[id])
707 ++ switch (priv->quadrature_scale[id]) {
708 + case 0:
709 + *function = QUAD8_COUNT_FUNCTION_QUADRATURE_X1;
710 + break;
711 +@@ -680,6 +740,8 @@ static int quad8_function_get(struct counter_device *counter,
712 + else
713 + *function = QUAD8_COUNT_FUNCTION_PULSE_DIRECTION;
714 +
715 ++ mutex_unlock(&priv->lock);
716 ++
717 + return 0;
718 + }
719 +
720 +@@ -690,10 +752,15 @@ static int quad8_function_set(struct counter_device *counter,
721 + const int id = count->id;
722 + unsigned int *const quadrature_mode = priv->quadrature_mode + id;
723 + unsigned int *const scale = priv->quadrature_scale + id;
724 +- unsigned int mode_cfg = priv->count_mode[id] << 1;
725 + unsigned int *const synchronous_mode = priv->synchronous_mode + id;
726 +- const unsigned int idr_cfg = priv->index_polarity[id] << 1;
727 + const int base_offset = priv->base + 2 * id + 1;
728 ++ unsigned int mode_cfg;
729 ++ unsigned int idr_cfg;
730 ++
731 ++ mutex_lock(&priv->lock);
732 ++
733 ++ mode_cfg = priv->count_mode[id] << 1;
734 ++ idr_cfg = priv->index_polarity[id] << 1;
735 +
736 + if (function == QUAD8_COUNT_FUNCTION_PULSE_DIRECTION) {
737 + *quadrature_mode = 0;
738 +@@ -729,6 +796,8 @@ static int quad8_function_set(struct counter_device *counter,
739 + /* Load mode configuration to Counter Mode Register */
740 + outb(QUAD8_CTR_CMR | mode_cfg, base_offset);
741 +
742 ++ mutex_unlock(&priv->lock);
743 ++
744 + return 0;
745 + }
746 +
747 +@@ -845,15 +914,20 @@ static int quad8_index_polarity_set(struct counter_device *counter,
748 + {
749 + struct quad8_iio *const priv = counter->priv;
750 + const size_t channel_id = signal->id - 16;
751 +- const unsigned int idr_cfg = priv->synchronous_mode[channel_id] |
752 +- index_polarity << 1;
753 + const int base_offset = priv->base + 2 * channel_id + 1;
754 ++ unsigned int idr_cfg = index_polarity << 1;
755 ++
756 ++ mutex_lock(&priv->lock);
757 ++
758 ++ idr_cfg |= priv->synchronous_mode[channel_id];
759 +
760 + priv->index_polarity[channel_id] = index_polarity;
761 +
762 + /* Load Index Control configuration to Index Control Register */
763 + outb(QUAD8_CTR_IDR | idr_cfg, base_offset);
764 +
765 ++ mutex_unlock(&priv->lock);
766 ++
767 + return 0;
768 + }
769 +
770 +@@ -880,19 +954,26 @@ static int quad8_synchronous_mode_set(struct counter_device *counter,
771 + {
772 + struct quad8_iio *const priv = counter->priv;
773 + const size_t channel_id = signal->id - 16;
774 +- const unsigned int idr_cfg = synchronous_mode |
775 +- priv->index_polarity[channel_id] << 1;
776 + const int base_offset = priv->base + 2 * channel_id + 1;
777 ++ unsigned int idr_cfg = synchronous_mode;
778 ++
779 ++ mutex_lock(&priv->lock);
780 ++
781 ++ idr_cfg |= priv->index_polarity[channel_id] << 1;
782 +
783 + /* Index function must be non-synchronous in non-quadrature mode */
784 +- if (synchronous_mode && !priv->quadrature_mode[channel_id])
785 ++ if (synchronous_mode && !priv->quadrature_mode[channel_id]) {
786 ++ mutex_unlock(&priv->lock);
787 + return -EINVAL;
788 ++ }
789 +
790 + priv->synchronous_mode[channel_id] = synchronous_mode;
791 +
792 + /* Load Index Control configuration to Index Control Register */
793 + outb(QUAD8_CTR_IDR | idr_cfg, base_offset);
794 +
795 ++ mutex_unlock(&priv->lock);
796 ++
797 + return 0;
798 + }
799 +
800 +@@ -957,6 +1038,8 @@ static int quad8_count_mode_set(struct counter_device *counter,
801 + break;
802 + }
803 +
804 ++ mutex_lock(&priv->lock);
805 ++
806 + priv->count_mode[count->id] = cnt_mode;
807 +
808 + /* Set count mode configuration value */
809 +@@ -969,6 +1052,8 @@ static int quad8_count_mode_set(struct counter_device *counter,
810 + /* Load mode configuration to Counter Mode Register */
811 + outb(QUAD8_CTR_CMR | mode_cfg, base_offset);
812 +
813 ++ mutex_unlock(&priv->lock);
814 ++
815 + return 0;
816 + }
817 +
818 +@@ -1010,6 +1095,8 @@ static ssize_t quad8_count_enable_write(struct counter_device *counter,
819 + if (err)
820 + return err;
821 +
822 ++ mutex_lock(&priv->lock);
823 ++
824 + priv->ab_enable[count->id] = ab_enable;
825 +
826 + ior_cfg = ab_enable | priv->preset_enable[count->id] << 1;
827 +@@ -1017,6 +1104,8 @@ static ssize_t quad8_count_enable_write(struct counter_device *counter,
828 + /* Load I/O control configuration */
829 + outb(QUAD8_CTR_IOR | ior_cfg, base_offset + 1);
830 +
831 ++ mutex_unlock(&priv->lock);
832 ++
833 + return len;
834 + }
835 +
836 +@@ -1045,14 +1134,28 @@ static ssize_t quad8_count_preset_read(struct counter_device *counter,
837 + return sprintf(buf, "%u\n", priv->preset[count->id]);
838 + }
839 +
840 ++static void quad8_preset_register_set(struct quad8_iio *quad8iio, int id,
841 ++ unsigned int preset)
842 ++{
843 ++ const unsigned int base_offset = quad8iio->base + 2 * id;
844 ++ int i;
845 ++
846 ++ quad8iio->preset[id] = preset;
847 ++
848 ++ /* Reset Byte Pointer */
849 ++ outb(QUAD8_CTR_RLD | QUAD8_RLD_RESET_BP, base_offset + 1);
850 ++
851 ++ /* Set Preset Register */
852 ++ for (i = 0; i < 3; i++)
853 ++ outb(preset >> (8 * i), base_offset);
854 ++}
855 ++
856 + static ssize_t quad8_count_preset_write(struct counter_device *counter,
857 + struct counter_count *count, void *private, const char *buf, size_t len)
858 + {
859 + struct quad8_iio *const priv = counter->priv;
860 +- const int base_offset = priv->base + 2 * count->id;
861 + unsigned int preset;
862 + int ret;
863 +- int i;
864 +
865 + ret = kstrtouint(buf, 0, &preset);
866 + if (ret)
867 +@@ -1062,14 +1165,11 @@ static ssize_t quad8_count_preset_write(struct counter_device *counter,
868 + if (preset > 0xFFFFFF)
869 + return -EINVAL;
870 +
871 +- priv->preset[count->id] = preset;
872 ++ mutex_lock(&priv->lock);
873 +
874 +- /* Reset Byte Pointer */
875 +- outb(QUAD8_CTR_RLD | QUAD8_RLD_RESET_BP, base_offset + 1);
876 ++ quad8_preset_register_set(priv, count->id, preset);
877 +
878 +- /* Set Preset Register */
879 +- for (i = 0; i < 3; i++)
880 +- outb(preset >> (8 * i), base_offset);
881 ++ mutex_unlock(&priv->lock);
882 +
883 + return len;
884 + }
885 +@@ -1077,15 +1177,20 @@ static ssize_t quad8_count_preset_write(struct counter_device *counter,
886 + static ssize_t quad8_count_ceiling_read(struct counter_device *counter,
887 + struct counter_count *count, void *private, char *buf)
888 + {
889 +- const struct quad8_iio *const priv = counter->priv;
890 ++ struct quad8_iio *const priv = counter->priv;
891 ++
892 ++ mutex_lock(&priv->lock);
893 +
894 + /* Range Limit and Modulo-N count modes use preset value as ceiling */
895 + switch (priv->count_mode[count->id]) {
896 + case 1:
897 + case 3:
898 +- return quad8_count_preset_read(counter, count, private, buf);
899 ++ mutex_unlock(&priv->lock);
900 ++ return sprintf(buf, "%u\n", priv->preset[count->id]);
901 + }
902 +
903 ++ mutex_unlock(&priv->lock);
904 ++
905 + /* By default 0x1FFFFFF (25 bits unsigned) is maximum count */
906 + return sprintf(buf, "33554431\n");
907 + }
908 +@@ -1094,15 +1199,29 @@ static ssize_t quad8_count_ceiling_write(struct counter_device *counter,
909 + struct counter_count *count, void *private, const char *buf, size_t len)
910 + {
911 + struct quad8_iio *const priv = counter->priv;
912 ++ unsigned int ceiling;
913 ++ int ret;
914 ++
915 ++ ret = kstrtouint(buf, 0, &ceiling);
916 ++ if (ret)
917 ++ return ret;
918 ++
919 ++ /* Only 24-bit values are supported */
920 ++ if (ceiling > 0xFFFFFF)
921 ++ return -EINVAL;
922 ++
923 ++ mutex_lock(&priv->lock);
924 +
925 + /* Range Limit and Modulo-N count modes use preset value as ceiling */
926 + switch (priv->count_mode[count->id]) {
927 + case 1:
928 + case 3:
929 +- return quad8_count_preset_write(counter, count, private, buf,
930 +- len);
931 ++ quad8_preset_register_set(priv, count->id, ceiling);
932 ++ break;
933 + }
934 +
935 ++ mutex_unlock(&priv->lock);
936 ++
937 + return len;
938 + }
939 +
940 +@@ -1130,6 +1249,8 @@ static ssize_t quad8_count_preset_enable_write(struct counter_device *counter,
941 + /* Preset enable is active low in Input/Output Control register */
942 + preset_enable = !preset_enable;
943 +
944 ++ mutex_lock(&priv->lock);
945 ++
946 + priv->preset_enable[count->id] = preset_enable;
947 +
948 + ior_cfg = priv->ab_enable[count->id] | (unsigned int)preset_enable << 1;
949 +@@ -1137,6 +1258,8 @@ static ssize_t quad8_count_preset_enable_write(struct counter_device *counter,
950 + /* Load I/O control configuration to Input / Output Control Register */
951 + outb(QUAD8_CTR_IOR | ior_cfg, base_offset);
952 +
953 ++ mutex_unlock(&priv->lock);
954 ++
955 + return len;
956 + }
957 +
958 +@@ -1307,6 +1430,9 @@ static int quad8_probe(struct device *dev, unsigned int id)
959 + quad8iio->counter.priv = quad8iio;
960 + quad8iio->base = base[id];
961 +
962 ++ /* Initialize mutex */
963 ++ mutex_init(&quad8iio->lock);
964 ++
965 + /* Reset all counters and disable interrupt function */
966 + outb(QUAD8_CHAN_OP_RESET_COUNTERS, base[id] + QUAD8_REG_CHAN_OP);
967 + /* Set initial configuration for all counters */
968 +diff --git a/drivers/crypto/chelsio/chcr_core.c b/drivers/crypto/chelsio/chcr_core.c
969 +index e937605670ac..8c2e85f884d3 100644
970 +--- a/drivers/crypto/chelsio/chcr_core.c
971 ++++ b/drivers/crypto/chelsio/chcr_core.c
972 +@@ -125,8 +125,6 @@ static void chcr_dev_init(struct uld_ctx *u_ctx)
973 + atomic_set(&dev->inflight, 0);
974 + mutex_lock(&drv_data.drv_mutex);
975 + list_add_tail(&u_ctx->entry, &drv_data.inact_dev);
976 +- if (!drv_data.last_dev)
977 +- drv_data.last_dev = u_ctx;
978 + mutex_unlock(&drv_data.drv_mutex);
979 + }
980 +
981 +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
982 +index c8bf9cb3cebf..f184cdca938d 100644
983 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
984 ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
985 +@@ -1953,8 +1953,24 @@ static void amdgpu_device_fill_reset_magic(struct amdgpu_device *adev)
986 + */
987 + static bool amdgpu_device_check_vram_lost(struct amdgpu_device *adev)
988 + {
989 +- return !!memcmp(adev->gart.ptr, adev->reset_magic,
990 +- AMDGPU_RESET_MAGIC_NUM);
991 ++ if (memcmp(adev->gart.ptr, adev->reset_magic,
992 ++ AMDGPU_RESET_MAGIC_NUM))
993 ++ return true;
994 ++
995 ++ if (!adev->in_gpu_reset)
996 ++ return false;
997 ++
998 ++ /*
999 ++ * For all ASICs with baco/mode1 reset, the VRAM is
1000 ++ * always assumed to be lost.
1001 ++ */
1002 ++ switch (amdgpu_asic_reset_method(adev)) {
1003 ++ case AMD_RESET_METHOD_BACO:
1004 ++ case AMD_RESET_METHOD_MODE1:
1005 ++ return true;
1006 ++ default:
1007 ++ return false;
1008 ++ }
1009 + }
1010 +
1011 + /**
1012 +diff --git a/drivers/gpu/drm/amd/amdgpu/cik.c b/drivers/gpu/drm/amd/amdgpu/cik.c
1013 +index 006f21ef7ddf..62635e58e45e 100644
1014 +--- a/drivers/gpu/drm/amd/amdgpu/cik.c
1015 ++++ b/drivers/gpu/drm/amd/amdgpu/cik.c
1016 +@@ -1358,8 +1358,6 @@ static int cik_asic_reset(struct amdgpu_device *adev)
1017 + int r;
1018 +
1019 + if (cik_asic_reset_method(adev) == AMD_RESET_METHOD_BACO) {
1020 +- if (!adev->in_suspend)
1021 +- amdgpu_inc_vram_lost(adev);
1022 + r = amdgpu_dpm_baco_reset(adev);
1023 + } else {
1024 + r = cik_asic_pci_config_reset(adev);
1025 +diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c
1026 +index 2d1bebdf1603..cc3a79029376 100644
1027 +--- a/drivers/gpu/drm/amd/amdgpu/nv.c
1028 ++++ b/drivers/gpu/drm/amd/amdgpu/nv.c
1029 +@@ -351,8 +351,6 @@ static int nv_asic_reset(struct amdgpu_device *adev)
1030 + struct smu_context *smu = &adev->smu;
1031 +
1032 + if (nv_asic_reset_method(adev) == AMD_RESET_METHOD_BACO) {
1033 +- if (!adev->in_suspend)
1034 +- amdgpu_inc_vram_lost(adev);
1035 + ret = smu_baco_enter(smu);
1036 + if (ret)
1037 + return ret;
1038 +@@ -360,8 +358,6 @@ static int nv_asic_reset(struct amdgpu_device *adev)
1039 + if (ret)
1040 + return ret;
1041 + } else {
1042 +- if (!adev->in_suspend)
1043 +- amdgpu_inc_vram_lost(adev);
1044 + ret = nv_asic_mode1_reset(adev);
1045 + }
1046 +
1047 +diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c
1048 +index d8945c31b622..132a67a041a2 100644
1049 +--- a/drivers/gpu/drm/amd/amdgpu/soc15.c
1050 ++++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
1051 +@@ -569,14 +569,10 @@ static int soc15_asic_reset(struct amdgpu_device *adev)
1052 +
1053 + switch (soc15_asic_reset_method(adev)) {
1054 + case AMD_RESET_METHOD_BACO:
1055 +- if (!adev->in_suspend)
1056 +- amdgpu_inc_vram_lost(adev);
1057 + return soc15_asic_baco_reset(adev);
1058 + case AMD_RESET_METHOD_MODE2:
1059 + return amdgpu_dpm_mode2_reset(adev);
1060 + default:
1061 +- if (!adev->in_suspend)
1062 +- amdgpu_inc_vram_lost(adev);
1063 + return soc15_asic_mode1_reset(adev);
1064 + }
1065 + }
1066 +diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
1067 +index 78b35901643b..3ce10e05d0d6 100644
1068 +--- a/drivers/gpu/drm/amd/amdgpu/vi.c
1069 ++++ b/drivers/gpu/drm/amd/amdgpu/vi.c
1070 +@@ -765,8 +765,6 @@ static int vi_asic_reset(struct amdgpu_device *adev)
1071 + int r;
1072 +
1073 + if (vi_asic_reset_method(adev) == AMD_RESET_METHOD_BACO) {
1074 +- if (!adev->in_suspend)
1075 +- amdgpu_inc_vram_lost(adev);
1076 + r = amdgpu_dpm_baco_reset(adev);
1077 + } else {
1078 + r = vi_asic_pci_config_reset(adev);
1079 +diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
1080 +index 47ac20aee06f..4c1c61aa4b82 100644
1081 +--- a/drivers/hwmon/Kconfig
1082 ++++ b/drivers/hwmon/Kconfig
1083 +@@ -403,7 +403,7 @@ config SENSORS_DRIVETEMP
1084 + hard disk drives.
1085 +
1086 + This driver can also be built as a module. If so, the module
1087 +- will be called satatemp.
1088 ++ will be called drivetemp.
1089 +
1090 + config SENSORS_DS620
1091 + tristate "Dallas Semiconductor DS620"
1092 +diff --git a/drivers/hwmon/drivetemp.c b/drivers/hwmon/drivetemp.c
1093 +index 370d0c74eb01..9179460c2d9d 100644
1094 +--- a/drivers/hwmon/drivetemp.c
1095 ++++ b/drivers/hwmon/drivetemp.c
1096 +@@ -264,12 +264,18 @@ static int drivetemp_get_scttemp(struct drivetemp_data *st, u32 attr, long *val)
1097 + return err;
1098 + switch (attr) {
1099 + case hwmon_temp_input:
1100 ++ if (!temp_is_valid(buf[SCT_STATUS_TEMP]))
1101 ++ return -ENODATA;
1102 + *val = temp_from_sct(buf[SCT_STATUS_TEMP]);
1103 + break;
1104 + case hwmon_temp_lowest:
1105 ++ if (!temp_is_valid(buf[SCT_STATUS_TEMP_LOWEST]))
1106 ++ return -ENODATA;
1107 + *val = temp_from_sct(buf[SCT_STATUS_TEMP_LOWEST]);
1108 + break;
1109 + case hwmon_temp_highest:
1110 ++ if (!temp_is_valid(buf[SCT_STATUS_TEMP_HIGHEST]))
1111 ++ return -ENODATA;
1112 + *val = temp_from_sct(buf[SCT_STATUS_TEMP_HIGHEST]);
1113 + break;
1114 + default:
1115 +diff --git a/drivers/hwmon/jc42.c b/drivers/hwmon/jc42.c
1116 +index f2d81b0558e5..e3f1ebee7130 100644
1117 +--- a/drivers/hwmon/jc42.c
1118 ++++ b/drivers/hwmon/jc42.c
1119 +@@ -506,7 +506,7 @@ static int jc42_probe(struct i2c_client *client, const struct i2c_device_id *id)
1120 + }
1121 + data->config = config;
1122 +
1123 +- hwmon_dev = devm_hwmon_device_register_with_info(dev, client->name,
1124 ++ hwmon_dev = devm_hwmon_device_register_with_info(dev, "jc42",
1125 + data, &jc42_chip_info,
1126 + NULL);
1127 + return PTR_ERR_OR_ZERO(hwmon_dev);
1128 +diff --git a/drivers/i2c/busses/i2c-altera.c b/drivers/i2c/busses/i2c-altera.c
1129 +index 1de23b4f3809..92d2c706c2a7 100644
1130 +--- a/drivers/i2c/busses/i2c-altera.c
1131 ++++ b/drivers/i2c/busses/i2c-altera.c
1132 +@@ -384,7 +384,6 @@ static int altr_i2c_probe(struct platform_device *pdev)
1133 + struct altr_i2c_dev *idev = NULL;
1134 + struct resource *res;
1135 + int irq, ret;
1136 +- u32 val;
1137 +
1138 + idev = devm_kzalloc(&pdev->dev, sizeof(*idev), GFP_KERNEL);
1139 + if (!idev)
1140 +@@ -411,17 +410,17 @@ static int altr_i2c_probe(struct platform_device *pdev)
1141 + init_completion(&idev->msg_complete);
1142 + spin_lock_init(&idev->lock);
1143 +
1144 +- val = device_property_read_u32(idev->dev, "fifo-size",
1145 ++ ret = device_property_read_u32(idev->dev, "fifo-size",
1146 + &idev->fifo_size);
1147 +- if (val) {
1148 ++ if (ret) {
1149 + dev_err(&pdev->dev, "FIFO size set to default of %d\n",
1150 + ALTR_I2C_DFLT_FIFO_SZ);
1151 + idev->fifo_size = ALTR_I2C_DFLT_FIFO_SZ;
1152 + }
1153 +
1154 +- val = device_property_read_u32(idev->dev, "clock-frequency",
1155 ++ ret = device_property_read_u32(idev->dev, "clock-frequency",
1156 + &idev->bus_clk_rate);
1157 +- if (val) {
1158 ++ if (ret) {
1159 + dev_err(&pdev->dev, "Default to 100kHz\n");
1160 + idev->bus_clk_rate = 100000; /* default clock rate */
1161 + }
1162 +diff --git a/drivers/iio/adc/ad7793.c b/drivers/iio/adc/ad7793.c
1163 +index b747db97f78a..e5691e330323 100644
1164 +--- a/drivers/iio/adc/ad7793.c
1165 ++++ b/drivers/iio/adc/ad7793.c
1166 +@@ -542,7 +542,7 @@ static const struct iio_info ad7797_info = {
1167 + .read_raw = &ad7793_read_raw,
1168 + .write_raw = &ad7793_write_raw,
1169 + .write_raw_get_fmt = &ad7793_write_raw_get_fmt,
1170 +- .attrs = &ad7793_attribute_group,
1171 ++ .attrs = &ad7797_attribute_group,
1172 + .validate_trigger = ad_sd_validate_trigger,
1173 + };
1174 +
1175 +diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h
1176 +index 9c3486a8134f..84b27b624149 100644
1177 +--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h
1178 ++++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h
1179 +@@ -337,6 +337,7 @@ enum st_lsm6dsx_fifo_mode {
1180 + * @gain: Configured sensor sensitivity.
1181 + * @odr: Output data rate of the sensor [Hz].
1182 + * @watermark: Sensor watermark level.
1183 ++ * @decimator: Sensor decimation factor.
1184 + * @sip: Number of samples in a given pattern.
1185 + * @ts_ref: Sensor timestamp reference for hw one.
1186 + * @ext_info: Sensor settings if it is connected to i2c controller
1187 +@@ -350,11 +351,13 @@ struct st_lsm6dsx_sensor {
1188 + u32 odr;
1189 +
1190 + u16 watermark;
1191 ++ u8 decimator;
1192 + u8 sip;
1193 + s64 ts_ref;
1194 +
1195 + struct {
1196 + const struct st_lsm6dsx_ext_dev_settings *settings;
1197 ++ u32 slv_odr;
1198 + u8 addr;
1199 + } ext_info;
1200 + };
1201 +diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
1202 +index bb899345f2bb..afd00daeefb2 100644
1203 +--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
1204 ++++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
1205 +@@ -93,6 +93,7 @@ st_lsm6dsx_get_decimator_val(struct st_lsm6dsx_sensor *sensor, u32 max_odr)
1206 + break;
1207 + }
1208 +
1209 ++ sensor->decimator = decimator;
1210 + return i == max_size ? 0 : st_lsm6dsx_decimator_table[i].val;
1211 + }
1212 +
1213 +@@ -337,7 +338,7 @@ static inline int st_lsm6dsx_read_block(struct st_lsm6dsx_hw *hw, u8 addr,
1214 + int st_lsm6dsx_read_fifo(struct st_lsm6dsx_hw *hw)
1215 + {
1216 + struct st_lsm6dsx_sensor *acc_sensor, *gyro_sensor, *ext_sensor = NULL;
1217 +- int err, acc_sip, gyro_sip, ts_sip, ext_sip, read_len, offset;
1218 ++ int err, sip, acc_sip, gyro_sip, ts_sip, ext_sip, read_len, offset;
1219 + u16 fifo_len, pattern_len = hw->sip * ST_LSM6DSX_SAMPLE_SIZE;
1220 + u16 fifo_diff_mask = hw->settings->fifo_ops.fifo_diff.mask;
1221 + u8 gyro_buff[ST_LSM6DSX_IIO_BUFF_SIZE];
1222 +@@ -399,19 +400,20 @@ int st_lsm6dsx_read_fifo(struct st_lsm6dsx_hw *hw)
1223 + acc_sip = acc_sensor->sip;
1224 + ts_sip = hw->ts_sip;
1225 + offset = 0;
1226 ++ sip = 0;
1227 +
1228 + while (acc_sip > 0 || gyro_sip > 0 || ext_sip > 0) {
1229 +- if (gyro_sip > 0) {
1230 ++ if (gyro_sip > 0 && !(sip % gyro_sensor->decimator)) {
1231 + memcpy(gyro_buff, &hw->buff[offset],
1232 + ST_LSM6DSX_SAMPLE_SIZE);
1233 + offset += ST_LSM6DSX_SAMPLE_SIZE;
1234 + }
1235 +- if (acc_sip > 0) {
1236 ++ if (acc_sip > 0 && !(sip % acc_sensor->decimator)) {
1237 + memcpy(acc_buff, &hw->buff[offset],
1238 + ST_LSM6DSX_SAMPLE_SIZE);
1239 + offset += ST_LSM6DSX_SAMPLE_SIZE;
1240 + }
1241 +- if (ext_sip > 0) {
1242 ++ if (ext_sip > 0 && !(sip % ext_sensor->decimator)) {
1243 + memcpy(ext_buff, &hw->buff[offset],
1244 + ST_LSM6DSX_SAMPLE_SIZE);
1245 + offset += ST_LSM6DSX_SAMPLE_SIZE;
1246 +@@ -441,18 +443,25 @@ int st_lsm6dsx_read_fifo(struct st_lsm6dsx_hw *hw)
1247 + offset += ST_LSM6DSX_SAMPLE_SIZE;
1248 + }
1249 +
1250 +- if (gyro_sip-- > 0)
1251 ++ if (gyro_sip > 0 && !(sip % gyro_sensor->decimator)) {
1252 + iio_push_to_buffers_with_timestamp(
1253 + hw->iio_devs[ST_LSM6DSX_ID_GYRO],
1254 + gyro_buff, gyro_sensor->ts_ref + ts);
1255 +- if (acc_sip-- > 0)
1256 ++ gyro_sip--;
1257 ++ }
1258 ++ if (acc_sip > 0 && !(sip % acc_sensor->decimator)) {
1259 + iio_push_to_buffers_with_timestamp(
1260 + hw->iio_devs[ST_LSM6DSX_ID_ACC],
1261 + acc_buff, acc_sensor->ts_ref + ts);
1262 +- if (ext_sip-- > 0)
1263 ++ acc_sip--;
1264 ++ }
1265 ++ if (ext_sip > 0 && !(sip % ext_sensor->decimator)) {
1266 + iio_push_to_buffers_with_timestamp(
1267 + hw->iio_devs[ST_LSM6DSX_ID_EXT0],
1268 + ext_buff, ext_sensor->ts_ref + ts);
1269 ++ ext_sip--;
1270 ++ }
1271 ++ sip++;
1272 + }
1273 + }
1274 +
1275 +diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c
1276 +index 95ddd19d1aa7..64ef07a30726 100644
1277 +--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c
1278 ++++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c
1279 +@@ -421,7 +421,8 @@ int st_lsm6dsx_shub_set_enable(struct st_lsm6dsx_sensor *sensor, bool enable)
1280 +
1281 + settings = sensor->ext_info.settings;
1282 + if (enable) {
1283 +- err = st_lsm6dsx_shub_set_odr(sensor, sensor->odr);
1284 ++ err = st_lsm6dsx_shub_set_odr(sensor,
1285 ++ sensor->ext_info.slv_odr);
1286 + if (err < 0)
1287 + return err;
1288 + } else {
1289 +@@ -459,7 +460,7 @@ st_lsm6dsx_shub_read_oneshot(struct st_lsm6dsx_sensor *sensor,
1290 + if (err < 0)
1291 + return err;
1292 +
1293 +- delay = 1000000000 / sensor->odr;
1294 ++ delay = 1000000000 / sensor->ext_info.slv_odr;
1295 + usleep_range(delay, 2 * delay);
1296 +
1297 + len = min_t(int, sizeof(data), ch->scan_type.realbits >> 3);
1298 +@@ -500,8 +501,8 @@ st_lsm6dsx_shub_read_raw(struct iio_dev *iio_dev,
1299 + iio_device_release_direct_mode(iio_dev);
1300 + break;
1301 + case IIO_CHAN_INFO_SAMP_FREQ:
1302 +- *val = sensor->odr / 1000;
1303 +- *val2 = (sensor->odr % 1000) * 1000;
1304 ++ *val = sensor->ext_info.slv_odr / 1000;
1305 ++ *val2 = (sensor->ext_info.slv_odr % 1000) * 1000;
1306 + ret = IIO_VAL_INT_PLUS_MICRO;
1307 + break;
1308 + case IIO_CHAN_INFO_SCALE:
1309 +@@ -535,8 +536,20 @@ st_lsm6dsx_shub_write_raw(struct iio_dev *iio_dev,
1310 +
1311 + val = val * 1000 + val2 / 1000;
1312 + err = st_lsm6dsx_shub_get_odr_val(sensor, val, &data);
1313 +- if (!err)
1314 +- sensor->odr = val;
1315 ++ if (!err) {
1316 ++ struct st_lsm6dsx_hw *hw = sensor->hw;
1317 ++ struct st_lsm6dsx_sensor *ref_sensor;
1318 ++ u8 odr_val;
1319 ++ int odr;
1320 ++
1321 ++ ref_sensor = iio_priv(hw->iio_devs[ST_LSM6DSX_ID_ACC]);
1322 ++ odr = st_lsm6dsx_check_odr(ref_sensor, val, &odr_val);
1323 ++ if (odr < 0)
1324 ++ return odr;
1325 ++
1326 ++ sensor->ext_info.slv_odr = val;
1327 ++ sensor->odr = odr;
1328 ++ }
1329 + break;
1330 + }
1331 + default:
1332 +@@ -613,6 +626,7 @@ st_lsm6dsx_shub_alloc_iiodev(struct st_lsm6dsx_hw *hw,
1333 + const struct st_lsm6dsx_ext_dev_settings *info,
1334 + u8 i2c_addr, const char *name)
1335 + {
1336 ++ enum st_lsm6dsx_sensor_id ref_id = ST_LSM6DSX_ID_ACC;
1337 + struct iio_chan_spec *ext_channels;
1338 + struct st_lsm6dsx_sensor *sensor;
1339 + struct iio_dev *iio_dev;
1340 +@@ -628,7 +642,8 @@ st_lsm6dsx_shub_alloc_iiodev(struct st_lsm6dsx_hw *hw,
1341 + sensor = iio_priv(iio_dev);
1342 + sensor->id = id;
1343 + sensor->hw = hw;
1344 +- sensor->odr = info->odr_table.odr_avl[0].milli_hz;
1345 ++ sensor->odr = hw->settings->odr_table[ref_id].odr_avl[0].milli_hz;
1346 ++ sensor->ext_info.slv_odr = info->odr_table.odr_avl[0].milli_hz;
1347 + sensor->gain = info->fs_table.fs_avl[0].gain;
1348 + sensor->ext_info.settings = info;
1349 + sensor->ext_info.addr = i2c_addr;
1350 +diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
1351 +index 7c8f65c9c32d..381513e05302 100644
1352 +--- a/drivers/irqchip/irq-gic-v3-its.c
1353 ++++ b/drivers/irqchip/irq-gic-v3-its.c
1354 +@@ -14,6 +14,7 @@
1355 + #include <linux/dma-iommu.h>
1356 + #include <linux/efi.h>
1357 + #include <linux/interrupt.h>
1358 ++#include <linux/iopoll.h>
1359 + #include <linux/irqdomain.h>
1360 + #include <linux/list.h>
1361 + #include <linux/log2.h>
1362 +@@ -3516,6 +3517,20 @@ out:
1363 + return IRQ_SET_MASK_OK_DONE;
1364 + }
1365 +
1366 ++static void its_wait_vpt_parse_complete(void)
1367 ++{
1368 ++ void __iomem *vlpi_base = gic_data_rdist_vlpi_base();
1369 ++ u64 val;
1370 ++
1371 ++ if (!gic_rdists->has_vpend_valid_dirty)
1372 ++ return;
1373 ++
1374 ++ WARN_ON_ONCE(readq_relaxed_poll_timeout(vlpi_base + GICR_VPENDBASER,
1375 ++ val,
1376 ++ !(val & GICR_VPENDBASER_Dirty),
1377 ++ 10, 500));
1378 ++}
1379 ++
1380 + static void its_vpe_schedule(struct its_vpe *vpe)
1381 + {
1382 + void __iomem *vlpi_base = gic_data_rdist_vlpi_base();
1383 +@@ -3546,6 +3561,8 @@ static void its_vpe_schedule(struct its_vpe *vpe)
1384 + val |= vpe->idai ? GICR_VPENDBASER_IDAI : 0;
1385 + val |= GICR_VPENDBASER_Valid;
1386 + gicr_write_vpendbaser(val, vlpi_base + GICR_VPENDBASER);
1387 ++
1388 ++ its_wait_vpt_parse_complete();
1389 + }
1390 +
1391 + static void its_vpe_deschedule(struct its_vpe *vpe)
1392 +@@ -3752,6 +3769,8 @@ static void its_vpe_4_1_schedule(struct its_vpe *vpe,
1393 + val |= FIELD_PREP(GICR_VPENDBASER_4_1_VPEID, vpe->vpe_id);
1394 +
1395 + gicr_write_vpendbaser(val, vlpi_base + GICR_VPENDBASER);
1396 ++
1397 ++ its_wait_vpt_parse_complete();
1398 + }
1399 +
1400 + static void its_vpe_4_1_deschedule(struct its_vpe *vpe,
1401 +diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
1402 +index 1eec9d4649d5..71a84f9c5696 100644
1403 +--- a/drivers/irqchip/irq-gic-v3.c
1404 ++++ b/drivers/irqchip/irq-gic-v3.c
1405 +@@ -866,6 +866,7 @@ static int __gic_update_rdist_properties(struct redist_region *region,
1406 + gic_data.rdists.has_rvpeid &= !!(typer & GICR_TYPER_RVPEID);
1407 + gic_data.rdists.has_direct_lpi &= (!!(typer & GICR_TYPER_DirectLPIS) |
1408 + gic_data.rdists.has_rvpeid);
1409 ++ gic_data.rdists.has_vpend_valid_dirty &= !!(typer & GICR_TYPER_DIRTY);
1410 +
1411 + /* Detect non-sensical configurations */
1412 + if (WARN_ON_ONCE(gic_data.rdists.has_rvpeid && !gic_data.rdists.has_vlpis)) {
1413 +@@ -886,10 +887,11 @@ static void gic_update_rdist_properties(void)
1414 + if (WARN_ON(gic_data.ppi_nr == UINT_MAX))
1415 + gic_data.ppi_nr = 0;
1416 + pr_info("%d PPIs implemented\n", gic_data.ppi_nr);
1417 +- pr_info("%sVLPI support, %sdirect LPI support, %sRVPEID support\n",
1418 +- !gic_data.rdists.has_vlpis ? "no " : "",
1419 +- !gic_data.rdists.has_direct_lpi ? "no " : "",
1420 +- !gic_data.rdists.has_rvpeid ? "no " : "");
1421 ++ if (gic_data.rdists.has_vlpis)
1422 ++ pr_info("GICv4 features: %s%s%s\n",
1423 ++ gic_data.rdists.has_direct_lpi ? "DirectLPI " : "",
1424 ++ gic_data.rdists.has_rvpeid ? "RVPEID " : "",
1425 ++ gic_data.rdists.has_vpend_valid_dirty ? "Valid+Dirty " : "");
1426 + }
1427 +
1428 + /* Check whether it's single security state view */
1429 +@@ -1614,6 +1616,7 @@ static int __init gic_init_bases(void __iomem *dist_base,
1430 + gic_data.rdists.has_rvpeid = true;
1431 + gic_data.rdists.has_vlpis = true;
1432 + gic_data.rdists.has_direct_lpi = true;
1433 ++ gic_data.rdists.has_vpend_valid_dirty = true;
1434 +
1435 + if (WARN_ON(!gic_data.domain) || WARN_ON(!gic_data.rdists.rdist)) {
1436 + err = -ENOMEM;
1437 +diff --git a/drivers/irqchip/irq-meson-gpio.c b/drivers/irqchip/irq-meson-gpio.c
1438 +index ccc7f823911b..bc7aebcc96e9 100644
1439 +--- a/drivers/irqchip/irq-meson-gpio.c
1440 ++++ b/drivers/irqchip/irq-meson-gpio.c
1441 +@@ -144,12 +144,17 @@ struct meson_gpio_irq_controller {
1442 + static void meson_gpio_irq_update_bits(struct meson_gpio_irq_controller *ctl,
1443 + unsigned int reg, u32 mask, u32 val)
1444 + {
1445 ++ unsigned long flags;
1446 + u32 tmp;
1447 +
1448 ++ spin_lock_irqsave(&ctl->lock, flags);
1449 ++
1450 + tmp = readl_relaxed(ctl->base + reg);
1451 + tmp &= ~mask;
1452 + tmp |= val;
1453 + writel_relaxed(tmp, ctl->base + reg);
1454 ++
1455 ++ spin_unlock_irqrestore(&ctl->lock, flags);
1456 + }
1457 +
1458 + static void meson_gpio_irq_init_dummy(struct meson_gpio_irq_controller *ctl)
1459 +@@ -196,14 +201,15 @@ meson_gpio_irq_request_channel(struct meson_gpio_irq_controller *ctl,
1460 + unsigned long hwirq,
1461 + u32 **channel_hwirq)
1462 + {
1463 ++ unsigned long flags;
1464 + unsigned int idx;
1465 +
1466 +- spin_lock(&ctl->lock);
1467 ++ spin_lock_irqsave(&ctl->lock, flags);
1468 +
1469 + /* Find a free channel */
1470 + idx = find_first_zero_bit(ctl->channel_map, NUM_CHANNEL);
1471 + if (idx >= NUM_CHANNEL) {
1472 +- spin_unlock(&ctl->lock);
1473 ++ spin_unlock_irqrestore(&ctl->lock, flags);
1474 + pr_err("No channel available\n");
1475 + return -ENOSPC;
1476 + }
1477 +@@ -211,6 +217,8 @@ meson_gpio_irq_request_channel(struct meson_gpio_irq_controller *ctl,
1478 + /* Mark the channel as used */
1479 + set_bit(idx, ctl->channel_map);
1480 +
1481 ++ spin_unlock_irqrestore(&ctl->lock, flags);
1482 ++
1483 + /*
1484 + * Setup the mux of the channel to route the signal of the pad
1485 + * to the appropriate input of the GIC
1486 +@@ -225,8 +233,6 @@ meson_gpio_irq_request_channel(struct meson_gpio_irq_controller *ctl,
1487 + */
1488 + *channel_hwirq = &(ctl->channel_irqs[idx]);
1489 +
1490 +- spin_unlock(&ctl->lock);
1491 +-
1492 + pr_debug("hwirq %lu assigned to channel %d - irq %u\n",
1493 + hwirq, idx, **channel_hwirq);
1494 +
1495 +@@ -287,13 +293,9 @@ static int meson_gpio_irq_type_setup(struct meson_gpio_irq_controller *ctl,
1496 + val |= REG_EDGE_POL_LOW(params, idx);
1497 + }
1498 +
1499 +- spin_lock(&ctl->lock);
1500 +-
1501 + meson_gpio_irq_update_bits(ctl, REG_EDGE_POL,
1502 + REG_EDGE_POL_MASK(params, idx), val);
1503 +
1504 +- spin_unlock(&ctl->lock);
1505 +-
1506 + return 0;
1507 + }
1508 +
1509 +diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
1510 +index 844fdcf55118..2d4ed751333f 100644
1511 +--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
1512 ++++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
1513 +@@ -3748,7 +3748,7 @@ int t4_phy_fw_ver(struct adapter *adap, int *phy_fw_ver)
1514 + FW_PARAMS_PARAM_Z_V(FW_PARAMS_PARAM_DEV_PHYFW_VERSION));
1515 + ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 1,
1516 + &param, &val);
1517 +- if (ret < 0)
1518 ++ if (ret)
1519 + return ret;
1520 + *phy_fw_ver = val;
1521 + return 0;
1522 +diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/freescale/fec.h
1523 +index f79e57f735b3..d89568f810bc 100644
1524 +--- a/drivers/net/ethernet/freescale/fec.h
1525 ++++ b/drivers/net/ethernet/freescale/fec.h
1526 +@@ -488,6 +488,12 @@ struct fec_enet_priv_rx_q {
1527 + struct sk_buff *rx_skbuff[RX_RING_SIZE];
1528 + };
1529 +
1530 ++struct fec_stop_mode_gpr {
1531 ++ struct regmap *gpr;
1532 ++ u8 reg;
1533 ++ u8 bit;
1534 ++};
1535 ++
1536 + /* The FEC buffer descriptors track the ring buffers. The rx_bd_base and
1537 + * tx_bd_base always point to the base of the buffer descriptors. The
1538 + * cur_rx and cur_tx point to the currently available buffer.
1539 +@@ -562,6 +568,7 @@ struct fec_enet_private {
1540 + int hwts_tx_en;
1541 + struct delayed_work time_keep;
1542 + struct regulator *reg_phy;
1543 ++ struct fec_stop_mode_gpr stop_gpr;
1544 +
1545 + unsigned int tx_align;
1546 + unsigned int rx_align;
1547 +diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
1548 +index 23c5fef2f1ad..869efbb6c4d0 100644
1549 +--- a/drivers/net/ethernet/freescale/fec_main.c
1550 ++++ b/drivers/net/ethernet/freescale/fec_main.c
1551 +@@ -62,6 +62,8 @@
1552 + #include <linux/if_vlan.h>
1553 + #include <linux/pinctrl/consumer.h>
1554 + #include <linux/prefetch.h>
1555 ++#include <linux/mfd/syscon.h>
1556 ++#include <linux/regmap.h>
1557 + #include <soc/imx/cpuidle.h>
1558 +
1559 + #include <asm/cacheflush.h>
1560 +@@ -84,6 +86,56 @@ static void fec_enet_itr_coal_init(struct net_device *ndev);
1561 + #define FEC_ENET_OPD_V 0xFFF0
1562 + #define FEC_MDIO_PM_TIMEOUT 100 /* ms */
1563 +
1564 ++struct fec_devinfo {
1565 ++ u32 quirks;
1566 ++ u8 stop_gpr_reg;
1567 ++ u8 stop_gpr_bit;
1568 ++};
1569 ++
1570 ++static const struct fec_devinfo fec_imx25_info = {
1571 ++ .quirks = FEC_QUIRK_USE_GASKET | FEC_QUIRK_MIB_CLEAR |
1572 ++ FEC_QUIRK_HAS_FRREG,
1573 ++};
1574 ++
1575 ++static const struct fec_devinfo fec_imx27_info = {
1576 ++ .quirks = FEC_QUIRK_MIB_CLEAR | FEC_QUIRK_HAS_FRREG,
1577 ++};
1578 ++
1579 ++static const struct fec_devinfo fec_imx28_info = {
1580 ++ .quirks = FEC_QUIRK_ENET_MAC | FEC_QUIRK_SWAP_FRAME |
1581 ++ FEC_QUIRK_SINGLE_MDIO | FEC_QUIRK_HAS_RACC |
1582 ++ FEC_QUIRK_HAS_FRREG,
1583 ++};
1584 ++
1585 ++static const struct fec_devinfo fec_imx6q_info = {
1586 ++ .quirks = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_GBIT |
1587 ++ FEC_QUIRK_HAS_BUFDESC_EX | FEC_QUIRK_HAS_CSUM |
1588 ++ FEC_QUIRK_HAS_VLAN | FEC_QUIRK_ERR006358 |
1589 ++ FEC_QUIRK_HAS_RACC,
1590 ++ .stop_gpr_reg = 0x34,
1591 ++ .stop_gpr_bit = 27,
1592 ++};
1593 ++
1594 ++static const struct fec_devinfo fec_mvf600_info = {
1595 ++ .quirks = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_RACC,
1596 ++};
1597 ++
1598 ++static const struct fec_devinfo fec_imx6x_info = {
1599 ++ .quirks = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_GBIT |
1600 ++ FEC_QUIRK_HAS_BUFDESC_EX | FEC_QUIRK_HAS_CSUM |
1601 ++ FEC_QUIRK_HAS_VLAN | FEC_QUIRK_HAS_AVB |
1602 ++ FEC_QUIRK_ERR007885 | FEC_QUIRK_BUG_CAPTURE |
1603 ++ FEC_QUIRK_HAS_RACC | FEC_QUIRK_HAS_COALESCE,
1604 ++};
1605 ++
1606 ++static const struct fec_devinfo fec_imx6ul_info = {
1607 ++ .quirks = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_GBIT |
1608 ++ FEC_QUIRK_HAS_BUFDESC_EX | FEC_QUIRK_HAS_CSUM |
1609 ++ FEC_QUIRK_HAS_VLAN | FEC_QUIRK_ERR007885 |
1610 ++ FEC_QUIRK_BUG_CAPTURE | FEC_QUIRK_HAS_RACC |
1611 ++ FEC_QUIRK_HAS_COALESCE,
1612 ++};
1613 ++
1614 + static struct platform_device_id fec_devtype[] = {
1615 + {
1616 + /* keep it for coldfire */
1617 +@@ -91,39 +143,25 @@ static struct platform_device_id fec_devtype[] = {
1618 + .driver_data = 0,
1619 + }, {
1620 + .name = "imx25-fec",
1621 +- .driver_data = FEC_QUIRK_USE_GASKET | FEC_QUIRK_MIB_CLEAR |
1622 +- FEC_QUIRK_HAS_FRREG,
1623 ++ .driver_data = (kernel_ulong_t)&fec_imx25_info,
1624 + }, {
1625 + .name = "imx27-fec",
1626 +- .driver_data = FEC_QUIRK_MIB_CLEAR | FEC_QUIRK_HAS_FRREG,
1627 ++ .driver_data = (kernel_ulong_t)&fec_imx27_info,
1628 + }, {
1629 + .name = "imx28-fec",
1630 +- .driver_data = FEC_QUIRK_ENET_MAC | FEC_QUIRK_SWAP_FRAME |
1631 +- FEC_QUIRK_SINGLE_MDIO | FEC_QUIRK_HAS_RACC |
1632 +- FEC_QUIRK_HAS_FRREG,
1633 ++ .driver_data = (kernel_ulong_t)&fec_imx28_info,
1634 + }, {
1635 + .name = "imx6q-fec",
1636 +- .driver_data = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_GBIT |
1637 +- FEC_QUIRK_HAS_BUFDESC_EX | FEC_QUIRK_HAS_CSUM |
1638 +- FEC_QUIRK_HAS_VLAN | FEC_QUIRK_ERR006358 |
1639 +- FEC_QUIRK_HAS_RACC,
1640 ++ .driver_data = (kernel_ulong_t)&fec_imx6q_info,
1641 + }, {
1642 + .name = "mvf600-fec",
1643 +- .driver_data = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_RACC,
1644 ++ .driver_data = (kernel_ulong_t)&fec_mvf600_info,
1645 + }, {
1646 + .name = "imx6sx-fec",
1647 +- .driver_data = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_GBIT |
1648 +- FEC_QUIRK_HAS_BUFDESC_EX | FEC_QUIRK_HAS_CSUM |
1649 +- FEC_QUIRK_HAS_VLAN | FEC_QUIRK_HAS_AVB |
1650 +- FEC_QUIRK_ERR007885 | FEC_QUIRK_BUG_CAPTURE |
1651 +- FEC_QUIRK_HAS_RACC | FEC_QUIRK_HAS_COALESCE,
1652 ++ .driver_data = (kernel_ulong_t)&fec_imx6x_info,
1653 + }, {
1654 + .name = "imx6ul-fec",
1655 +- .driver_data = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_GBIT |
1656 +- FEC_QUIRK_HAS_BUFDESC_EX | FEC_QUIRK_HAS_CSUM |
1657 +- FEC_QUIRK_HAS_VLAN | FEC_QUIRK_ERR007885 |
1658 +- FEC_QUIRK_BUG_CAPTURE | FEC_QUIRK_HAS_RACC |
1659 +- FEC_QUIRK_HAS_COALESCE,
1660 ++ .driver_data = (kernel_ulong_t)&fec_imx6ul_info,
1661 + }, {
1662 + /* sentinel */
1663 + }
1664 +@@ -1092,11 +1130,28 @@ fec_restart(struct net_device *ndev)
1665 +
1666 + }
1667 +
1668 ++static void fec_enet_stop_mode(struct fec_enet_private *fep, bool enabled)
1669 ++{
1670 ++ struct fec_platform_data *pdata = fep->pdev->dev.platform_data;
1671 ++ struct fec_stop_mode_gpr *stop_gpr = &fep->stop_gpr;
1672 ++
1673 ++ if (stop_gpr->gpr) {
1674 ++ if (enabled)
1675 ++ regmap_update_bits(stop_gpr->gpr, stop_gpr->reg,
1676 ++ BIT(stop_gpr->bit),
1677 ++ BIT(stop_gpr->bit));
1678 ++ else
1679 ++ regmap_update_bits(stop_gpr->gpr, stop_gpr->reg,
1680 ++ BIT(stop_gpr->bit), 0);
1681 ++ } else if (pdata && pdata->sleep_mode_enable) {
1682 ++ pdata->sleep_mode_enable(enabled);
1683 ++ }
1684 ++}
1685 ++
1686 + static void
1687 + fec_stop(struct net_device *ndev)
1688 + {
1689 + struct fec_enet_private *fep = netdev_priv(ndev);
1690 +- struct fec_platform_data *pdata = fep->pdev->dev.platform_data;
1691 + u32 rmii_mode = readl(fep->hwp + FEC_R_CNTRL) & (1 << 8);
1692 + u32 val;
1693 +
1694 +@@ -1125,9 +1180,7 @@ fec_stop(struct net_device *ndev)
1695 + val = readl(fep->hwp + FEC_ECNTRL);
1696 + val |= (FEC_ECR_MAGICEN | FEC_ECR_SLEEP);
1697 + writel(val, fep->hwp + FEC_ECNTRL);
1698 +-
1699 +- if (pdata && pdata->sleep_mode_enable)
1700 +- pdata->sleep_mode_enable(true);
1701 ++ fec_enet_stop_mode(fep, true);
1702 + }
1703 + writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED);
1704 +
1705 +@@ -3397,6 +3450,37 @@ static int fec_enet_get_irq_cnt(struct platform_device *pdev)
1706 + return irq_cnt;
1707 + }
1708 +
1709 ++static int fec_enet_init_stop_mode(struct fec_enet_private *fep,
1710 ++ struct fec_devinfo *dev_info,
1711 ++ struct device_node *np)
1712 ++{
1713 ++ struct device_node *gpr_np;
1714 ++ int ret = 0;
1715 ++
1716 ++ if (!dev_info)
1717 ++ return 0;
1718 ++
1719 ++ gpr_np = of_parse_phandle(np, "gpr", 0);
1720 ++ if (!gpr_np)
1721 ++ return 0;
1722 ++
1723 ++ fep->stop_gpr.gpr = syscon_node_to_regmap(gpr_np);
1724 ++ if (IS_ERR(fep->stop_gpr.gpr)) {
1725 ++ dev_err(&fep->pdev->dev, "could not find gpr regmap\n");
1726 ++ ret = PTR_ERR(fep->stop_gpr.gpr);
1727 ++ fep->stop_gpr.gpr = NULL;
1728 ++ goto out;
1729 ++ }
1730 ++
1731 ++ fep->stop_gpr.reg = dev_info->stop_gpr_reg;
1732 ++ fep->stop_gpr.bit = dev_info->stop_gpr_bit;
1733 ++
1734 ++out:
1735 ++ of_node_put(gpr_np);
1736 ++
1737 ++ return ret;
1738 ++}
1739 ++
1740 + static int
1741 + fec_probe(struct platform_device *pdev)
1742 + {
1743 +@@ -3412,6 +3496,7 @@ fec_probe(struct platform_device *pdev)
1744 + int num_rx_qs;
1745 + char irq_name[8];
1746 + int irq_cnt;
1747 ++ struct fec_devinfo *dev_info;
1748 +
1749 + fec_enet_get_queue_num(pdev, &num_tx_qs, &num_rx_qs);
1750 +
1751 +@@ -3429,7 +3514,9 @@ fec_probe(struct platform_device *pdev)
1752 + of_id = of_match_device(fec_dt_ids, &pdev->dev);
1753 + if (of_id)
1754 + pdev->id_entry = of_id->data;
1755 +- fep->quirks = pdev->id_entry->driver_data;
1756 ++ dev_info = (struct fec_devinfo *)pdev->id_entry->driver_data;
1757 ++ if (dev_info)
1758 ++ fep->quirks = dev_info->quirks;
1759 +
1760 + fep->netdev = ndev;
1761 + fep->num_rx_queues = num_rx_qs;
1762 +@@ -3463,6 +3550,10 @@ fec_probe(struct platform_device *pdev)
1763 + if (of_get_property(np, "fsl,magic-packet", NULL))
1764 + fep->wol_flag |= FEC_WOL_HAS_MAGIC_PACKET;
1765 +
1766 ++ ret = fec_enet_init_stop_mode(fep, dev_info, np);
1767 ++ if (ret)
1768 ++ goto failed_stop_mode;
1769 ++
1770 + phy_node = of_parse_phandle(np, "phy-handle", 0);
1771 + if (!phy_node && of_phy_is_fixed_link(np)) {
1772 + ret = of_phy_register_fixed_link(np);
1773 +@@ -3631,6 +3722,7 @@ failed_clk:
1774 + if (of_phy_is_fixed_link(np))
1775 + of_phy_deregister_fixed_link(np);
1776 + of_node_put(phy_node);
1777 ++failed_stop_mode:
1778 + failed_phy:
1779 + dev_id--;
1780 + failed_ioremap:
1781 +@@ -3708,7 +3800,6 @@ static int __maybe_unused fec_resume(struct device *dev)
1782 + {
1783 + struct net_device *ndev = dev_get_drvdata(dev);
1784 + struct fec_enet_private *fep = netdev_priv(ndev);
1785 +- struct fec_platform_data *pdata = fep->pdev->dev.platform_data;
1786 + int ret;
1787 + int val;
1788 +
1789 +@@ -3726,8 +3817,8 @@ static int __maybe_unused fec_resume(struct device *dev)
1790 + goto failed_clk;
1791 + }
1792 + if (fep->wol_flag & FEC_WOL_FLAG_ENABLE) {
1793 +- if (pdata && pdata->sleep_mode_enable)
1794 +- pdata->sleep_mode_enable(false);
1795 ++ fec_enet_stop_mode(fep, false);
1796 ++
1797 + val = readl(fep->hwp + FEC_ECNTRL);
1798 + val &= ~(FEC_ECR_MAGICEN | FEC_ECR_SLEEP);
1799 + writel(val, fep->hwp + FEC_ECNTRL);
1800 +diff --git a/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c b/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
1801 +index 94d7b69a95c7..eb2e57ff08a6 100644
1802 +--- a/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
1803 ++++ b/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
1804 +@@ -935,7 +935,7 @@ struct mlx5_fw_tracer *mlx5_fw_tracer_create(struct mlx5_core_dev *dev)
1805 + return NULL;
1806 + }
1807 +
1808 +- tracer = kzalloc(sizeof(*tracer), GFP_KERNEL);
1809 ++ tracer = kvzalloc(sizeof(*tracer), GFP_KERNEL);
1810 + if (!tracer)
1811 + return ERR_PTR(-ENOMEM);
1812 +
1813 +@@ -982,7 +982,7 @@ destroy_workqueue:
1814 + tracer->dev = NULL;
1815 + destroy_workqueue(tracer->work_queue);
1816 + free_tracer:
1817 +- kfree(tracer);
1818 ++ kvfree(tracer);
1819 + return ERR_PTR(err);
1820 + }
1821 +
1822 +@@ -1061,7 +1061,7 @@ void mlx5_fw_tracer_destroy(struct mlx5_fw_tracer *tracer)
1823 + mlx5_fw_tracer_destroy_log_buf(tracer);
1824 + flush_workqueue(tracer->work_queue);
1825 + destroy_workqueue(tracer->work_queue);
1826 +- kfree(tracer);
1827 ++ kvfree(tracer);
1828 + }
1829 +
1830 + static int fw_tracer_event(struct notifier_block *nb, unsigned long action, void *data)
1831 +diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h
1832 +index ddd2409fc8be..5a5e6a21c6e1 100644
1833 +--- a/drivers/net/ethernet/mellanox/mlx5/core/en.h
1834 ++++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h
1835 +@@ -367,6 +367,7 @@ enum {
1836 + MLX5E_SQ_STATE_AM,
1837 + MLX5E_SQ_STATE_TLS,
1838 + MLX5E_SQ_STATE_VLAN_NEED_L2_INLINE,
1839 ++ MLX5E_SQ_STATE_PENDING_XSK_TX,
1840 + };
1841 +
1842 + struct mlx5e_sq_wqe_info {
1843 +@@ -950,7 +951,7 @@ void mlx5e_page_release_dynamic(struct mlx5e_rq *rq,
1844 + void mlx5e_handle_rx_cqe(struct mlx5e_rq *rq, struct mlx5_cqe64 *cqe);
1845 + void mlx5e_handle_rx_cqe_mpwrq(struct mlx5e_rq *rq, struct mlx5_cqe64 *cqe);
1846 + bool mlx5e_post_rx_wqes(struct mlx5e_rq *rq);
1847 +-void mlx5e_poll_ico_cq(struct mlx5e_cq *cq);
1848 ++int mlx5e_poll_ico_cq(struct mlx5e_cq *cq);
1849 + bool mlx5e_post_rx_mpwqes(struct mlx5e_rq *rq);
1850 + void mlx5e_dealloc_rx_wqe(struct mlx5e_rq *rq, u16 ix);
1851 + void mlx5e_dealloc_rx_mpwqe(struct mlx5e_rq *rq, u16 ix);
1852 +diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/tx.c
1853 +index fe2d596cb361..3bcdb5b2fc20 100644
1854 +--- a/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/tx.c
1855 ++++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/tx.c
1856 +@@ -33,6 +33,9 @@ int mlx5e_xsk_wakeup(struct net_device *dev, u32 qid, u32 flags)
1857 + if (unlikely(!test_bit(MLX5E_SQ_STATE_ENABLED, &c->xskicosq.state)))
1858 + return 0;
1859 +
1860 ++ if (test_and_set_bit(MLX5E_SQ_STATE_PENDING_XSK_TX, &c->xskicosq.state))
1861 ++ return 0;
1862 ++
1863 + spin_lock(&c->xskicosq_lock);
1864 + mlx5e_trigger_irq(&c->xskicosq);
1865 + spin_unlock(&c->xskicosq_lock);
1866 +diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
1867 +index 265073996432..d02db5aebac4 100644
1868 +--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
1869 ++++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
1870 +@@ -3568,7 +3568,12 @@ mlx5e_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats)
1871 + struct mlx5e_vport_stats *vstats = &priv->stats.vport;
1872 + struct mlx5e_pport_stats *pstats = &priv->stats.pport;
1873 +
1874 +- if (!mlx5e_monitor_counter_supported(priv)) {
1875 ++ /* In switchdev mode, monitor counters doesn't monitor
1876 ++ * rx/tx stats of 802_3. The update stats mechanism
1877 ++ * should keep the 802_3 layout counters updated
1878 ++ */
1879 ++ if (!mlx5e_monitor_counter_supported(priv) ||
1880 ++ mlx5e_is_uplink_rep(priv)) {
1881 + /* update HW stats in background for next time */
1882 + mlx5e_queue_update_stats(priv);
1883 + }
1884 +diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
1885 +index 312d4692425b..a9a96a630e4d 100644
1886 +--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
1887 ++++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
1888 +@@ -587,7 +587,7 @@ bool mlx5e_post_rx_wqes(struct mlx5e_rq *rq)
1889 + return !!err;
1890 + }
1891 +
1892 +-void mlx5e_poll_ico_cq(struct mlx5e_cq *cq)
1893 ++int mlx5e_poll_ico_cq(struct mlx5e_cq *cq)
1894 + {
1895 + struct mlx5e_icosq *sq = container_of(cq, struct mlx5e_icosq, cq);
1896 + struct mlx5_cqe64 *cqe;
1897 +@@ -595,11 +595,11 @@ void mlx5e_poll_ico_cq(struct mlx5e_cq *cq)
1898 + int i;
1899 +
1900 + if (unlikely(!test_bit(MLX5E_SQ_STATE_ENABLED, &sq->state)))
1901 +- return;
1902 ++ return 0;
1903 +
1904 + cqe = mlx5_cqwq_get_cqe(&cq->wq);
1905 + if (likely(!cqe))
1906 +- return;
1907 ++ return 0;
1908 +
1909 + /* sq->cc must be updated only after mlx5_cqwq_update_db_record(),
1910 + * otherwise a cq overrun may occur
1911 +@@ -648,6 +648,8 @@ void mlx5e_poll_ico_cq(struct mlx5e_cq *cq)
1912 + sq->cc = sqcc;
1913 +
1914 + mlx5_cqwq_update_db_record(&cq->wq);
1915 ++
1916 ++ return i;
1917 + }
1918 +
1919 + bool mlx5e_post_rx_mpwqes(struct mlx5e_rq *rq)
1920 +diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c
1921 +index 800d34ed8a96..76efa9579215 100644
1922 +--- a/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c
1923 ++++ b/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c
1924 +@@ -145,7 +145,11 @@ int mlx5e_napi_poll(struct napi_struct *napi, int budget)
1925 +
1926 + busy |= rq->post_wqes(rq);
1927 + if (xsk_open) {
1928 +- mlx5e_poll_ico_cq(&c->xskicosq.cq);
1929 ++ if (mlx5e_poll_ico_cq(&c->xskicosq.cq))
1930 ++ /* Don't clear the flag if nothing was polled to prevent
1931 ++ * queueing more WQEs and overflowing XSKICOSQ.
1932 ++ */
1933 ++ clear_bit(MLX5E_SQ_STATE_PENDING_XSK_TX, &c->xskicosq.state);
1934 + busy |= mlx5e_poll_xdpsq_cq(&xsksq->cq);
1935 + busy_xsk |= mlx5e_napi_xsk_post(xsksq, xskrq);
1936 + }
1937 +diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c b/drivers/net/ethernet/qlogic/qed/qed_dev.c
1938 +index 03bdd2e26329..38a65b984e47 100644
1939 +--- a/drivers/net/ethernet/qlogic/qed/qed_dev.c
1940 ++++ b/drivers/net/ethernet/qlogic/qed/qed_dev.c
1941 +@@ -4691,26 +4691,20 @@ static void qed_chain_free_single(struct qed_dev *cdev,
1942 +
1943 + static void qed_chain_free_pbl(struct qed_dev *cdev, struct qed_chain *p_chain)
1944 + {
1945 +- void **pp_virt_addr_tbl = p_chain->pbl.pp_virt_addr_tbl;
1946 ++ struct addr_tbl_entry *pp_addr_tbl = p_chain->pbl.pp_addr_tbl;
1947 + u32 page_cnt = p_chain->page_cnt, i, pbl_size;
1948 +- u8 *p_pbl_virt = p_chain->pbl_sp.p_virt_table;
1949 +
1950 +- if (!pp_virt_addr_tbl)
1951 ++ if (!pp_addr_tbl)
1952 + return;
1953 +
1954 +- if (!p_pbl_virt)
1955 +- goto out;
1956 +-
1957 + for (i = 0; i < page_cnt; i++) {
1958 +- if (!pp_virt_addr_tbl[i])
1959 ++ if (!pp_addr_tbl[i].virt_addr || !pp_addr_tbl[i].dma_map)
1960 + break;
1961 +
1962 + dma_free_coherent(&cdev->pdev->dev,
1963 + QED_CHAIN_PAGE_SIZE,
1964 +- pp_virt_addr_tbl[i],
1965 +- *(dma_addr_t *)p_pbl_virt);
1966 +-
1967 +- p_pbl_virt += QED_CHAIN_PBL_ENTRY_SIZE;
1968 ++ pp_addr_tbl[i].virt_addr,
1969 ++ pp_addr_tbl[i].dma_map);
1970 + }
1971 +
1972 + pbl_size = page_cnt * QED_CHAIN_PBL_ENTRY_SIZE;
1973 +@@ -4720,9 +4714,9 @@ static void qed_chain_free_pbl(struct qed_dev *cdev, struct qed_chain *p_chain)
1974 + pbl_size,
1975 + p_chain->pbl_sp.p_virt_table,
1976 + p_chain->pbl_sp.p_phys_table);
1977 +-out:
1978 +- vfree(p_chain->pbl.pp_virt_addr_tbl);
1979 +- p_chain->pbl.pp_virt_addr_tbl = NULL;
1980 ++
1981 ++ vfree(p_chain->pbl.pp_addr_tbl);
1982 ++ p_chain->pbl.pp_addr_tbl = NULL;
1983 + }
1984 +
1985 + void qed_chain_free(struct qed_dev *cdev, struct qed_chain *p_chain)
1986 +@@ -4823,19 +4817,19 @@ qed_chain_alloc_pbl(struct qed_dev *cdev,
1987 + {
1988 + u32 page_cnt = p_chain->page_cnt, size, i;
1989 + dma_addr_t p_phys = 0, p_pbl_phys = 0;
1990 +- void **pp_virt_addr_tbl = NULL;
1991 ++ struct addr_tbl_entry *pp_addr_tbl;
1992 + u8 *p_pbl_virt = NULL;
1993 + void *p_virt = NULL;
1994 +
1995 +- size = page_cnt * sizeof(*pp_virt_addr_tbl);
1996 +- pp_virt_addr_tbl = vzalloc(size);
1997 +- if (!pp_virt_addr_tbl)
1998 ++ size = page_cnt * sizeof(*pp_addr_tbl);
1999 ++ pp_addr_tbl = vzalloc(size);
2000 ++ if (!pp_addr_tbl)
2001 + return -ENOMEM;
2002 +
2003 + /* The allocation of the PBL table is done with its full size, since it
2004 + * is expected to be successive.
2005 + * qed_chain_init_pbl_mem() is called even in a case of an allocation
2006 +- * failure, since pp_virt_addr_tbl was previously allocated, and it
2007 ++ * failure, since tbl was previously allocated, and it
2008 + * should be saved to allow its freeing during the error flow.
2009 + */
2010 + size = page_cnt * QED_CHAIN_PBL_ENTRY_SIZE;
2011 +@@ -4849,8 +4843,7 @@ qed_chain_alloc_pbl(struct qed_dev *cdev,
2012 + p_chain->b_external_pbl = true;
2013 + }
2014 +
2015 +- qed_chain_init_pbl_mem(p_chain, p_pbl_virt, p_pbl_phys,
2016 +- pp_virt_addr_tbl);
2017 ++ qed_chain_init_pbl_mem(p_chain, p_pbl_virt, p_pbl_phys, pp_addr_tbl);
2018 + if (!p_pbl_virt)
2019 + return -ENOMEM;
2020 +
2021 +@@ -4869,7 +4862,8 @@ qed_chain_alloc_pbl(struct qed_dev *cdev,
2022 + /* Fill the PBL table with the physical address of the page */
2023 + *(dma_addr_t *)p_pbl_virt = p_phys;
2024 + /* Keep the virtual address of the page */
2025 +- p_chain->pbl.pp_virt_addr_tbl[i] = p_virt;
2026 ++ p_chain->pbl.pp_addr_tbl[i].virt_addr = p_virt;
2027 ++ p_chain->pbl.pp_addr_tbl[i].dma_map = p_phys;
2028 +
2029 + p_pbl_virt += QED_CHAIN_PBL_ENTRY_SIZE;
2030 + }
2031 +diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c b/drivers/net/ethernet/qlogic/qed/qed_main.c
2032 +index 2c189c637cca..96356e897c80 100644
2033 +--- a/drivers/net/ethernet/qlogic/qed/qed_main.c
2034 ++++ b/drivers/net/ethernet/qlogic/qed/qed_main.c
2035 +@@ -1087,9 +1087,6 @@ static void qed_update_pf_params(struct qed_dev *cdev,
2036 + #define QED_PERIODIC_DB_REC_INTERVAL_MS 100
2037 + #define QED_PERIODIC_DB_REC_INTERVAL \
2038 + msecs_to_jiffies(QED_PERIODIC_DB_REC_INTERVAL_MS)
2039 +-#define QED_PERIODIC_DB_REC_WAIT_COUNT 10
2040 +-#define QED_PERIODIC_DB_REC_WAIT_INTERVAL \
2041 +- (QED_PERIODIC_DB_REC_INTERVAL_MS / QED_PERIODIC_DB_REC_WAIT_COUNT)
2042 +
2043 + static int qed_slowpath_delayed_work(struct qed_hwfn *hwfn,
2044 + enum qed_slowpath_wq_flag wq_flag,
2045 +@@ -1123,7 +1120,7 @@ void qed_periodic_db_rec_start(struct qed_hwfn *p_hwfn)
2046 +
2047 + static void qed_slowpath_wq_stop(struct qed_dev *cdev)
2048 + {
2049 +- int i, sleep_count = QED_PERIODIC_DB_REC_WAIT_COUNT;
2050 ++ int i;
2051 +
2052 + if (IS_VF(cdev))
2053 + return;
2054 +@@ -1135,13 +1132,7 @@ static void qed_slowpath_wq_stop(struct qed_dev *cdev)
2055 + /* Stop queuing new delayed works */
2056 + cdev->hwfns[i].slowpath_wq_active = false;
2057 +
2058 +- /* Wait until the last periodic doorbell recovery is executed */
2059 +- while (test_bit(QED_SLOWPATH_PERIODIC_DB_REC,
2060 +- &cdev->hwfns[i].slowpath_task_flags) &&
2061 +- sleep_count--)
2062 +- msleep(QED_PERIODIC_DB_REC_WAIT_INTERVAL);
2063 +-
2064 +- flush_workqueue(cdev->hwfns[i].slowpath_wq);
2065 ++ cancel_delayed_work(&cdev->hwfns[i].slowpath_task);
2066 + destroy_workqueue(cdev->hwfns[i].slowpath_wq);
2067 + }
2068 + }
2069 +diff --git a/drivers/net/ethernet/sfc/efx_common.c b/drivers/net/ethernet/sfc/efx_common.c
2070 +index b0d76bc19673..1799ff9a45d9 100644
2071 +--- a/drivers/net/ethernet/sfc/efx_common.c
2072 ++++ b/drivers/net/ethernet/sfc/efx_common.c
2073 +@@ -200,11 +200,11 @@ void efx_link_status_changed(struct efx_nic *efx)
2074 + unsigned int efx_xdp_max_mtu(struct efx_nic *efx)
2075 + {
2076 + /* The maximum MTU that we can fit in a single page, allowing for
2077 +- * framing, overhead and XDP headroom.
2078 ++ * framing, overhead and XDP headroom + tailroom.
2079 + */
2080 + int overhead = EFX_MAX_FRAME_LEN(0) + sizeof(struct efx_rx_page_state) +
2081 + efx->rx_prefix_size + efx->type->rx_buffer_padding +
2082 +- efx->rx_ip_align + XDP_PACKET_HEADROOM;
2083 ++ efx->rx_ip_align + EFX_XDP_HEADROOM + EFX_XDP_TAILROOM;
2084 +
2085 + return PAGE_SIZE - overhead;
2086 + }
2087 +@@ -302,8 +302,9 @@ static void efx_start_datapath(struct efx_nic *efx)
2088 + efx->rx_dma_len = (efx->rx_prefix_size +
2089 + EFX_MAX_FRAME_LEN(efx->net_dev->mtu) +
2090 + efx->type->rx_buffer_padding);
2091 +- rx_buf_len = (sizeof(struct efx_rx_page_state) + XDP_PACKET_HEADROOM +
2092 +- efx->rx_ip_align + efx->rx_dma_len);
2093 ++ rx_buf_len = (sizeof(struct efx_rx_page_state) + EFX_XDP_HEADROOM +
2094 ++ efx->rx_ip_align + efx->rx_dma_len + EFX_XDP_TAILROOM);
2095 ++
2096 + if (rx_buf_len <= PAGE_SIZE) {
2097 + efx->rx_scatter = efx->type->always_rx_scatter;
2098 + efx->rx_buffer_order = 0;
2099 +diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h
2100 +index 8164f0edcbf0..c8dcba482d89 100644
2101 +--- a/drivers/net/ethernet/sfc/net_driver.h
2102 ++++ b/drivers/net/ethernet/sfc/net_driver.h
2103 +@@ -91,6 +91,12 @@
2104 + #define EFX_RX_BUF_ALIGNMENT 4
2105 + #endif
2106 +
2107 ++/* Non-standard XDP_PACKET_HEADROOM and tailroom to satisfy XDP_REDIRECT and
2108 ++ * still fit two standard MTU size packets into a single 4K page.
2109 ++ */
2110 ++#define EFX_XDP_HEADROOM 128
2111 ++#define EFX_XDP_TAILROOM SKB_DATA_ALIGN(sizeof(struct skb_shared_info))
2112 ++
2113 + /* Forward declare Precision Time Protocol (PTP) support structure. */
2114 + struct efx_ptp_data;
2115 + struct hwtstamp_config;
2116 +diff --git a/drivers/net/ethernet/sfc/rx.c b/drivers/net/ethernet/sfc/rx.c
2117 +index a2042f16babc..260352d97d9d 100644
2118 +--- a/drivers/net/ethernet/sfc/rx.c
2119 ++++ b/drivers/net/ethernet/sfc/rx.c
2120 +@@ -302,7 +302,7 @@ static bool efx_do_xdp(struct efx_nic *efx, struct efx_channel *channel,
2121 + efx->rx_prefix_size);
2122 +
2123 + xdp.data = *ehp;
2124 +- xdp.data_hard_start = xdp.data - XDP_PACKET_HEADROOM;
2125 ++ xdp.data_hard_start = xdp.data - EFX_XDP_HEADROOM;
2126 +
2127 + /* No support yet for XDP metadata */
2128 + xdp_set_data_meta_invalid(&xdp);
2129 +diff --git a/drivers/net/ethernet/sfc/rx_common.c b/drivers/net/ethernet/sfc/rx_common.c
2130 +index ee8beb87bdc1..e10c23833515 100644
2131 +--- a/drivers/net/ethernet/sfc/rx_common.c
2132 ++++ b/drivers/net/ethernet/sfc/rx_common.c
2133 +@@ -412,10 +412,10 @@ static int efx_init_rx_buffers(struct efx_rx_queue *rx_queue, bool atomic)
2134 + index = rx_queue->added_count & rx_queue->ptr_mask;
2135 + rx_buf = efx_rx_buffer(rx_queue, index);
2136 + rx_buf->dma_addr = dma_addr + efx->rx_ip_align +
2137 +- XDP_PACKET_HEADROOM;
2138 ++ EFX_XDP_HEADROOM;
2139 + rx_buf->page = page;
2140 + rx_buf->page_offset = page_offset + efx->rx_ip_align +
2141 +- XDP_PACKET_HEADROOM;
2142 ++ EFX_XDP_HEADROOM;
2143 + rx_buf->len = efx->rx_dma_len;
2144 + rx_buf->flags = 0;
2145 + ++rx_queue->added_count;
2146 +@@ -433,7 +433,7 @@ static int efx_init_rx_buffers(struct efx_rx_queue *rx_queue, bool atomic)
2147 + void efx_rx_config_page_split(struct efx_nic *efx)
2148 + {
2149 + efx->rx_page_buf_step = ALIGN(efx->rx_dma_len + efx->rx_ip_align +
2150 +- XDP_PACKET_HEADROOM,
2151 ++ EFX_XDP_HEADROOM + EFX_XDP_TAILROOM,
2152 + EFX_RX_BUF_ALIGNMENT);
2153 + efx->rx_bufs_per_page = efx->rx_buffer_order ? 1 :
2154 + ((PAGE_SIZE - sizeof(struct efx_rx_page_state)) /
2155 +diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
2156 +index e0212d2fc2a1..fa32cd5b418e 100644
2157 +--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
2158 ++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
2159 +@@ -241,6 +241,8 @@ static int socfpga_set_phy_mode_common(int phymode, u32 *val)
2160 + switch (phymode) {
2161 + case PHY_INTERFACE_MODE_RGMII:
2162 + case PHY_INTERFACE_MODE_RGMII_ID:
2163 ++ case PHY_INTERFACE_MODE_RGMII_RXID:
2164 ++ case PHY_INTERFACE_MODE_RGMII_TXID:
2165 + *val = SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RGMII;
2166 + break;
2167 + case PHY_INTERFACE_MODE_MII:
2168 +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
2169 +index 23627c953a5e..436f501be937 100644
2170 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
2171 ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
2172 +@@ -729,9 +729,18 @@ static int brcmf_net_mon_stop(struct net_device *ndev)
2173 + return err;
2174 + }
2175 +
2176 ++static netdev_tx_t brcmf_net_mon_start_xmit(struct sk_buff *skb,
2177 ++ struct net_device *ndev)
2178 ++{
2179 ++ dev_kfree_skb_any(skb);
2180 ++
2181 ++ return NETDEV_TX_OK;
2182 ++}
2183 ++
2184 + static const struct net_device_ops brcmf_netdev_ops_mon = {
2185 + .ndo_open = brcmf_net_mon_open,
2186 + .ndo_stop = brcmf_net_mon_stop,
2187 ++ .ndo_start_xmit = brcmf_net_mon_start_xmit,
2188 + };
2189 +
2190 + int brcmf_net_mon_attach(struct brcmf_if *ifp)
2191 +diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
2192 +index 0481796f75bc..c24350222133 100644
2193 +--- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
2194 ++++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
2195 +@@ -1467,7 +1467,7 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
2196 + kmemdup(pieces->dbg_conf_tlv[i],
2197 + pieces->dbg_conf_tlv_len[i],
2198 + GFP_KERNEL);
2199 +- if (!pieces->dbg_conf_tlv[i])
2200 ++ if (!drv->fw.dbg.conf_tlv[i])
2201 + goto out_free_fw;
2202 + }
2203 + }
2204 +diff --git a/drivers/net/wireless/realtek/rtw88/pci.c b/drivers/net/wireless/realtek/rtw88/pci.c
2205 +index 1fbc14c149ec..fbaad23e8eb1 100644
2206 +--- a/drivers/net/wireless/realtek/rtw88/pci.c
2207 ++++ b/drivers/net/wireless/realtek/rtw88/pci.c
2208 +@@ -1287,22 +1287,17 @@ static void rtw_pci_phy_cfg(struct rtw_dev *rtwdev)
2209 + rtw_pci_link_cfg(rtwdev);
2210 + }
2211 +
2212 +-#ifdef CONFIG_PM
2213 +-static int rtw_pci_suspend(struct device *dev)
2214 ++static int __maybe_unused rtw_pci_suspend(struct device *dev)
2215 + {
2216 + return 0;
2217 + }
2218 +
2219 +-static int rtw_pci_resume(struct device *dev)
2220 ++static int __maybe_unused rtw_pci_resume(struct device *dev)
2221 + {
2222 + return 0;
2223 + }
2224 +
2225 + static SIMPLE_DEV_PM_OPS(rtw_pm_ops, rtw_pci_suspend, rtw_pci_resume);
2226 +-#define RTW_PM_OPS (&rtw_pm_ops)
2227 +-#else
2228 +-#define RTW_PM_OPS NULL
2229 +-#endif
2230 +
2231 + static int rtw_pci_claim(struct rtw_dev *rtwdev, struct pci_dev *pdev)
2232 + {
2233 +@@ -1530,7 +1525,7 @@ static struct pci_driver rtw_pci_driver = {
2234 + .id_table = rtw_pci_id_table,
2235 + .probe = rtw_pci_probe,
2236 + .remove = rtw_pci_remove,
2237 +- .driver.pm = RTW_PM_OPS,
2238 ++ .driver.pm = &rtw_pm_ops,
2239 + };
2240 + module_pci_driver(rtw_pci_driver);
2241 +
2242 +diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
2243 +index b7347bc6a24d..ca9ed5774eb1 100644
2244 +--- a/drivers/pci/quirks.c
2245 ++++ b/drivers/pci/quirks.c
2246 +@@ -4465,6 +4465,29 @@ static int pci_quirk_xgene_acs(struct pci_dev *dev, u16 acs_flags)
2247 + PCI_ACS_SV | PCI_ACS_RR | PCI_ACS_CR | PCI_ACS_UF);
2248 + }
2249 +
2250 ++/*
2251 ++ * Many Zhaoxin Root Ports and Switch Downstream Ports have no ACS capability.
2252 ++ * But the implementation could block peer-to-peer transactions between them
2253 ++ * and provide ACS-like functionality.
2254 ++ */
2255 ++static int pci_quirk_zhaoxin_pcie_ports_acs(struct pci_dev *dev, u16 acs_flags)
2256 ++{
2257 ++ if (!pci_is_pcie(dev) ||
2258 ++ ((pci_pcie_type(dev) != PCI_EXP_TYPE_ROOT_PORT) &&
2259 ++ (pci_pcie_type(dev) != PCI_EXP_TYPE_DOWNSTREAM)))
2260 ++ return -ENOTTY;
2261 ++
2262 ++ switch (dev->device) {
2263 ++ case 0x0710 ... 0x071e:
2264 ++ case 0x0721:
2265 ++ case 0x0723 ... 0x0732:
2266 ++ return pci_acs_ctrl_enabled(acs_flags,
2267 ++ PCI_ACS_SV | PCI_ACS_RR | PCI_ACS_CR | PCI_ACS_UF);
2268 ++ }
2269 ++
2270 ++ return false;
2271 ++}
2272 ++
2273 + /*
2274 + * Many Intel PCH Root Ports do provide ACS-like features to disable peer
2275 + * transactions and validate bus numbers in requests, but do not provide an
2276 +@@ -4767,6 +4790,12 @@ static const struct pci_dev_acs_enabled {
2277 + { PCI_VENDOR_ID_BROADCOM, 0xD714, pci_quirk_brcm_acs },
2278 + /* Amazon Annapurna Labs */
2279 + { PCI_VENDOR_ID_AMAZON_ANNAPURNA_LABS, 0x0031, pci_quirk_al_acs },
2280 ++ /* Zhaoxin multi-function devices */
2281 ++ { PCI_VENDOR_ID_ZHAOXIN, 0x3038, pci_quirk_mf_endpoint_acs },
2282 ++ { PCI_VENDOR_ID_ZHAOXIN, 0x3104, pci_quirk_mf_endpoint_acs },
2283 ++ { PCI_VENDOR_ID_ZHAOXIN, 0x9083, pci_quirk_mf_endpoint_acs },
2284 ++ /* Zhaoxin Root/Downstream Ports */
2285 ++ { PCI_VENDOR_ID_ZHAOXIN, PCI_ANY_ID, pci_quirk_zhaoxin_pcie_ports_acs },
2286 + { 0 }
2287 + };
2288 +
2289 +@@ -5527,3 +5556,21 @@ out_disable:
2290 + DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_NVIDIA, 0x13b1,
2291 + PCI_CLASS_DISPLAY_VGA, 8,
2292 + quirk_reset_lenovo_thinkpad_p50_nvgpu);
2293 ++
2294 ++/*
2295 ++ * Device [1b21:2142]
2296 ++ * When in D0, PME# doesn't get asserted when plugging USB 3.0 device.
2297 ++ */
2298 ++static void pci_fixup_no_d0_pme(struct pci_dev *dev)
2299 ++{
2300 ++ pci_info(dev, "PME# does not work under D0, disabling it\n");
2301 ++ dev->pme_support &= ~(PCI_PM_CAP_PME_D0 >> PCI_PM_CAP_PME_SHIFT);
2302 ++}
2303 ++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ASMEDIA, 0x2142, pci_fixup_no_d0_pme);
2304 ++
2305 ++static void apex_pci_fixup_class(struct pci_dev *pdev)
2306 ++{
2307 ++ pdev->class = (PCI_CLASS_SYSTEM_OTHER << 8) | pdev->class;
2308 ++}
2309 ++DECLARE_PCI_FIXUP_CLASS_HEADER(0x1ac1, 0x089a,
2310 ++ PCI_CLASS_NOT_DEFINED, 8, apex_pci_fixup_class);
2311 +diff --git a/drivers/remoteproc/mtk_common.h b/drivers/remoteproc/mtk_common.h
2312 +index deb20096146a..0066c83636d0 100644
2313 +--- a/drivers/remoteproc/mtk_common.h
2314 ++++ b/drivers/remoteproc/mtk_common.h
2315 +@@ -68,7 +68,7 @@ struct mtk_scp {
2316 + wait_queue_head_t ack_wq;
2317 +
2318 + void __iomem *cpu_addr;
2319 +- phys_addr_t phys_addr;
2320 ++ dma_addr_t dma_addr;
2321 + size_t dram_size;
2322 +
2323 + struct rproc_subdev *rpmsg_subdev;
2324 +diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c
2325 +index 7ccdf64ff3ea..a6327617868e 100644
2326 +--- a/drivers/remoteproc/mtk_scp.c
2327 ++++ b/drivers/remoteproc/mtk_scp.c
2328 +@@ -330,7 +330,7 @@ static void *scp_da_to_va(struct rproc *rproc, u64 da, int len)
2329 + if (offset >= 0 && (offset + len) < scp->sram_size)
2330 + return (void __force *)scp->sram_base + offset;
2331 + } else {
2332 +- offset = da - scp->phys_addr;
2333 ++ offset = da - scp->dma_addr;
2334 + if (offset >= 0 && (offset + len) < scp->dram_size)
2335 + return (void __force *)scp->cpu_addr + offset;
2336 + }
2337 +@@ -451,7 +451,7 @@ static int scp_map_memory_region(struct mtk_scp *scp)
2338 + /* Reserved SCP code size */
2339 + scp->dram_size = MAX_CODE_SIZE;
2340 + scp->cpu_addr = dma_alloc_coherent(scp->dev, scp->dram_size,
2341 +- &scp->phys_addr, GFP_KERNEL);
2342 ++ &scp->dma_addr, GFP_KERNEL);
2343 + if (!scp->cpu_addr)
2344 + return -ENOMEM;
2345 +
2346 +@@ -461,7 +461,7 @@ static int scp_map_memory_region(struct mtk_scp *scp)
2347 + static void scp_unmap_memory_region(struct mtk_scp *scp)
2348 + {
2349 + dma_free_coherent(scp->dev, scp->dram_size, scp->cpu_addr,
2350 +- scp->phys_addr);
2351 ++ scp->dma_addr);
2352 + of_reserved_mem_device_release(scp->dev);
2353 + }
2354 +
2355 +diff --git a/drivers/soc/xilinx/Kconfig b/drivers/soc/xilinx/Kconfig
2356 +index 223f1f9d0922..646512d7276f 100644
2357 +--- a/drivers/soc/xilinx/Kconfig
2358 ++++ b/drivers/soc/xilinx/Kconfig
2359 +@@ -19,7 +19,7 @@ config XILINX_VCU
2360 +
2361 + config ZYNQMP_POWER
2362 + bool "Enable Xilinx Zynq MPSoC Power Management driver"
2363 +- depends on PM && ARCH_ZYNQMP
2364 ++ depends on PM && ZYNQMP_FIRMWARE
2365 + default y
2366 + select MAILBOX
2367 + select ZYNQMP_IPI_MBOX
2368 +@@ -35,7 +35,7 @@ config ZYNQMP_POWER
2369 + config ZYNQMP_PM_DOMAINS
2370 + bool "Enable Zynq MPSoC generic PM domains"
2371 + default y
2372 +- depends on PM && ARCH_ZYNQMP && ZYNQMP_FIRMWARE
2373 ++ depends on PM && ZYNQMP_FIRMWARE
2374 + select PM_GENERIC_DOMAINS
2375 + help
2376 + Say yes to enable device power management through PM domains
2377 +diff --git a/drivers/staging/gasket/apex_driver.c b/drivers/staging/gasket/apex_driver.c
2378 +index 46199c8ca441..f12f81c8dd2f 100644
2379 +--- a/drivers/staging/gasket/apex_driver.c
2380 ++++ b/drivers/staging/gasket/apex_driver.c
2381 +@@ -570,13 +570,6 @@ static const struct pci_device_id apex_pci_ids[] = {
2382 + { PCI_DEVICE(APEX_PCI_VENDOR_ID, APEX_PCI_DEVICE_ID) }, { 0 }
2383 + };
2384 +
2385 +-static void apex_pci_fixup_class(struct pci_dev *pdev)
2386 +-{
2387 +- pdev->class = (PCI_CLASS_SYSTEM_OTHER << 8) | pdev->class;
2388 +-}
2389 +-DECLARE_PCI_FIXUP_CLASS_HEADER(APEX_PCI_VENDOR_ID, APEX_PCI_DEVICE_ID,
2390 +- PCI_CLASS_NOT_DEFINED, 8, apex_pci_fixup_class);
2391 +-
2392 + static int apex_pci_probe(struct pci_dev *pci_dev,
2393 + const struct pci_device_id *id)
2394 + {
2395 +diff --git a/drivers/target/target_core_fabric_lib.c b/drivers/target/target_core_fabric_lib.c
2396 +index 6b4b354c88aa..b5c970faf585 100644
2397 +--- a/drivers/target/target_core_fabric_lib.c
2398 ++++ b/drivers/target/target_core_fabric_lib.c
2399 +@@ -63,7 +63,7 @@ static int fc_get_pr_transport_id(
2400 + * encoded TransportID.
2401 + */
2402 + ptr = &se_nacl->initiatorname[0];
2403 +- for (i = 0; i < 24; ) {
2404 ++ for (i = 0; i < 23; ) {
2405 + if (!strncmp(&ptr[i], ":", 1)) {
2406 + i++;
2407 + continue;
2408 +diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
2409 +index 0b9dfa6b17bc..f769bb1e3735 100644
2410 +--- a/drivers/target/target_core_user.c
2411 ++++ b/drivers/target/target_core_user.c
2412 +@@ -2073,6 +2073,7 @@ static void tcmu_reset_ring(struct tcmu_dev *udev, u8 err_level)
2413 + mb->cmd_tail = 0;
2414 + mb->cmd_head = 0;
2415 + tcmu_flush_dcache_range(mb, sizeof(*mb));
2416 ++ clear_bit(TCMU_DEV_BIT_BROKEN, &udev->flags);
2417 +
2418 + del_timer(&udev->cmd_timer);
2419 +
2420 +diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
2421 +index 9460d42f8675..c4be4631937a 100644
2422 +--- a/drivers/usb/dwc3/gadget.c
2423 ++++ b/drivers/usb/dwc3/gadget.c
2424 +@@ -1728,7 +1728,6 @@ static int __dwc3_gadget_wakeup(struct dwc3 *dwc)
2425 + u32 reg;
2426 +
2427 + u8 link_state;
2428 +- u8 speed;
2429 +
2430 + /*
2431 + * According to the Databook Remote wakeup request should
2432 +@@ -1738,16 +1737,13 @@ static int __dwc3_gadget_wakeup(struct dwc3 *dwc)
2433 + */
2434 + reg = dwc3_readl(dwc->regs, DWC3_DSTS);
2435 +
2436 +- speed = reg & DWC3_DSTS_CONNECTSPD;
2437 +- if ((speed == DWC3_DSTS_SUPERSPEED) ||
2438 +- (speed == DWC3_DSTS_SUPERSPEED_PLUS))
2439 +- return 0;
2440 +-
2441 + link_state = DWC3_DSTS_USBLNKST(reg);
2442 +
2443 + switch (link_state) {
2444 ++ case DWC3_LINK_STATE_RESET:
2445 + case DWC3_LINK_STATE_RX_DET: /* in HS, means Early Suspend */
2446 + case DWC3_LINK_STATE_U3: /* in HS, means SUSPEND */
2447 ++ case DWC3_LINK_STATE_RESUME:
2448 + break;
2449 + default:
2450 + return -EINVAL;
2451 +diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
2452 +index 6e0432141c40..22200341c8ec 100644
2453 +--- a/drivers/usb/gadget/udc/atmel_usba_udc.c
2454 ++++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
2455 +@@ -1951,10 +1951,10 @@ static irqreturn_t usba_vbus_irq_thread(int irq, void *devid)
2456 + usba_start(udc);
2457 + } else {
2458 + udc->suspended = false;
2459 +- usba_stop(udc);
2460 +-
2461 + if (udc->driver->disconnect)
2462 + udc->driver->disconnect(&udc->gadget);
2463 ++
2464 ++ usba_stop(udc);
2465 + }
2466 + udc->vbus_prev = vbus;
2467 + }
2468 +diff --git a/drivers/usb/gadget/udc/bdc/bdc_ep.c b/drivers/usb/gadget/udc/bdc/bdc_ep.c
2469 +index a4d9b5e1e50e..d49c6dc1082d 100644
2470 +--- a/drivers/usb/gadget/udc/bdc/bdc_ep.c
2471 ++++ b/drivers/usb/gadget/udc/bdc/bdc_ep.c
2472 +@@ -540,7 +540,7 @@ static void bdc_req_complete(struct bdc_ep *ep, struct bdc_req *req,
2473 + {
2474 + struct bdc *bdc = ep->bdc;
2475 +
2476 +- if (req == NULL || &req->queue == NULL || &req->usb_req == NULL)
2477 ++ if (req == NULL)
2478 + return;
2479 +
2480 + dev_dbg(bdc->dev, "%s ep:%s status:%d\n", __func__, ep->name, status);
2481 +diff --git a/drivers/xen/xenbus/xenbus_client.c b/drivers/xen/xenbus/xenbus_client.c
2482 +index e17ca8156171..a38292ef79f6 100644
2483 +--- a/drivers/xen/xenbus/xenbus_client.c
2484 ++++ b/drivers/xen/xenbus/xenbus_client.c
2485 +@@ -448,7 +448,14 @@ EXPORT_SYMBOL_GPL(xenbus_free_evtchn);
2486 + int xenbus_map_ring_valloc(struct xenbus_device *dev, grant_ref_t *gnt_refs,
2487 + unsigned int nr_grefs, void **vaddr)
2488 + {
2489 +- return ring_ops->map(dev, gnt_refs, nr_grefs, vaddr);
2490 ++ int err;
2491 ++
2492 ++ err = ring_ops->map(dev, gnt_refs, nr_grefs, vaddr);
2493 ++ /* Some hypervisors are buggy and can return 1. */
2494 ++ if (err > 0)
2495 ++ err = GNTST_general_error;
2496 ++
2497 ++ return err;
2498 + }
2499 + EXPORT_SYMBOL_GPL(xenbus_map_ring_valloc);
2500 +
2501 +diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c
2502 +index 6765949b3aab..380ad5ace7cf 100644
2503 +--- a/fs/afs/cmservice.c
2504 ++++ b/fs/afs/cmservice.c
2505 +@@ -169,7 +169,7 @@ static int afs_record_cm_probe(struct afs_call *call, struct afs_server *server)
2506 +
2507 + spin_lock(&server->probe_lock);
2508 +
2509 +- if (!test_bit(AFS_SERVER_FL_HAVE_EPOCH, &server->flags)) {
2510 ++ if (!test_and_set_bit(AFS_SERVER_FL_HAVE_EPOCH, &server->flags)) {
2511 + server->cm_epoch = call->epoch;
2512 + server->probe.cm_epoch = call->epoch;
2513 + goto out;
2514 +diff --git a/fs/afs/internal.h b/fs/afs/internal.h
2515 +index ef732dd4e7ef..15ae9c7f9c00 100644
2516 +--- a/fs/afs/internal.h
2517 ++++ b/fs/afs/internal.h
2518 +@@ -1335,7 +1335,7 @@ extern struct afs_volume *afs_create_volume(struct afs_fs_context *);
2519 + extern void afs_activate_volume(struct afs_volume *);
2520 + extern void afs_deactivate_volume(struct afs_volume *);
2521 + extern void afs_put_volume(struct afs_cell *, struct afs_volume *);
2522 +-extern int afs_check_volume_status(struct afs_volume *, struct key *);
2523 ++extern int afs_check_volume_status(struct afs_volume *, struct afs_fs_cursor *);
2524 +
2525 + /*
2526 + * write.c
2527 +diff --git a/fs/afs/rotate.c b/fs/afs/rotate.c
2528 +index 172ba569cd60..2a3305e42b14 100644
2529 +--- a/fs/afs/rotate.c
2530 ++++ b/fs/afs/rotate.c
2531 +@@ -192,7 +192,7 @@ bool afs_select_fileserver(struct afs_fs_cursor *fc)
2532 + write_unlock(&vnode->volume->servers_lock);
2533 +
2534 + set_bit(AFS_VOLUME_NEEDS_UPDATE, &vnode->volume->flags);
2535 +- error = afs_check_volume_status(vnode->volume, fc->key);
2536 ++ error = afs_check_volume_status(vnode->volume, fc);
2537 + if (error < 0)
2538 + goto failed_set_error;
2539 +
2540 +@@ -281,7 +281,7 @@ bool afs_select_fileserver(struct afs_fs_cursor *fc)
2541 +
2542 + set_bit(AFS_VOLUME_WAIT, &vnode->volume->flags);
2543 + set_bit(AFS_VOLUME_NEEDS_UPDATE, &vnode->volume->flags);
2544 +- error = afs_check_volume_status(vnode->volume, fc->key);
2545 ++ error = afs_check_volume_status(vnode->volume, fc);
2546 + if (error < 0)
2547 + goto failed_set_error;
2548 +
2549 +@@ -341,7 +341,7 @@ start:
2550 + /* See if we need to do an update of the volume record. Note that the
2551 + * volume may have moved or even have been deleted.
2552 + */
2553 +- error = afs_check_volume_status(vnode->volume, fc->key);
2554 ++ error = afs_check_volume_status(vnode->volume, fc);
2555 + if (error < 0)
2556 + goto failed_set_error;
2557 +
2558 +diff --git a/fs/afs/server.c b/fs/afs/server.c
2559 +index b7f3cb2130ca..11b90ac7ea30 100644
2560 +--- a/fs/afs/server.c
2561 ++++ b/fs/afs/server.c
2562 +@@ -594,12 +594,9 @@ retry:
2563 + }
2564 +
2565 + ret = wait_on_bit(&server->flags, AFS_SERVER_FL_UPDATING,
2566 +- TASK_INTERRUPTIBLE);
2567 ++ (fc->flags & AFS_FS_CURSOR_INTR) ?
2568 ++ TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE);
2569 + if (ret == -ERESTARTSYS) {
2570 +- if (!(fc->flags & AFS_FS_CURSOR_INTR) && server->addresses) {
2571 +- _leave(" = t [intr]");
2572 +- return true;
2573 +- }
2574 + fc->error = ret;
2575 + _leave(" = f [intr]");
2576 + return false;
2577 +diff --git a/fs/afs/volume.c b/fs/afs/volume.c
2578 +index 92ca5e27573b..4310336b9bb8 100644
2579 +--- a/fs/afs/volume.c
2580 ++++ b/fs/afs/volume.c
2581 +@@ -281,7 +281,7 @@ error:
2582 + /*
2583 + * Make sure the volume record is up to date.
2584 + */
2585 +-int afs_check_volume_status(struct afs_volume *volume, struct key *key)
2586 ++int afs_check_volume_status(struct afs_volume *volume, struct afs_fs_cursor *fc)
2587 + {
2588 + time64_t now = ktime_get_real_seconds();
2589 + int ret, retries = 0;
2590 +@@ -299,7 +299,7 @@ retry:
2591 + }
2592 +
2593 + if (!test_and_set_bit_lock(AFS_VOLUME_UPDATING, &volume->flags)) {
2594 +- ret = afs_update_volume_status(volume, key);
2595 ++ ret = afs_update_volume_status(volume, fc->key);
2596 + clear_bit_unlock(AFS_VOLUME_WAIT, &volume->flags);
2597 + clear_bit_unlock(AFS_VOLUME_UPDATING, &volume->flags);
2598 + wake_up_bit(&volume->flags, AFS_VOLUME_WAIT);
2599 +@@ -312,7 +312,9 @@ retry:
2600 + return 0;
2601 + }
2602 +
2603 +- ret = wait_on_bit(&volume->flags, AFS_VOLUME_WAIT, TASK_INTERRUPTIBLE);
2604 ++ ret = wait_on_bit(&volume->flags, AFS_VOLUME_WAIT,
2605 ++ (fc->flags & AFS_FS_CURSOR_INTR) ?
2606 ++ TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE);
2607 + if (ret == -ERESTARTSYS) {
2608 + _leave(" = %d", ret);
2609 + return ret;
2610 +diff --git a/fs/afs/yfsclient.c b/fs/afs/yfsclient.c
2611 +index 83b6d67325f6..b5b45c57e1b1 100644
2612 +--- a/fs/afs/yfsclient.c
2613 ++++ b/fs/afs/yfsclient.c
2614 +@@ -165,15 +165,15 @@ static void xdr_dump_bad(const __be32 *bp)
2615 + int i;
2616 +
2617 + pr_notice("YFS XDR: Bad status record\n");
2618 +- for (i = 0; i < 5 * 4 * 4; i += 16) {
2619 ++ for (i = 0; i < 6 * 4 * 4; i += 16) {
2620 + memcpy(x, bp, 16);
2621 + bp += 4;
2622 + pr_notice("%03x: %08x %08x %08x %08x\n",
2623 + i, ntohl(x[0]), ntohl(x[1]), ntohl(x[2]), ntohl(x[3]));
2624 + }
2625 +
2626 +- memcpy(x, bp, 4);
2627 +- pr_notice("0x50: %08x\n", ntohl(x[0]));
2628 ++ memcpy(x, bp, 8);
2629 ++ pr_notice("0x60: %08x %08x\n", ntohl(x[0]), ntohl(x[1]));
2630 + }
2631 +
2632 + /*
2633 +diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
2634 +index f95ee99091e4..eab18b7b56e7 100644
2635 +--- a/fs/ext4/ialloc.c
2636 ++++ b/fs/ext4/ialloc.c
2637 +@@ -663,7 +663,7 @@ static int find_group_other(struct super_block *sb, struct inode *parent,
2638 + * block has been written back to disk. (Yes, these values are
2639 + * somewhat arbitrary...)
2640 + */
2641 +-#define RECENTCY_MIN 5
2642 ++#define RECENTCY_MIN 60
2643 + #define RECENTCY_DIRTY 300
2644 +
2645 + static int recently_deleted(struct super_block *sb, ext4_group_t group, int ino)
2646 +diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
2647 +index 37f65ad0d823..4d3c81fd0902 100644
2648 +--- a/fs/ext4/inode.c
2649 ++++ b/fs/ext4/inode.c
2650 +@@ -1974,7 +1974,7 @@ static int ext4_writepage(struct page *page,
2651 + bool keep_towrite = false;
2652 +
2653 + if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb)))) {
2654 +- ext4_invalidatepage(page, 0, PAGE_SIZE);
2655 ++ inode->i_mapping->a_ops->invalidatepage(page, 0, PAGE_SIZE);
2656 + unlock_page(page);
2657 + return -EIO;
2658 + }
2659 +diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
2660 +index 51a78eb65f3c..2f7aebee1a7b 100644
2661 +--- a/fs/ext4/mballoc.c
2662 ++++ b/fs/ext4/mballoc.c
2663 +@@ -1936,7 +1936,8 @@ void ext4_mb_complex_scan_group(struct ext4_allocation_context *ac,
2664 + int free;
2665 +
2666 + free = e4b->bd_info->bb_free;
2667 +- BUG_ON(free <= 0);
2668 ++ if (WARN_ON(free <= 0))
2669 ++ return;
2670 +
2671 + i = e4b->bd_info->bb_first_free;
2672 +
2673 +@@ -1959,7 +1960,8 @@ void ext4_mb_complex_scan_group(struct ext4_allocation_context *ac,
2674 + }
2675 +
2676 + mb_find_extent(e4b, i, ac->ac_g_ex.fe_len, &ex);
2677 +- BUG_ON(ex.fe_len <= 0);
2678 ++ if (WARN_ON(ex.fe_len <= 0))
2679 ++ break;
2680 + if (free < ex.fe_len) {
2681 + ext4_grp_locked_error(sb, e4b->bd_group, 0, 0,
2682 + "%d free clusters as per "
2683 +diff --git a/fs/ext4/super.c b/fs/ext4/super.c
2684 +index 16da3b3481a4..446158ab507d 100644
2685 +--- a/fs/ext4/super.c
2686 ++++ b/fs/ext4/super.c
2687 +@@ -3610,7 +3610,8 @@ int ext4_calculate_overhead(struct super_block *sb)
2688 + */
2689 + if (sbi->s_journal && !sbi->journal_bdev)
2690 + overhead += EXT4_NUM_B2C(sbi, sbi->s_journal->j_maxlen);
2691 +- else if (ext4_has_feature_journal(sb) && !sbi->s_journal) {
2692 ++ else if (ext4_has_feature_journal(sb) && !sbi->s_journal && j_inum) {
2693 ++ /* j_inum for internal journal is non-zero */
2694 + j_inode = ext4_get_journal_inode(sb, j_inum);
2695 + if (j_inode) {
2696 + j_blocks = j_inode->i_size >> sb->s_blocksize_bits;
2697 +diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
2698 +index 65cfe9ab47be..de9fbe7ed06c 100644
2699 +--- a/fs/nfsd/nfs4state.c
2700 ++++ b/fs/nfsd/nfs4state.c
2701 +@@ -267,6 +267,8 @@ find_or_allocate_block(struct nfs4_lockowner *lo, struct knfsd_fh *fh,
2702 + if (!nbl) {
2703 + nbl= kmalloc(sizeof(*nbl), GFP_KERNEL);
2704 + if (nbl) {
2705 ++ INIT_LIST_HEAD(&nbl->nbl_list);
2706 ++ INIT_LIST_HEAD(&nbl->nbl_lru);
2707 + fh_copy_shallow(&nbl->nbl_fh, fh);
2708 + locks_init_lock(&nbl->nbl_lock);
2709 + nfsd4_init_cb(&nbl->nbl_cb, lo->lo_owner.so_client,
2710 +diff --git a/fs/pnode.c b/fs/pnode.c
2711 +index 49f6d7ff2139..1106137c747a 100644
2712 +--- a/fs/pnode.c
2713 ++++ b/fs/pnode.c
2714 +@@ -261,14 +261,13 @@ static int propagate_one(struct mount *m)
2715 + child = copy_tree(last_source, last_source->mnt.mnt_root, type);
2716 + if (IS_ERR(child))
2717 + return PTR_ERR(child);
2718 ++ read_seqlock_excl(&mount_lock);
2719 + mnt_set_mountpoint(m, mp, child);
2720 ++ if (m->mnt_master != dest_master)
2721 ++ SET_MNT_MARK(m->mnt_master);
2722 ++ read_sequnlock_excl(&mount_lock);
2723 + last_dest = m;
2724 + last_source = child;
2725 +- if (m->mnt_master != dest_master) {
2726 +- read_seqlock_excl(&mount_lock);
2727 +- SET_MNT_MARK(m->mnt_master);
2728 +- read_sequnlock_excl(&mount_lock);
2729 +- }
2730 + hlist_add_head(&child->mnt_hash, list);
2731 + return count_mounts(m->mnt_ns, child);
2732 + }
2733 +diff --git a/fs/ubifs/orphan.c b/fs/ubifs/orphan.c
2734 +index edf43ddd7dce..7dd740e3692d 100644
2735 +--- a/fs/ubifs/orphan.c
2736 ++++ b/fs/ubifs/orphan.c
2737 +@@ -688,14 +688,14 @@ static int do_kill_orphans(struct ubifs_info *c, struct ubifs_scan_leb *sleb,
2738 +
2739 + ino_key_init(c, &key1, inum);
2740 + err = ubifs_tnc_lookup(c, &key1, ino);
2741 +- if (err)
2742 ++ if (err && err != -ENOENT)
2743 + goto out_free;
2744 +
2745 + /*
2746 + * Check whether an inode can really get deleted.
2747 + * linkat() with O_TMPFILE allows rebirth of an inode.
2748 + */
2749 +- if (ino->nlink == 0) {
2750 ++ if (err == 0 && ino->nlink == 0) {
2751 + dbg_rcvry("deleting orphaned inode %lu",
2752 + (unsigned long)inum);
2753 +
2754 +diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c
2755 +index 8dc2e5414276..00932d2b503b 100644
2756 +--- a/fs/xfs/xfs_icache.c
2757 ++++ b/fs/xfs/xfs_icache.c
2758 +@@ -907,7 +907,12 @@ xfs_eofblocks_worker(
2759 + {
2760 + struct xfs_mount *mp = container_of(to_delayed_work(work),
2761 + struct xfs_mount, m_eofblocks_work);
2762 ++
2763 ++ if (!sb_start_write_trylock(mp->m_super))
2764 ++ return;
2765 + xfs_icache_free_eofblocks(mp, NULL);
2766 ++ sb_end_write(mp->m_super);
2767 ++
2768 + xfs_queue_eofblocks(mp);
2769 + }
2770 +
2771 +@@ -934,7 +939,12 @@ xfs_cowblocks_worker(
2772 + {
2773 + struct xfs_mount *mp = container_of(to_delayed_work(work),
2774 + struct xfs_mount, m_cowblocks_work);
2775 ++
2776 ++ if (!sb_start_write_trylock(mp->m_super))
2777 ++ return;
2778 + xfs_icache_free_cowblocks(mp, NULL);
2779 ++ sb_end_write(mp->m_super);
2780 ++
2781 + xfs_queue_cowblocks(mp);
2782 + }
2783 +
2784 +diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
2785 +index d42de92cb283..4a99e0b0f333 100644
2786 +--- a/fs/xfs/xfs_ioctl.c
2787 ++++ b/fs/xfs/xfs_ioctl.c
2788 +@@ -2264,7 +2264,10 @@ xfs_file_ioctl(
2789 + if (error)
2790 + return error;
2791 +
2792 +- return xfs_icache_free_eofblocks(mp, &keofb);
2793 ++ sb_start_write(mp->m_super);
2794 ++ error = xfs_icache_free_eofblocks(mp, &keofb);
2795 ++ sb_end_write(mp->m_super);
2796 ++ return error;
2797 + }
2798 +
2799 + default:
2800 +diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c
2801 +index b0ce04ffd3cd..107bf2a2f344 100644
2802 +--- a/fs/xfs/xfs_reflink.c
2803 ++++ b/fs/xfs/xfs_reflink.c
2804 +@@ -1051,6 +1051,7 @@ xfs_reflink_remap_extent(
2805 + uirec.br_startblock = irec->br_startblock + rlen;
2806 + uirec.br_startoff = irec->br_startoff + rlen;
2807 + uirec.br_blockcount = unmap_len - rlen;
2808 ++ uirec.br_state = irec->br_state;
2809 + unmap_len = rlen;
2810 +
2811 + /* If this isn't a real mapping, we're done. */
2812 +diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c
2813 +index 00cc5b8734be..3bc570c90ad9 100644
2814 +--- a/fs/xfs/xfs_trans_ail.c
2815 ++++ b/fs/xfs/xfs_trans_ail.c
2816 +@@ -529,8 +529,9 @@ xfsaild(
2817 + {
2818 + struct xfs_ail *ailp = data;
2819 + long tout = 0; /* milliseconds */
2820 ++ unsigned int noreclaim_flag;
2821 +
2822 +- current->flags |= PF_MEMALLOC;
2823 ++ noreclaim_flag = memalloc_noreclaim_save();
2824 + set_freezable();
2825 +
2826 + while (1) {
2827 +@@ -601,6 +602,7 @@ xfsaild(
2828 + tout = xfsaild_push(ailp);
2829 + }
2830 +
2831 ++ memalloc_noreclaim_restore(noreclaim_flag);
2832 + return 0;
2833 + }
2834 +
2835 +diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h
2836 +index 83439bfb6c5b..7613a84a2466 100644
2837 +--- a/include/linux/irqchip/arm-gic-v3.h
2838 ++++ b/include/linux/irqchip/arm-gic-v3.h
2839 +@@ -241,6 +241,7 @@
2840 +
2841 + #define GICR_TYPER_PLPIS (1U << 0)
2842 + #define GICR_TYPER_VLPIS (1U << 1)
2843 ++#define GICR_TYPER_DIRTY (1U << 2)
2844 + #define GICR_TYPER_DirectLPIS (1U << 3)
2845 + #define GICR_TYPER_LAST (1U << 4)
2846 + #define GICR_TYPER_RVPEID (1U << 7)
2847 +@@ -665,6 +666,7 @@ struct rdists {
2848 + bool has_vlpis;
2849 + bool has_rvpeid;
2850 + bool has_direct_lpi;
2851 ++ bool has_vpend_valid_dirty;
2852 + };
2853 +
2854 + struct irq_domain;
2855 +diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
2856 +index 352c0d708720..6693cf561cd1 100644
2857 +--- a/include/linux/pci_ids.h
2858 ++++ b/include/linux/pci_ids.h
2859 +@@ -2583,6 +2583,8 @@
2860 +
2861 + #define PCI_VENDOR_ID_AMAZON 0x1d0f
2862 +
2863 ++#define PCI_VENDOR_ID_ZHAOXIN 0x1d17
2864 ++
2865 + #define PCI_VENDOR_ID_HYGON 0x1d94
2866 +
2867 + #define PCI_VENDOR_ID_HXT 0x1dbf
2868 +diff --git a/include/linux/printk.h b/include/linux/printk.h
2869 +index 1e6108b8d15f..e061635e0409 100644
2870 +--- a/include/linux/printk.h
2871 ++++ b/include/linux/printk.h
2872 +@@ -202,7 +202,6 @@ __printf(1, 2) void dump_stack_set_arch_desc(const char *fmt, ...);
2873 + void dump_stack_print_info(const char *log_lvl);
2874 + void show_regs_print_info(const char *log_lvl);
2875 + extern asmlinkage void dump_stack(void) __cold;
2876 +-extern void printk_safe_init(void);
2877 + extern void printk_safe_flush(void);
2878 + extern void printk_safe_flush_on_panic(void);
2879 + #else
2880 +@@ -269,10 +268,6 @@ static inline void dump_stack(void)
2881 + {
2882 + }
2883 +
2884 +-static inline void printk_safe_init(void)
2885 +-{
2886 +-}
2887 +-
2888 + static inline void printk_safe_flush(void)
2889 + {
2890 + }
2891 +diff --git a/include/linux/qed/qed_chain.h b/include/linux/qed/qed_chain.h
2892 +index 2dd0a9ed5b36..733fad7dfbed 100644
2893 +--- a/include/linux/qed/qed_chain.h
2894 ++++ b/include/linux/qed/qed_chain.h
2895 +@@ -97,6 +97,11 @@ struct qed_chain_u32 {
2896 + u32 cons_idx;
2897 + };
2898 +
2899 ++struct addr_tbl_entry {
2900 ++ void *virt_addr;
2901 ++ dma_addr_t dma_map;
2902 ++};
2903 ++
2904 + struct qed_chain {
2905 + /* fastpath portion of the chain - required for commands such
2906 + * as produce / consume.
2907 +@@ -107,10 +112,11 @@ struct qed_chain {
2908 +
2909 + /* Fastpath portions of the PBL [if exists] */
2910 + struct {
2911 +- /* Table for keeping the virtual addresses of the chain pages,
2912 +- * respectively to the physical addresses in the pbl table.
2913 ++ /* Table for keeping the virtual and physical addresses of the
2914 ++ * chain pages, respectively to the physical addresses
2915 ++ * in the pbl table.
2916 + */
2917 +- void **pp_virt_addr_tbl;
2918 ++ struct addr_tbl_entry *pp_addr_tbl;
2919 +
2920 + union {
2921 + struct qed_chain_pbl_u16 u16;
2922 +@@ -287,7 +293,7 @@ qed_chain_advance_page(struct qed_chain *p_chain,
2923 + *(u32 *)page_to_inc = 0;
2924 + page_index = *(u32 *)page_to_inc;
2925 + }
2926 +- *p_next_elem = p_chain->pbl.pp_virt_addr_tbl[page_index];
2927 ++ *p_next_elem = p_chain->pbl.pp_addr_tbl[page_index].virt_addr;
2928 + }
2929 + }
2930 +
2931 +@@ -537,7 +543,7 @@ static inline void qed_chain_init_params(struct qed_chain *p_chain,
2932 +
2933 + p_chain->pbl_sp.p_phys_table = 0;
2934 + p_chain->pbl_sp.p_virt_table = NULL;
2935 +- p_chain->pbl.pp_virt_addr_tbl = NULL;
2936 ++ p_chain->pbl.pp_addr_tbl = NULL;
2937 + }
2938 +
2939 + /**
2940 +@@ -575,11 +581,11 @@ static inline void qed_chain_init_mem(struct qed_chain *p_chain,
2941 + static inline void qed_chain_init_pbl_mem(struct qed_chain *p_chain,
2942 + void *p_virt_pbl,
2943 + dma_addr_t p_phys_pbl,
2944 +- void **pp_virt_addr_tbl)
2945 ++ struct addr_tbl_entry *pp_addr_tbl)
2946 + {
2947 + p_chain->pbl_sp.p_phys_table = p_phys_pbl;
2948 + p_chain->pbl_sp.p_virt_table = p_virt_pbl;
2949 +- p_chain->pbl.pp_virt_addr_tbl = pp_virt_addr_tbl;
2950 ++ p_chain->pbl.pp_addr_tbl = pp_addr_tbl;
2951 + }
2952 +
2953 + /**
2954 +@@ -644,7 +650,7 @@ static inline void *qed_chain_get_last_elem(struct qed_chain *p_chain)
2955 + break;
2956 + case QED_CHAIN_MODE_PBL:
2957 + last_page_idx = p_chain->page_cnt - 1;
2958 +- p_virt_addr = p_chain->pbl.pp_virt_addr_tbl[last_page_idx];
2959 ++ p_virt_addr = p_chain->pbl.pp_addr_tbl[last_page_idx].virt_addr;
2960 + break;
2961 + }
2962 + /* p_virt_addr points at this stage to the last page of the chain */
2963 +@@ -716,7 +722,7 @@ static inline void qed_chain_pbl_zero_mem(struct qed_chain *p_chain)
2964 + page_cnt = qed_chain_get_page_cnt(p_chain);
2965 +
2966 + for (i = 0; i < page_cnt; i++)
2967 +- memset(p_chain->pbl.pp_virt_addr_tbl[i], 0,
2968 ++ memset(p_chain->pbl.pp_addr_tbl[i].virt_addr, 0,
2969 + QED_CHAIN_PAGE_SIZE);
2970 + }
2971 +
2972 +diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h
2973 +index 40f65888dd38..fddad9f5b390 100644
2974 +--- a/include/linux/sunrpc/svc_rdma.h
2975 ++++ b/include/linux/sunrpc/svc_rdma.h
2976 +@@ -162,6 +162,7 @@ extern bool svc_rdma_post_recvs(struct svcxprt_rdma *rdma);
2977 + extern void svc_rdma_recv_ctxt_put(struct svcxprt_rdma *rdma,
2978 + struct svc_rdma_recv_ctxt *ctxt);
2979 + extern void svc_rdma_flush_recv_queues(struct svcxprt_rdma *rdma);
2980 ++extern void svc_rdma_release_rqst(struct svc_rqst *rqstp);
2981 + extern int svc_rdma_recvfrom(struct svc_rqst *);
2982 +
2983 + /* svc_rdma_rw.c */
2984 +diff --git a/include/sound/soc.h b/include/sound/soc.h
2985 +index 8a2266676b2d..efb8bad7b0fa 100644
2986 +--- a/include/sound/soc.h
2987 ++++ b/include/sound/soc.h
2988 +@@ -1058,6 +1058,7 @@ struct snd_soc_card {
2989 + const struct snd_soc_dapm_route *of_dapm_routes;
2990 + int num_of_dapm_routes;
2991 + bool fully_routed;
2992 ++ bool disable_route_checks;
2993 +
2994 + /* lists of probed devices belonging to this card */
2995 + struct list_head component_dev_list;
2996 +diff --git a/include/trace/events/iocost.h b/include/trace/events/iocost.h
2997 +index 7ecaa65b7106..c2f580fd371b 100644
2998 +--- a/include/trace/events/iocost.h
2999 ++++ b/include/trace/events/iocost.h
3000 +@@ -130,7 +130,7 @@ DEFINE_EVENT(iocg_inuse_update, iocost_inuse_reset,
3001 +
3002 + TRACE_EVENT(iocost_ioc_vrate_adj,
3003 +
3004 +- TP_PROTO(struct ioc *ioc, u64 new_vrate, u32 (*missed_ppm)[2],
3005 ++ TP_PROTO(struct ioc *ioc, u64 new_vrate, u32 *missed_ppm,
3006 + u32 rq_wait_pct, int nr_lagging, int nr_shortages,
3007 + int nr_surpluses),
3008 +
3009 +@@ -155,8 +155,8 @@ TRACE_EVENT(iocost_ioc_vrate_adj,
3010 + __entry->old_vrate = atomic64_read(&ioc->vtime_rate);;
3011 + __entry->new_vrate = new_vrate;
3012 + __entry->busy_level = ioc->busy_level;
3013 +- __entry->read_missed_ppm = (*missed_ppm)[READ];
3014 +- __entry->write_missed_ppm = (*missed_ppm)[WRITE];
3015 ++ __entry->read_missed_ppm = missed_ppm[READ];
3016 ++ __entry->write_missed_ppm = missed_ppm[WRITE];
3017 + __entry->rq_wait_pct = rq_wait_pct;
3018 + __entry->nr_lagging = nr_lagging;
3019 + __entry->nr_shortages = nr_shortages;
3020 +diff --git a/include/trace/events/rpcrdma.h b/include/trace/events/rpcrdma.h
3021 +index c0e4c93324f5..fa14adf24235 100644
3022 +--- a/include/trace/events/rpcrdma.h
3023 ++++ b/include/trace/events/rpcrdma.h
3024 +@@ -1699,17 +1699,15 @@ DECLARE_EVENT_CLASS(svcrdma_sendcomp_event,
3025 +
3026 + TRACE_EVENT(svcrdma_post_send,
3027 + TP_PROTO(
3028 +- const struct ib_send_wr *wr,
3029 +- int status
3030 ++ const struct ib_send_wr *wr
3031 + ),
3032 +
3033 +- TP_ARGS(wr, status),
3034 ++ TP_ARGS(wr),
3035 +
3036 + TP_STRUCT__entry(
3037 + __field(const void *, cqe)
3038 + __field(unsigned int, num_sge)
3039 + __field(u32, inv_rkey)
3040 +- __field(int, status)
3041 + ),
3042 +
3043 + TP_fast_assign(
3044 +@@ -1717,12 +1715,11 @@ TRACE_EVENT(svcrdma_post_send,
3045 + __entry->num_sge = wr->num_sge;
3046 + __entry->inv_rkey = (wr->opcode == IB_WR_SEND_WITH_INV) ?
3047 + wr->ex.invalidate_rkey : 0;
3048 +- __entry->status = status;
3049 + ),
3050 +
3051 +- TP_printk("cqe=%p num_sge=%u inv_rkey=0x%08x status=%d",
3052 ++ TP_printk("cqe=%p num_sge=%u inv_rkey=0x%08x",
3053 + __entry->cqe, __entry->num_sge,
3054 +- __entry->inv_rkey, __entry->status
3055 ++ __entry->inv_rkey
3056 + )
3057 + );
3058 +
3059 +@@ -1787,26 +1784,23 @@ TRACE_EVENT(svcrdma_wc_receive,
3060 + TRACE_EVENT(svcrdma_post_rw,
3061 + TP_PROTO(
3062 + const void *cqe,
3063 +- int sqecount,
3064 +- int status
3065 ++ int sqecount
3066 + ),
3067 +
3068 +- TP_ARGS(cqe, sqecount, status),
3069 ++ TP_ARGS(cqe, sqecount),
3070 +
3071 + TP_STRUCT__entry(
3072 + __field(const void *, cqe)
3073 + __field(int, sqecount)
3074 +- __field(int, status)
3075 + ),
3076 +
3077 + TP_fast_assign(
3078 + __entry->cqe = cqe;
3079 + __entry->sqecount = sqecount;
3080 +- __entry->status = status;
3081 + ),
3082 +
3083 +- TP_printk("cqe=%p sqecount=%d status=%d",
3084 +- __entry->cqe, __entry->sqecount, __entry->status
3085 ++ TP_printk("cqe=%p sqecount=%d",
3086 ++ __entry->cqe, __entry->sqecount
3087 + )
3088 + );
3089 +
3090 +@@ -1902,6 +1896,34 @@ DECLARE_EVENT_CLASS(svcrdma_sendqueue_event,
3091 + DEFINE_SQ_EVENT(full);
3092 + DEFINE_SQ_EVENT(retry);
3093 +
3094 ++TRACE_EVENT(svcrdma_sq_post_err,
3095 ++ TP_PROTO(
3096 ++ const struct svcxprt_rdma *rdma,
3097 ++ int status
3098 ++ ),
3099 ++
3100 ++ TP_ARGS(rdma, status),
3101 ++
3102 ++ TP_STRUCT__entry(
3103 ++ __field(int, avail)
3104 ++ __field(int, depth)
3105 ++ __field(int, status)
3106 ++ __string(addr, rdma->sc_xprt.xpt_remotebuf)
3107 ++ ),
3108 ++
3109 ++ TP_fast_assign(
3110 ++ __entry->avail = atomic_read(&rdma->sc_sq_avail);
3111 ++ __entry->depth = rdma->sc_sq_depth;
3112 ++ __entry->status = status;
3113 ++ __assign_str(addr, rdma->sc_xprt.xpt_remotebuf);
3114 ++ ),
3115 ++
3116 ++ TP_printk("addr=%s sc_sq_avail=%d/%d status=%d",
3117 ++ __get_str(addr), __entry->avail, __entry->depth,
3118 ++ __entry->status
3119 ++ )
3120 ++);
3121 ++
3122 + #endif /* _TRACE_RPCRDMA_H */
3123 +
3124 + #include <trace/define_trace.h>
3125 +diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h
3126 +index 065218a20bb7..bbd4b42b76c7 100644
3127 +--- a/include/uapi/linux/netfilter/nf_tables.h
3128 ++++ b/include/uapi/linux/netfilter/nf_tables.h
3129 +@@ -276,6 +276,7 @@ enum nft_rule_compat_attributes {
3130 + * @NFT_SET_TIMEOUT: set uses timeouts
3131 + * @NFT_SET_EVAL: set can be updated from the evaluation path
3132 + * @NFT_SET_OBJECT: set contains stateful objects
3133 ++ * @NFT_SET_CONCAT: set contains a concatenation
3134 + */
3135 + enum nft_set_flags {
3136 + NFT_SET_ANONYMOUS = 0x1,
3137 +@@ -285,6 +286,7 @@ enum nft_set_flags {
3138 + NFT_SET_TIMEOUT = 0x10,
3139 + NFT_SET_EVAL = 0x20,
3140 + NFT_SET_OBJECT = 0x40,
3141 ++ NFT_SET_CONCAT = 0x80,
3142 + };
3143 +
3144 + /**
3145 +diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h
3146 +index bbe791b24168..0e43f674a686 100644
3147 +--- a/include/uapi/linux/pkt_sched.h
3148 ++++ b/include/uapi/linux/pkt_sched.h
3149 +@@ -1197,8 +1197,8 @@ enum {
3150 + * [TCA_TAPRIO_ATTR_SCHED_ENTRY_INTERVAL]
3151 + */
3152 +
3153 +-#define TCA_TAPRIO_ATTR_FLAG_TXTIME_ASSIST BIT(0)
3154 +-#define TCA_TAPRIO_ATTR_FLAG_FULL_OFFLOAD BIT(1)
3155 ++#define TCA_TAPRIO_ATTR_FLAG_TXTIME_ASSIST _BITUL(0)
3156 ++#define TCA_TAPRIO_ATTR_FLAG_FULL_OFFLOAD _BITUL(1)
3157 +
3158 + enum {
3159 + TCA_TAPRIO_ATTR_UNSPEC,
3160 +diff --git a/init/main.c b/init/main.c
3161 +index ee4947af823f..9c7948b3763a 100644
3162 +--- a/init/main.c
3163 ++++ b/init/main.c
3164 +@@ -907,7 +907,6 @@ asmlinkage __visible void __init start_kernel(void)
3165 + boot_init_stack_canary();
3166 +
3167 + time_init();
3168 +- printk_safe_init();
3169 + perf_event_init();
3170 + profile_init();
3171 + call_function_init();
3172 +diff --git a/kernel/bpf/cpumap.c b/kernel/bpf/cpumap.c
3173 +index 70f71b154fa5..3fe0b006d2d2 100644
3174 +--- a/kernel/bpf/cpumap.c
3175 ++++ b/kernel/bpf/cpumap.c
3176 +@@ -469,7 +469,7 @@ static int cpu_map_update_elem(struct bpf_map *map, void *key, void *value,
3177 + return -EOVERFLOW;
3178 +
3179 + /* Make sure CPU is a valid possible cpu */
3180 +- if (!cpu_possible(key_cpu))
3181 ++ if (key_cpu >= nr_cpumask_bits || !cpu_possible(key_cpu))
3182 + return -ENODEV;
3183 +
3184 + if (qsize == 0) {
3185 +diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
3186 +index e5d12c54b552..1c53ccbd5b5d 100644
3187 +--- a/kernel/bpf/verifier.c
3188 ++++ b/kernel/bpf/verifier.c
3189 +@@ -1918,6 +1918,15 @@ static bool register_is_const(struct bpf_reg_state *reg)
3190 + return reg->type == SCALAR_VALUE && tnum_is_const(reg->var_off);
3191 + }
3192 +
3193 ++static bool __is_pointer_value(bool allow_ptr_leaks,
3194 ++ const struct bpf_reg_state *reg)
3195 ++{
3196 ++ if (allow_ptr_leaks)
3197 ++ return false;
3198 ++
3199 ++ return reg->type != SCALAR_VALUE;
3200 ++}
3201 ++
3202 + static void save_register_state(struct bpf_func_state *state,
3203 + int spi, struct bpf_reg_state *reg)
3204 + {
3205 +@@ -2108,6 +2117,16 @@ static int check_stack_read(struct bpf_verifier_env *env,
3206 + * which resets stack/reg liveness for state transitions
3207 + */
3208 + state->regs[value_regno].live |= REG_LIVE_WRITTEN;
3209 ++ } else if (__is_pointer_value(env->allow_ptr_leaks, reg)) {
3210 ++ /* If value_regno==-1, the caller is asking us whether
3211 ++ * it is acceptable to use this value as a SCALAR_VALUE
3212 ++ * (e.g. for XADD).
3213 ++ * We must not allow unprivileged callers to do that
3214 ++ * with spilled pointers.
3215 ++ */
3216 ++ verbose(env, "leaking pointer from stack off %d\n",
3217 ++ off);
3218 ++ return -EACCES;
3219 + }
3220 + mark_reg_read(env, reg, reg->parent, REG_LIVE_READ64);
3221 + } else {
3222 +@@ -2473,15 +2492,6 @@ static int check_sock_access(struct bpf_verifier_env *env, int insn_idx,
3223 + return -EACCES;
3224 + }
3225 +
3226 +-static bool __is_pointer_value(bool allow_ptr_leaks,
3227 +- const struct bpf_reg_state *reg)
3228 +-{
3229 +- if (allow_ptr_leaks)
3230 +- return false;
3231 +-
3232 +- return reg->type != SCALAR_VALUE;
3233 +-}
3234 +-
3235 + static struct bpf_reg_state *reg_state(struct bpf_verifier_env *env, int regno)
3236 + {
3237 + return cur_regs(env) + regno;
3238 +@@ -2875,7 +2885,7 @@ static int check_ptr_to_btf_access(struct bpf_verifier_env *env,
3239 + if (ret < 0)
3240 + return ret;
3241 +
3242 +- if (atype == BPF_READ) {
3243 ++ if (atype == BPF_READ && value_regno >= 0) {
3244 + if (ret == SCALAR_VALUE) {
3245 + mark_reg_unknown(env, regs, value_regno);
3246 + return 0;
3247 +@@ -9882,6 +9892,7 @@ static int check_attach_btf_id(struct bpf_verifier_env *env)
3248 + return -EINVAL;
3249 + }
3250 + env->ops = bpf_verifier_ops[tgt_prog->type];
3251 ++ prog->expected_attach_type = tgt_prog->expected_attach_type;
3252 + }
3253 + if (!tgt_prog->jited) {
3254 + verbose(env, "Can attach to only JITed progs\n");
3255 +@@ -10215,6 +10226,13 @@ err_release_maps:
3256 + * them now. Otherwise free_used_maps() will release them.
3257 + */
3258 + release_maps(env);
3259 ++
3260 ++ /* extension progs temporarily inherit the attach_type of their targets
3261 ++ for verification purposes, so set it back to zero before returning
3262 ++ */
3263 ++ if (env->prog->type == BPF_PROG_TYPE_EXT)
3264 ++ env->prog->expected_attach_type = 0;
3265 ++
3266 + *prog = env->prog;
3267 + err_unlock:
3268 + if (!is_priv)
3269 +diff --git a/kernel/events/core.c b/kernel/events/core.c
3270 +index 533c19348189..29ace472f916 100644
3271 +--- a/kernel/events/core.c
3272 ++++ b/kernel/events/core.c
3273 +@@ -7278,10 +7278,17 @@ static void perf_event_task_output(struct perf_event *event,
3274 + goto out;
3275 +
3276 + task_event->event_id.pid = perf_event_pid(event, task);
3277 +- task_event->event_id.ppid = perf_event_pid(event, current);
3278 +-
3279 + task_event->event_id.tid = perf_event_tid(event, task);
3280 +- task_event->event_id.ptid = perf_event_tid(event, current);
3281 ++
3282 ++ if (task_event->event_id.header.type == PERF_RECORD_EXIT) {
3283 ++ task_event->event_id.ppid = perf_event_pid(event,
3284 ++ task->real_parent);
3285 ++ task_event->event_id.ptid = perf_event_pid(event,
3286 ++ task->real_parent);
3287 ++ } else { /* PERF_RECORD_FORK */
3288 ++ task_event->event_id.ppid = perf_event_pid(event, current);
3289 ++ task_event->event_id.ptid = perf_event_tid(event, current);
3290 ++ }
3291 +
3292 + task_event->event_id.time = perf_event_clock(event);
3293 +
3294 +diff --git a/kernel/printk/internal.h b/kernel/printk/internal.h
3295 +index c8e6ab689d42..b2b0f526f249 100644
3296 +--- a/kernel/printk/internal.h
3297 ++++ b/kernel/printk/internal.h
3298 +@@ -23,6 +23,9 @@ __printf(1, 0) int vprintk_func(const char *fmt, va_list args);
3299 + void __printk_safe_enter(void);
3300 + void __printk_safe_exit(void);
3301 +
3302 ++void printk_safe_init(void);
3303 ++bool printk_percpu_data_ready(void);
3304 ++
3305 + #define printk_safe_enter_irqsave(flags) \
3306 + do { \
3307 + local_irq_save(flags); \
3308 +@@ -64,4 +67,6 @@ __printf(1, 0) int vprintk_func(const char *fmt, va_list args) { return 0; }
3309 + #define printk_safe_enter_irq() local_irq_disable()
3310 + #define printk_safe_exit_irq() local_irq_enable()
3311 +
3312 ++static inline void printk_safe_init(void) { }
3313 ++static inline bool printk_percpu_data_ready(void) { return false; }
3314 + #endif /* CONFIG_PRINTK */
3315 +diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
3316 +index fada22dc4ab6..74fbd76cf664 100644
3317 +--- a/kernel/printk/printk.c
3318 ++++ b/kernel/printk/printk.c
3319 +@@ -460,6 +460,18 @@ static char __log_buf[__LOG_BUF_LEN] __aligned(LOG_ALIGN);
3320 + static char *log_buf = __log_buf;
3321 + static u32 log_buf_len = __LOG_BUF_LEN;
3322 +
3323 ++/*
3324 ++ * We cannot access per-CPU data (e.g. per-CPU flush irq_work) before
3325 ++ * per_cpu_areas are initialised. This variable is set to true when
3326 ++ * it's safe to access per-CPU data.
3327 ++ */
3328 ++static bool __printk_percpu_data_ready __read_mostly;
3329 ++
3330 ++bool printk_percpu_data_ready(void)
3331 ++{
3332 ++ return __printk_percpu_data_ready;
3333 ++}
3334 ++
3335 + /* Return log buffer address */
3336 + char *log_buf_addr_get(void)
3337 + {
3338 +@@ -1146,12 +1158,28 @@ static void __init log_buf_add_cpu(void)
3339 + static inline void log_buf_add_cpu(void) {}
3340 + #endif /* CONFIG_SMP */
3341 +
3342 ++static void __init set_percpu_data_ready(void)
3343 ++{
3344 ++ printk_safe_init();
3345 ++ /* Make sure we set this flag only after printk_safe() init is done */
3346 ++ barrier();
3347 ++ __printk_percpu_data_ready = true;
3348 ++}
3349 ++
3350 + void __init setup_log_buf(int early)
3351 + {
3352 + unsigned long flags;
3353 + char *new_log_buf;
3354 + unsigned int free;
3355 +
3356 ++ /*
3357 ++ * Some archs call setup_log_buf() multiple times - first is very
3358 ++ * early, e.g. from setup_arch(), and second - when percpu_areas
3359 ++ * are initialised.
3360 ++ */
3361 ++ if (!early)
3362 ++ set_percpu_data_ready();
3363 ++
3364 + if (log_buf != __log_buf)
3365 + return;
3366 +
3367 +@@ -2966,6 +2994,9 @@ static DEFINE_PER_CPU(struct irq_work, wake_up_klogd_work) = {
3368 +
3369 + void wake_up_klogd(void)
3370 + {
3371 ++ if (!printk_percpu_data_ready())
3372 ++ return;
3373 ++
3374 + preempt_disable();
3375 + if (waitqueue_active(&log_wait)) {
3376 + this_cpu_or(printk_pending, PRINTK_PENDING_WAKEUP);
3377 +@@ -2976,6 +3007,9 @@ void wake_up_klogd(void)
3378 +
3379 + void defer_console_output(void)
3380 + {
3381 ++ if (!printk_percpu_data_ready())
3382 ++ return;
3383 ++
3384 + preempt_disable();
3385 + __this_cpu_or(printk_pending, PRINTK_PENDING_OUTPUT);
3386 + irq_work_queue(this_cpu_ptr(&wake_up_klogd_work));
3387 +diff --git a/kernel/printk/printk_safe.c b/kernel/printk/printk_safe.c
3388 +index b4045e782743..d9a659a686f3 100644
3389 +--- a/kernel/printk/printk_safe.c
3390 ++++ b/kernel/printk/printk_safe.c
3391 +@@ -27,7 +27,6 @@
3392 + * There are situations when we want to make sure that all buffers
3393 + * were handled or when IRQs are blocked.
3394 + */
3395 +-static int printk_safe_irq_ready __read_mostly;
3396 +
3397 + #define SAFE_LOG_BUF_LEN ((1 << CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT) - \
3398 + sizeof(atomic_t) - \
3399 +@@ -51,7 +50,7 @@ static DEFINE_PER_CPU(struct printk_safe_seq_buf, nmi_print_seq);
3400 + /* Get flushed in a more safe context. */
3401 + static void queue_flush_work(struct printk_safe_seq_buf *s)
3402 + {
3403 +- if (printk_safe_irq_ready)
3404 ++ if (printk_percpu_data_ready())
3405 + irq_work_queue(&s->work);
3406 + }
3407 +
3408 +@@ -402,14 +401,6 @@ void __init printk_safe_init(void)
3409 + #endif
3410 + }
3411 +
3412 +- /*
3413 +- * In the highly unlikely event that a NMI were to trigger at
3414 +- * this moment. Make sure IRQ work is set up before this
3415 +- * variable is set.
3416 +- */
3417 +- barrier();
3418 +- printk_safe_irq_ready = 1;
3419 +-
3420 + /* Flush pending messages that did not have scheduled IRQ works. */
3421 + printk_safe_flush();
3422 + }
3423 +diff --git a/kernel/sched/core.c b/kernel/sched/core.c
3424 +index da8a19470218..3dd675697301 100644
3425 +--- a/kernel/sched/core.c
3426 ++++ b/kernel/sched/core.c
3427 +@@ -1239,13 +1239,8 @@ static void uclamp_fork(struct task_struct *p)
3428 + return;
3429 +
3430 + for_each_clamp_id(clamp_id) {
3431 +- unsigned int clamp_value = uclamp_none(clamp_id);
3432 +-
3433 +- /* By default, RT tasks always get 100% boost */
3434 +- if (unlikely(rt_task(p) && clamp_id == UCLAMP_MIN))
3435 +- clamp_value = uclamp_none(UCLAMP_MAX);
3436 +-
3437 +- uclamp_se_set(&p->uclamp_req[clamp_id], clamp_value, false);
3438 ++ uclamp_se_set(&p->uclamp_req[clamp_id],
3439 ++ uclamp_none(clamp_id), false);
3440 + }
3441 + }
3442 +
3443 +diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
3444 +index dac9104d126f..ff9435dee1df 100644
3445 +--- a/kernel/sched/cputime.c
3446 ++++ b/kernel/sched/cputime.c
3447 +@@ -1003,12 +1003,12 @@ u64 kcpustat_field(struct kernel_cpustat *kcpustat,
3448 + enum cpu_usage_stat usage, int cpu)
3449 + {
3450 + u64 *cpustat = kcpustat->cpustat;
3451 ++ u64 val = cpustat[usage];
3452 + struct rq *rq;
3453 +- u64 val;
3454 + int err;
3455 +
3456 + if (!vtime_accounting_enabled_cpu(cpu))
3457 +- return cpustat[usage];
3458 ++ return val;
3459 +
3460 + rq = cpu_rq(cpu);
3461 +
3462 +diff --git a/kernel/sched/isolation.c b/kernel/sched/isolation.c
3463 +index 008d6ac2342b..808244f3ddd9 100644
3464 +--- a/kernel/sched/isolation.c
3465 ++++ b/kernel/sched/isolation.c
3466 +@@ -149,6 +149,9 @@ __setup("nohz_full=", housekeeping_nohz_full_setup);
3467 + static int __init housekeeping_isolcpus_setup(char *str)
3468 + {
3469 + unsigned int flags = 0;
3470 ++ bool illegal = false;
3471 ++ char *par;
3472 ++ int len;
3473 +
3474 + while (isalpha(*str)) {
3475 + if (!strncmp(str, "nohz,", 5)) {
3476 +@@ -169,8 +172,22 @@ static int __init housekeeping_isolcpus_setup(char *str)
3477 + continue;
3478 + }
3479 +
3480 +- pr_warn("isolcpus: Error, unknown flag\n");
3481 +- return 0;
3482 ++ /*
3483 ++ * Skip unknown sub-parameter and validate that it is not
3484 ++ * containing an invalid character.
3485 ++ */
3486 ++ for (par = str, len = 0; *str && *str != ','; str++, len++) {
3487 ++ if (!isalpha(*str) && *str != '_')
3488 ++ illegal = true;
3489 ++ }
3490 ++
3491 ++ if (illegal) {
3492 ++ pr_warn("isolcpus: Invalid flag %.*s\n", len, par);
3493 ++ return 0;
3494 ++ }
3495 ++
3496 ++ pr_info("isolcpus: Skipped unknown flag %.*s\n", len, par);
3497 ++ str++;
3498 + }
3499 +
3500 + /* Default behaviour for isolcpus without flags */
3501 +diff --git a/kernel/signal.c b/kernel/signal.c
3502 +index 7938c60e11dd..9abf962bbde4 100644
3503 +--- a/kernel/signal.c
3504 ++++ b/kernel/signal.c
3505 +@@ -1510,15 +1510,15 @@ int kill_pid_usb_asyncio(int sig, int errno, sigval_t addr,
3506 + unsigned long flags;
3507 + int ret = -EINVAL;
3508 +
3509 ++ if (!valid_signal(sig))
3510 ++ return ret;
3511 ++
3512 + clear_siginfo(&info);
3513 + info.si_signo = sig;
3514 + info.si_errno = errno;
3515 + info.si_code = SI_ASYNCIO;
3516 + *((sigval_t *)&info.si_pid) = addr;
3517 +
3518 +- if (!valid_signal(sig))
3519 +- return ret;
3520 +-
3521 + rcu_read_lock();
3522 + p = pid_task(pid, PIDTYPE_PID);
3523 + if (!p) {
3524 +diff --git a/mm/shmem.c b/mm/shmem.c
3525 +index aad3ba74b0e9..7406f91f8a52 100644
3526 +--- a/mm/shmem.c
3527 ++++ b/mm/shmem.c
3528 +@@ -2404,11 +2404,11 @@ static int shmem_mfill_atomic_pte(struct mm_struct *dst_mm,
3529 +
3530 + lru_cache_add_anon(page);
3531 +
3532 +- spin_lock(&info->lock);
3533 ++ spin_lock_irq(&info->lock);
3534 + info->alloced++;
3535 + inode->i_blocks += BLOCKS_PER_PAGE;
3536 + shmem_recalc_inode(inode);
3537 +- spin_unlock(&info->lock);
3538 ++ spin_unlock_irq(&info->lock);
3539 +
3540 + inc_mm_counter(dst_mm, mm_counter_file(page));
3541 + page_add_file_rmap(page, false);
3542 +diff --git a/net/core/datagram.c b/net/core/datagram.c
3543 +index a78e7f864c1e..56f0ccf677a5 100644
3544 +--- a/net/core/datagram.c
3545 ++++ b/net/core/datagram.c
3546 +@@ -51,6 +51,7 @@
3547 + #include <linux/slab.h>
3548 + #include <linux/pagemap.h>
3549 + #include <linux/uio.h>
3550 ++#include <linux/indirect_call_wrapper.h>
3551 +
3552 + #include <net/protocol.h>
3553 + #include <linux/skbuff.h>
3554 +@@ -414,6 +415,11 @@ int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags)
3555 + }
3556 + EXPORT_SYMBOL(skb_kill_datagram);
3557 +
3558 ++INDIRECT_CALLABLE_DECLARE(static size_t simple_copy_to_iter(const void *addr,
3559 ++ size_t bytes,
3560 ++ void *data __always_unused,
3561 ++ struct iov_iter *i));
3562 ++
3563 + static int __skb_datagram_iter(const struct sk_buff *skb, int offset,
3564 + struct iov_iter *to, int len, bool fault_short,
3565 + size_t (*cb)(const void *, size_t, void *,
3566 +@@ -427,7 +433,8 @@ static int __skb_datagram_iter(const struct sk_buff *skb, int offset,
3567 + if (copy > 0) {
3568 + if (copy > len)
3569 + copy = len;
3570 +- n = cb(skb->data + offset, copy, data, to);
3571 ++ n = INDIRECT_CALL_1(cb, simple_copy_to_iter,
3572 ++ skb->data + offset, copy, data, to);
3573 + offset += n;
3574 + if (n != copy)
3575 + goto short_copy;
3576 +@@ -449,8 +456,9 @@ static int __skb_datagram_iter(const struct sk_buff *skb, int offset,
3577 +
3578 + if (copy > len)
3579 + copy = len;
3580 +- n = cb(vaddr + skb_frag_off(frag) + offset - start,
3581 +- copy, data, to);
3582 ++ n = INDIRECT_CALL_1(cb, simple_copy_to_iter,
3583 ++ vaddr + skb_frag_off(frag) + offset - start,
3584 ++ copy, data, to);
3585 + kunmap(page);
3586 + offset += n;
3587 + if (n != copy)
3588 +diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
3589 +index d09b3c789314..36978a0e5000 100644
3590 +--- a/net/mac80211/mesh.c
3591 ++++ b/net/mac80211/mesh.c
3592 +@@ -1257,15 +1257,15 @@ static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata,
3593 + sdata->u.mesh.mshcfg.rssi_threshold < rx_status->signal)
3594 + mesh_neighbour_update(sdata, mgmt->sa, &elems,
3595 + rx_status);
3596 ++
3597 ++ if (ifmsh->csa_role != IEEE80211_MESH_CSA_ROLE_INIT &&
3598 ++ !sdata->vif.csa_active)
3599 ++ ieee80211_mesh_process_chnswitch(sdata, &elems, true);
3600 + }
3601 +
3602 + if (ifmsh->sync_ops)
3603 + ifmsh->sync_ops->rx_bcn_presp(sdata,
3604 + stype, mgmt, &elems, rx_status);
3605 +-
3606 +- if (ifmsh->csa_role != IEEE80211_MESH_CSA_ROLE_INIT &&
3607 +- !sdata->vif.csa_active)
3608 +- ieee80211_mesh_process_chnswitch(sdata, &elems, true);
3609 + }
3610 +
3611 + int ieee80211_mesh_finish_csa(struct ieee80211_sub_if_data *sdata)
3612 +@@ -1373,6 +1373,9 @@ static void mesh_rx_csa_frame(struct ieee80211_sub_if_data *sdata,
3613 + ieee802_11_parse_elems(pos, len - baselen, true, &elems,
3614 + mgmt->bssid, NULL);
3615 +
3616 ++ if (!mesh_matches_local(sdata, &elems))
3617 ++ return;
3618 ++
3619 + ifmsh->chsw_ttl = elems.mesh_chansw_params_ie->mesh_ttl;
3620 + if (!--ifmsh->chsw_ttl)
3621 + fwd_csa = false;
3622 +diff --git a/net/netfilter/nf_nat_proto.c b/net/netfilter/nf_nat_proto.c
3623 +index 64eedc17037a..3d816a1e5442 100644
3624 +--- a/net/netfilter/nf_nat_proto.c
3625 ++++ b/net/netfilter/nf_nat_proto.c
3626 +@@ -1035,8 +1035,8 @@ int nf_nat_inet_register_fn(struct net *net, const struct nf_hook_ops *ops)
3627 + ret = nf_nat_register_fn(net, NFPROTO_IPV4, ops, nf_nat_ipv4_ops,
3628 + ARRAY_SIZE(nf_nat_ipv4_ops));
3629 + if (ret)
3630 +- nf_nat_ipv6_unregister_fn(net, ops);
3631 +-
3632 ++ nf_nat_unregister_fn(net, NFPROTO_IPV6, ops,
3633 ++ ARRAY_SIZE(nf_nat_ipv6_ops));
3634 + return ret;
3635 + }
3636 + EXPORT_SYMBOL_GPL(nf_nat_inet_register_fn);
3637 +diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
3638 +index 68ec31c4ae65..116178d373a1 100644
3639 +--- a/net/netfilter/nf_tables_api.c
3640 ++++ b/net/netfilter/nf_tables_api.c
3641 +@@ -3949,7 +3949,7 @@ static int nf_tables_newset(struct net *net, struct sock *nlsk,
3642 + if (flags & ~(NFT_SET_ANONYMOUS | NFT_SET_CONSTANT |
3643 + NFT_SET_INTERVAL | NFT_SET_TIMEOUT |
3644 + NFT_SET_MAP | NFT_SET_EVAL |
3645 +- NFT_SET_OBJECT))
3646 ++ NFT_SET_OBJECT | NFT_SET_CONCAT))
3647 + return -EOPNOTSUPP;
3648 + /* Only one of these operations is supported */
3649 + if ((flags & (NFT_SET_MAP | NFT_SET_OBJECT)) ==
3650 +diff --git a/net/rxrpc/local_object.c b/net/rxrpc/local_object.c
3651 +index a6c1349e965d..01135e54d95d 100644
3652 +--- a/net/rxrpc/local_object.c
3653 ++++ b/net/rxrpc/local_object.c
3654 +@@ -165,15 +165,6 @@ static int rxrpc_open_socket(struct rxrpc_local *local, struct net *net)
3655 + goto error;
3656 + }
3657 +
3658 +- /* we want to set the don't fragment bit */
3659 +- opt = IPV6_PMTUDISC_DO;
3660 +- ret = kernel_setsockopt(local->socket, SOL_IPV6, IPV6_MTU_DISCOVER,
3661 +- (char *) &opt, sizeof(opt));
3662 +- if (ret < 0) {
3663 +- _debug("setsockopt failed");
3664 +- goto error;
3665 +- }
3666 +-
3667 + /* Fall through and set IPv4 options too otherwise we don't get
3668 + * errors from IPv4 packets sent through the IPv6 socket.
3669 + */
3670 +diff --git a/net/rxrpc/output.c b/net/rxrpc/output.c
3671 +index bad3d2420344..90e263c6aa69 100644
3672 +--- a/net/rxrpc/output.c
3673 ++++ b/net/rxrpc/output.c
3674 +@@ -474,41 +474,21 @@ send_fragmentable:
3675 + skb->tstamp = ktime_get_real();
3676 +
3677 + switch (conn->params.local->srx.transport.family) {
3678 ++ case AF_INET6:
3679 + case AF_INET:
3680 + opt = IP_PMTUDISC_DONT;
3681 +- ret = kernel_setsockopt(conn->params.local->socket,
3682 +- SOL_IP, IP_MTU_DISCOVER,
3683 +- (char *)&opt, sizeof(opt));
3684 +- if (ret == 0) {
3685 +- ret = kernel_sendmsg(conn->params.local->socket, &msg,
3686 +- iov, 2, len);
3687 +- conn->params.peer->last_tx_at = ktime_get_seconds();
3688 +-
3689 +- opt = IP_PMTUDISC_DO;
3690 +- kernel_setsockopt(conn->params.local->socket, SOL_IP,
3691 +- IP_MTU_DISCOVER,
3692 +- (char *)&opt, sizeof(opt));
3693 +- }
3694 +- break;
3695 +-
3696 +-#ifdef CONFIG_AF_RXRPC_IPV6
3697 +- case AF_INET6:
3698 +- opt = IPV6_PMTUDISC_DONT;
3699 +- ret = kernel_setsockopt(conn->params.local->socket,
3700 +- SOL_IPV6, IPV6_MTU_DISCOVER,
3701 +- (char *)&opt, sizeof(opt));
3702 +- if (ret == 0) {
3703 +- ret = kernel_sendmsg(conn->params.local->socket, &msg,
3704 +- iov, 2, len);
3705 +- conn->params.peer->last_tx_at = ktime_get_seconds();
3706 +-
3707 +- opt = IPV6_PMTUDISC_DO;
3708 +- kernel_setsockopt(conn->params.local->socket,
3709 +- SOL_IPV6, IPV6_MTU_DISCOVER,
3710 +- (char *)&opt, sizeof(opt));
3711 +- }
3712 ++ kernel_setsockopt(conn->params.local->socket,
3713 ++ SOL_IP, IP_MTU_DISCOVER,
3714 ++ (char *)&opt, sizeof(opt));
3715 ++ ret = kernel_sendmsg(conn->params.local->socket, &msg,
3716 ++ iov, 2, len);
3717 ++ conn->params.peer->last_tx_at = ktime_get_seconds();
3718 ++
3719 ++ opt = IP_PMTUDISC_DO;
3720 ++ kernel_setsockopt(conn->params.local->socket,
3721 ++ SOL_IP, IP_MTU_DISCOVER,
3722 ++ (char *)&opt, sizeof(opt));
3723 + break;
3724 +-#endif
3725 +
3726 + default:
3727 + BUG();
3728 +diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
3729 +index 298557744818..dc74519286be 100644
3730 +--- a/net/sunrpc/svc_xprt.c
3731 ++++ b/net/sunrpc/svc_xprt.c
3732 +@@ -897,9 +897,6 @@ int svc_send(struct svc_rqst *rqstp)
3733 + if (!xprt)
3734 + goto out;
3735 +
3736 +- /* release the receive skb before sending the reply */
3737 +- xprt->xpt_ops->xpo_release_rqst(rqstp);
3738 +-
3739 + /* calculate over-all length */
3740 + xb = &rqstp->rq_res;
3741 + xb->len = xb->head[0].iov_len +
3742 +diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
3743 +index 2934dd711715..4260924ad9db 100644
3744 +--- a/net/sunrpc/svcsock.c
3745 ++++ b/net/sunrpc/svcsock.c
3746 +@@ -605,6 +605,8 @@ svc_udp_sendto(struct svc_rqst *rqstp)
3747 + {
3748 + int error;
3749 +
3750 ++ svc_release_udp_skb(rqstp);
3751 ++
3752 + error = svc_sendto(rqstp, &rqstp->rq_res);
3753 + if (error == -ECONNREFUSED)
3754 + /* ICMP error on earlier request. */
3755 +@@ -1137,6 +1139,8 @@ static int svc_tcp_sendto(struct svc_rqst *rqstp)
3756 + int sent;
3757 + __be32 reclen;
3758 +
3759 ++ svc_release_skb(rqstp);
3760 ++
3761 + /* Set up the first element of the reply kvec.
3762 + * Any other kvecs that may be in use have been taken
3763 + * care of by the server implementation itself.
3764 +diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
3765 +index 96bccd398469..b8ee91ffedda 100644
3766 +--- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
3767 ++++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
3768 +@@ -222,6 +222,26 @@ void svc_rdma_recv_ctxt_put(struct svcxprt_rdma *rdma,
3769 + svc_rdma_recv_ctxt_destroy(rdma, ctxt);
3770 + }
3771 +
3772 ++/**
3773 ++ * svc_rdma_release_rqst - Release transport-specific per-rqst resources
3774 ++ * @rqstp: svc_rqst being released
3775 ++ *
3776 ++ * Ensure that the recv_ctxt is released whether or not a Reply
3777 ++ * was sent. For example, the client could close the connection,
3778 ++ * or svc_process could drop an RPC, before the Reply is sent.
3779 ++ */
3780 ++void svc_rdma_release_rqst(struct svc_rqst *rqstp)
3781 ++{
3782 ++ struct svc_rdma_recv_ctxt *ctxt = rqstp->rq_xprt_ctxt;
3783 ++ struct svc_xprt *xprt = rqstp->rq_xprt;
3784 ++ struct svcxprt_rdma *rdma =
3785 ++ container_of(xprt, struct svcxprt_rdma, sc_xprt);
3786 ++
3787 ++ rqstp->rq_xprt_ctxt = NULL;
3788 ++ if (ctxt)
3789 ++ svc_rdma_recv_ctxt_put(rdma, ctxt);
3790 ++}
3791 ++
3792 + static int __svc_rdma_post_recv(struct svcxprt_rdma *rdma,
3793 + struct svc_rdma_recv_ctxt *ctxt)
3794 + {
3795 +@@ -756,6 +776,8 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp)
3796 + __be32 *p;
3797 + int ret;
3798 +
3799 ++ rqstp->rq_xprt_ctxt = NULL;
3800 ++
3801 + spin_lock(&rdma_xprt->sc_rq_dto_lock);
3802 + ctxt = svc_rdma_next_recv_ctxt(&rdma_xprt->sc_read_complete_q);
3803 + if (ctxt) {
3804 +diff --git a/net/sunrpc/xprtrdma/svc_rdma_rw.c b/net/sunrpc/xprtrdma/svc_rdma_rw.c
3805 +index 48fe3b16b0d9..a59912e2666d 100644
3806 +--- a/net/sunrpc/xprtrdma/svc_rdma_rw.c
3807 ++++ b/net/sunrpc/xprtrdma/svc_rdma_rw.c
3808 +@@ -323,8 +323,6 @@ static int svc_rdma_post_chunk_ctxt(struct svc_rdma_chunk_ctxt *cc)
3809 + if (atomic_sub_return(cc->cc_sqecount,
3810 + &rdma->sc_sq_avail) > 0) {
3811 + ret = ib_post_send(rdma->sc_qp, first_wr, &bad_wr);
3812 +- trace_svcrdma_post_rw(&cc->cc_cqe,
3813 +- cc->cc_sqecount, ret);
3814 + if (ret)
3815 + break;
3816 + return 0;
3817 +@@ -337,6 +335,7 @@ static int svc_rdma_post_chunk_ctxt(struct svc_rdma_chunk_ctxt *cc)
3818 + trace_svcrdma_sq_retry(rdma);
3819 + } while (1);
3820 +
3821 ++ trace_svcrdma_sq_post_err(rdma, ret);
3822 + set_bit(XPT_CLOSE, &xprt->xpt_flags);
3823 +
3824 + /* If even one was posted, there will be a completion. */
3825 +diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
3826 +index f3f108090aa4..9f234d1f3b3d 100644
3827 +--- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c
3828 ++++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
3829 +@@ -310,15 +310,17 @@ int svc_rdma_send(struct svcxprt_rdma *rdma, struct ib_send_wr *wr)
3830 + }
3831 +
3832 + svc_xprt_get(&rdma->sc_xprt);
3833 ++ trace_svcrdma_post_send(wr);
3834 + ret = ib_post_send(rdma->sc_qp, wr, NULL);
3835 +- trace_svcrdma_post_send(wr, ret);
3836 +- if (ret) {
3837 +- set_bit(XPT_CLOSE, &rdma->sc_xprt.xpt_flags);
3838 +- svc_xprt_put(&rdma->sc_xprt);
3839 +- wake_up(&rdma->sc_send_wait);
3840 +- }
3841 +- break;
3842 ++ if (ret)
3843 ++ break;
3844 ++ return 0;
3845 + }
3846 ++
3847 ++ trace_svcrdma_sq_post_err(rdma, ret);
3848 ++ set_bit(XPT_CLOSE, &rdma->sc_xprt.xpt_flags);
3849 ++ svc_xprt_put(&rdma->sc_xprt);
3850 ++ wake_up(&rdma->sc_send_wait);
3851 + return ret;
3852 + }
3853 +
3854 +@@ -875,12 +877,7 @@ int svc_rdma_sendto(struct svc_rqst *rqstp)
3855 + wr_lst, rp_ch);
3856 + if (ret < 0)
3857 + goto err1;
3858 +- ret = 0;
3859 +-
3860 +-out:
3861 +- rqstp->rq_xprt_ctxt = NULL;
3862 +- svc_rdma_recv_ctxt_put(rdma, rctxt);
3863 +- return ret;
3864 ++ return 0;
3865 +
3866 + err2:
3867 + if (ret != -E2BIG && ret != -EINVAL)
3868 +@@ -889,14 +886,12 @@ out:
3869 + ret = svc_rdma_send_error_msg(rdma, sctxt, rqstp);
3870 + if (ret < 0)
3871 + goto err1;
3872 +- ret = 0;
3873 +- goto out;
3874 ++ return 0;
3875 +
3876 + err1:
3877 + svc_rdma_send_ctxt_put(rdma, sctxt);
3878 + err0:
3879 + trace_svcrdma_send_failed(rqstp, ret);
3880 + set_bit(XPT_CLOSE, &xprt->xpt_flags);
3881 +- ret = -ENOTCONN;
3882 +- goto out;
3883 ++ return -ENOTCONN;
3884 + }
3885 +diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
3886 +index 145a3615c319..889220f11a70 100644
3887 +--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
3888 ++++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
3889 +@@ -71,7 +71,6 @@ static struct svc_xprt *svc_rdma_create(struct svc_serv *serv,
3890 + struct sockaddr *sa, int salen,
3891 + int flags);
3892 + static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt);
3893 +-static void svc_rdma_release_rqst(struct svc_rqst *);
3894 + static void svc_rdma_detach(struct svc_xprt *xprt);
3895 + static void svc_rdma_free(struct svc_xprt *xprt);
3896 + static int svc_rdma_has_wspace(struct svc_xprt *xprt);
3897 +@@ -558,10 +557,6 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
3898 + return NULL;
3899 + }
3900 +
3901 +-static void svc_rdma_release_rqst(struct svc_rqst *rqstp)
3902 +-{
3903 +-}
3904 +-
3905 + /*
3906 + * When connected, an svc_xprt has at least two references:
3907 + *
3908 +diff --git a/net/tipc/link.c b/net/tipc/link.c
3909 +index 467c53a1fb5c..d4675e922a8f 100644
3910 +--- a/net/tipc/link.c
3911 ++++ b/net/tipc/link.c
3912 +@@ -1065,7 +1065,7 @@ static void tipc_link_update_cwin(struct tipc_link *l, int released,
3913 + /* Enter fast recovery */
3914 + if (unlikely(retransmitted)) {
3915 + l->ssthresh = max_t(u16, l->window / 2, 300);
3916 +- l->window = l->ssthresh;
3917 ++ l->window = min_t(u16, l->ssthresh, l->window);
3918 + return;
3919 + }
3920 + /* Enter slow start */
3921 +diff --git a/net/tipc/msg.h b/net/tipc/msg.h
3922 +index 6d466ebdb64f..871feadbbc19 100644
3923 +--- a/net/tipc/msg.h
3924 ++++ b/net/tipc/msg.h
3925 +@@ -394,6 +394,11 @@ static inline u32 msg_connected(struct tipc_msg *m)
3926 + return msg_type(m) == TIPC_CONN_MSG;
3927 + }
3928 +
3929 ++static inline u32 msg_direct(struct tipc_msg *m)
3930 ++{
3931 ++ return msg_type(m) == TIPC_DIRECT_MSG;
3932 ++}
3933 ++
3934 + static inline u32 msg_errcode(struct tipc_msg *m)
3935 + {
3936 + return msg_bits(m, 1, 25, 0xf);
3937 +diff --git a/net/tipc/node.c b/net/tipc/node.c
3938 +index d50be9a3d479..803a3a6d0f50 100644
3939 +--- a/net/tipc/node.c
3940 ++++ b/net/tipc/node.c
3941 +@@ -1586,7 +1586,8 @@ static void tipc_lxc_xmit(struct net *peer_net, struct sk_buff_head *list)
3942 + case TIPC_MEDIUM_IMPORTANCE:
3943 + case TIPC_HIGH_IMPORTANCE:
3944 + case TIPC_CRITICAL_IMPORTANCE:
3945 +- if (msg_connected(hdr) || msg_named(hdr)) {
3946 ++ if (msg_connected(hdr) || msg_named(hdr) ||
3947 ++ msg_direct(hdr)) {
3948 + tipc_loopback_trace(peer_net, list);
3949 + spin_lock_init(&list->lock);
3950 + tipc_sk_rcv(peer_net, list);
3951 +diff --git a/net/tipc/socket.c b/net/tipc/socket.c
3952 +index 693e8902161e..87466607097f 100644
3953 +--- a/net/tipc/socket.c
3954 ++++ b/net/tipc/socket.c
3955 +@@ -1461,7 +1461,7 @@ static int __tipc_sendmsg(struct socket *sock, struct msghdr *m, size_t dlen)
3956 + }
3957 +
3958 + __skb_queue_head_init(&pkts);
3959 +- mtu = tipc_node_get_mtu(net, dnode, tsk->portid, false);
3960 ++ mtu = tipc_node_get_mtu(net, dnode, tsk->portid, true);
3961 + rc = tipc_msg_build(hdr, m, 0, dlen, mtu, &pkts);
3962 + if (unlikely(rc != dlen))
3963 + return rc;
3964 +diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
3965 +index 752ff0a225a9..f24ff5a903ae 100644
3966 +--- a/scripts/Makefile.lib
3967 ++++ b/scripts/Makefile.lib
3968 +@@ -308,7 +308,7 @@ define rule_dtc
3969 + endef
3970 +
3971 + $(obj)/%.dt.yaml: $(src)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE
3972 +- $(call if_changed_rule,dtc)
3973 ++ $(call if_changed_rule,dtc,yaml)
3974 +
3975 + dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
3976 +
3977 +diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
3978 +index af21e9583c0d..59b60b1f26f8 100644
3979 +--- a/sound/pci/hda/hda_intel.c
3980 ++++ b/sound/pci/hda/hda_intel.c
3981 +@@ -1203,10 +1203,8 @@ static void azx_vs_set_state(struct pci_dev *pci,
3982 + if (!disabled) {
3983 + dev_info(chip->card->dev,
3984 + "Start delayed initialization\n");
3985 +- if (azx_probe_continue(chip) < 0) {
3986 ++ if (azx_probe_continue(chip) < 0)
3987 + dev_err(chip->card->dev, "initialization error\n");
3988 +- hda->init_failed = true;
3989 +- }
3990 + }
3991 + } else {
3992 + dev_info(chip->card->dev, "%s via vga_switcheroo\n",
3993 +@@ -1339,12 +1337,15 @@ static int register_vga_switcheroo(struct azx *chip)
3994 + /*
3995 + * destructor
3996 + */
3997 +-static int azx_free(struct azx *chip)
3998 ++static void azx_free(struct azx *chip)
3999 + {
4000 + struct pci_dev *pci = chip->pci;
4001 + struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
4002 + struct hdac_bus *bus = azx_bus(chip);
4003 +
4004 ++ if (hda->freed)
4005 ++ return;
4006 ++
4007 + if (azx_has_pm_runtime(chip) && chip->running)
4008 + pm_runtime_get_noresume(&pci->dev);
4009 + chip->running = 0;
4010 +@@ -1388,9 +1389,8 @@ static int azx_free(struct azx *chip)
4011 +
4012 + if (chip->driver_caps & AZX_DCAPS_I915_COMPONENT)
4013 + snd_hdac_i915_exit(bus);
4014 +- kfree(hda);
4015 +
4016 +- return 0;
4017 ++ hda->freed = 1;
4018 + }
4019 +
4020 + static int azx_dev_disconnect(struct snd_device *device)
4021 +@@ -1406,7 +1406,8 @@ static int azx_dev_disconnect(struct snd_device *device)
4022 +
4023 + static int azx_dev_free(struct snd_device *device)
4024 + {
4025 +- return azx_free(device->device_data);
4026 ++ azx_free(device->device_data);
4027 ++ return 0;
4028 + }
4029 +
4030 + #ifdef SUPPORT_VGA_SWITCHEROO
4031 +@@ -1773,7 +1774,7 @@ static int azx_create(struct snd_card *card, struct pci_dev *pci,
4032 + if (err < 0)
4033 + return err;
4034 +
4035 +- hda = kzalloc(sizeof(*hda), GFP_KERNEL);
4036 ++ hda = devm_kzalloc(&pci->dev, sizeof(*hda), GFP_KERNEL);
4037 + if (!hda) {
4038 + pci_disable_device(pci);
4039 + return -ENOMEM;
4040 +@@ -1814,7 +1815,6 @@ static int azx_create(struct snd_card *card, struct pci_dev *pci,
4041 +
4042 + err = azx_bus_init(chip, model[dev]);
4043 + if (err < 0) {
4044 +- kfree(hda);
4045 + pci_disable_device(pci);
4046 + return err;
4047 + }
4048 +@@ -2009,7 +2009,7 @@ static int azx_first_init(struct azx *chip)
4049 + /* codec detection */
4050 + if (!azx_bus(chip)->codec_mask) {
4051 + dev_err(card->dev, "no codecs found!\n");
4052 +- return -ENODEV;
4053 ++ /* keep running the rest for the runtime PM */
4054 + }
4055 +
4056 + if (azx_acquire_irq(chip, 0) < 0)
4057 +@@ -2302,9 +2302,11 @@ static int azx_probe_continue(struct azx *chip)
4058 + #endif
4059 +
4060 + /* create codec instances */
4061 +- err = azx_probe_codecs(chip, azx_max_codecs[chip->driver_type]);
4062 +- if (err < 0)
4063 +- goto out_free;
4064 ++ if (bus->codec_mask) {
4065 ++ err = azx_probe_codecs(chip, azx_max_codecs[chip->driver_type]);
4066 ++ if (err < 0)
4067 ++ goto out_free;
4068 ++ }
4069 +
4070 + #ifdef CONFIG_SND_HDA_PATCH_LOADER
4071 + if (chip->fw) {
4072 +@@ -2318,7 +2320,7 @@ static int azx_probe_continue(struct azx *chip)
4073 + #endif
4074 + }
4075 + #endif
4076 +- if ((probe_only[dev] & 1) == 0) {
4077 ++ if (bus->codec_mask && !(probe_only[dev] & 1)) {
4078 + err = azx_codec_configure(chip);
4079 + if (err < 0)
4080 + goto out_free;
4081 +@@ -2335,17 +2337,23 @@ static int azx_probe_continue(struct azx *chip)
4082 +
4083 + set_default_power_save(chip);
4084 +
4085 +- if (azx_has_pm_runtime(chip))
4086 ++ if (azx_has_pm_runtime(chip)) {
4087 ++ pm_runtime_use_autosuspend(&pci->dev);
4088 ++ pm_runtime_allow(&pci->dev);
4089 + pm_runtime_put_autosuspend(&pci->dev);
4090 ++ }
4091 +
4092 + out_free:
4093 +- if (err < 0 || !hda->need_i915_power)
4094 ++ if (err < 0) {
4095 ++ azx_free(chip);
4096 ++ return err;
4097 ++ }
4098 ++
4099 ++ if (!hda->need_i915_power)
4100 + display_power(chip, false);
4101 +- if (err < 0)
4102 +- hda->init_failed = 1;
4103 + complete_all(&hda->probe_wait);
4104 + to_hda_bus(bus)->bus_probing = 0;
4105 +- return err;
4106 ++ return 0;
4107 + }
4108 +
4109 + static void azx_remove(struct pci_dev *pci)
4110 +diff --git a/sound/pci/hda/hda_intel.h b/sound/pci/hda/hda_intel.h
4111 +index 2acfff3da1a0..3fb119f09040 100644
4112 +--- a/sound/pci/hda/hda_intel.h
4113 ++++ b/sound/pci/hda/hda_intel.h
4114 +@@ -27,6 +27,7 @@ struct hda_intel {
4115 + unsigned int use_vga_switcheroo:1;
4116 + unsigned int vga_switcheroo_registered:1;
4117 + unsigned int init_failed:1; /* delayed init failed */
4118 ++ unsigned int freed:1; /* resources already released */
4119 +
4120 + bool need_i915_power:1; /* the hda controller needs i915 power */
4121 + };
4122 +diff --git a/sound/soc/codecs/tas571x.c b/sound/soc/codecs/tas571x.c
4123 +index 1554631cb397..5b7f9fcf6cbf 100644
4124 +--- a/sound/soc/codecs/tas571x.c
4125 ++++ b/sound/soc/codecs/tas571x.c
4126 +@@ -820,8 +820,10 @@ static int tas571x_i2c_probe(struct i2c_client *client,
4127 +
4128 + priv->regmap = devm_regmap_init(dev, NULL, client,
4129 + priv->chip->regmap_config);
4130 +- if (IS_ERR(priv->regmap))
4131 +- return PTR_ERR(priv->regmap);
4132 ++ if (IS_ERR(priv->regmap)) {
4133 ++ ret = PTR_ERR(priv->regmap);
4134 ++ goto disable_regs;
4135 ++ }
4136 +
4137 + priv->pdn_gpio = devm_gpiod_get_optional(dev, "pdn", GPIOD_OUT_LOW);
4138 + if (IS_ERR(priv->pdn_gpio)) {
4139 +@@ -845,7 +847,7 @@ static int tas571x_i2c_probe(struct i2c_client *client,
4140 +
4141 + ret = regmap_write(priv->regmap, TAS571X_OSC_TRIM_REG, 0);
4142 + if (ret)
4143 +- return ret;
4144 ++ goto disable_regs;
4145 +
4146 + usleep_range(50000, 60000);
4147 +
4148 +@@ -861,12 +863,20 @@ static int tas571x_i2c_probe(struct i2c_client *client,
4149 + */
4150 + ret = regmap_update_bits(priv->regmap, TAS571X_MVOL_REG, 1, 0);
4151 + if (ret)
4152 +- return ret;
4153 ++ goto disable_regs;
4154 + }
4155 +
4156 +- return devm_snd_soc_register_component(&client->dev,
4157 ++ ret = devm_snd_soc_register_component(&client->dev,
4158 + &priv->component_driver,
4159 + &tas571x_dai, 1);
4160 ++ if (ret)
4161 ++ goto disable_regs;
4162 ++
4163 ++ return ret;
4164 ++
4165 ++disable_regs:
4166 ++ regulator_bulk_disable(priv->chip->num_supply_names, priv->supplies);
4167 ++ return ret;
4168 + }
4169 +
4170 + static int tas571x_i2c_remove(struct i2c_client *client)
4171 +diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
4172 +index 55112c1bba5e..6cf0f6612bda 100644
4173 +--- a/sound/soc/codecs/wm8960.c
4174 ++++ b/sound/soc/codecs/wm8960.c
4175 +@@ -860,8 +860,7 @@ static int wm8960_hw_params(struct snd_pcm_substream *substream,
4176 +
4177 + wm8960->is_stream_in_use[tx] = true;
4178 +
4179 +- if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_ON &&
4180 +- !wm8960->is_stream_in_use[!tx])
4181 ++ if (!wm8960->is_stream_in_use[!tx])
4182 + return wm8960_configure_clocking(component);
4183 +
4184 + return 0;
4185 +diff --git a/sound/soc/meson/axg-card.c b/sound/soc/meson/axg-card.c
4186 +index 1f698adde506..2b04ac3d8fd3 100644
4187 +--- a/sound/soc/meson/axg-card.c
4188 ++++ b/sound/soc/meson/axg-card.c
4189 +@@ -586,8 +586,10 @@ static int axg_card_add_link(struct snd_soc_card *card, struct device_node *np,
4190 +
4191 + if (axg_card_cpu_is_tdm_iface(dai_link->cpus->of_node))
4192 + ret = axg_card_parse_tdm(card, np, index);
4193 +- else if (axg_card_cpu_is_codec(dai_link->cpus->of_node))
4194 ++ else if (axg_card_cpu_is_codec(dai_link->cpus->of_node)) {
4195 + dai_link->params = &codec_params;
4196 ++ dai_link->no_pcm = 0; /* link is not a DPCM BE */
4197 ++ }
4198 +
4199 + return ret;
4200 + }
4201 +diff --git a/sound/soc/qcom/qdsp6/q6afe-dai.c b/sound/soc/qcom/qdsp6/q6afe-dai.c
4202 +index c1a7624eaf17..2a5302f1db98 100644
4203 +--- a/sound/soc/qcom/qdsp6/q6afe-dai.c
4204 ++++ b/sound/soc/qcom/qdsp6/q6afe-dai.c
4205 +@@ -902,6 +902,8 @@ static struct snd_soc_dai_driver q6afe_dais[] = {
4206 + SNDRV_PCM_RATE_16000,
4207 + .formats = SNDRV_PCM_FMTBIT_S16_LE |
4208 + SNDRV_PCM_FMTBIT_S24_LE,
4209 ++ .channels_min = 1,
4210 ++ .channels_max = 8,
4211 + .rate_min = 8000,
4212 + .rate_max = 48000,
4213 + },
4214 +@@ -917,6 +919,8 @@ static struct snd_soc_dai_driver q6afe_dais[] = {
4215 + SNDRV_PCM_RATE_16000,
4216 + .formats = SNDRV_PCM_FMTBIT_S16_LE |
4217 + SNDRV_PCM_FMTBIT_S24_LE,
4218 ++ .channels_min = 1,
4219 ++ .channels_max = 8,
4220 + .rate_min = 8000,
4221 + .rate_max = 48000,
4222 + },
4223 +@@ -931,6 +935,8 @@ static struct snd_soc_dai_driver q6afe_dais[] = {
4224 + .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 |
4225 + SNDRV_PCM_RATE_16000,
4226 + .formats = SNDRV_PCM_FMTBIT_S16_LE,
4227 ++ .channels_min = 1,
4228 ++ .channels_max = 8,
4229 + .rate_min = 8000,
4230 + .rate_max = 48000,
4231 + },
4232 +@@ -946,6 +952,8 @@ static struct snd_soc_dai_driver q6afe_dais[] = {
4233 + SNDRV_PCM_RATE_16000,
4234 + .formats = SNDRV_PCM_FMTBIT_S16_LE |
4235 + SNDRV_PCM_FMTBIT_S24_LE,
4236 ++ .channels_min = 1,
4237 ++ .channels_max = 8,
4238 + .rate_min = 8000,
4239 + .rate_max = 48000,
4240 + },
4241 +@@ -960,6 +968,8 @@ static struct snd_soc_dai_driver q6afe_dais[] = {
4242 + .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 |
4243 + SNDRV_PCM_RATE_16000,
4244 + .formats = SNDRV_PCM_FMTBIT_S16_LE,
4245 ++ .channels_min = 1,
4246 ++ .channels_max = 8,
4247 + .rate_min = 8000,
4248 + .rate_max = 48000,
4249 + },
4250 +@@ -975,6 +985,8 @@ static struct snd_soc_dai_driver q6afe_dais[] = {
4251 + SNDRV_PCM_RATE_16000,
4252 + .formats = SNDRV_PCM_FMTBIT_S16_LE |
4253 + SNDRV_PCM_FMTBIT_S24_LE,
4254 ++ .channels_min = 1,
4255 ++ .channels_max = 8,
4256 + .rate_min = 8000,
4257 + .rate_max = 48000,
4258 + },
4259 +@@ -989,6 +1001,8 @@ static struct snd_soc_dai_driver q6afe_dais[] = {
4260 + .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 |
4261 + SNDRV_PCM_RATE_16000,
4262 + .formats = SNDRV_PCM_FMTBIT_S16_LE,
4263 ++ .channels_min = 1,
4264 ++ .channels_max = 8,
4265 + .rate_min = 8000,
4266 + .rate_max = 48000,
4267 + },
4268 +@@ -1004,6 +1018,8 @@ static struct snd_soc_dai_driver q6afe_dais[] = {
4269 + SNDRV_PCM_RATE_16000,
4270 + .formats = SNDRV_PCM_FMTBIT_S16_LE |
4271 + SNDRV_PCM_FMTBIT_S24_LE,
4272 ++ .channels_min = 1,
4273 ++ .channels_max = 8,
4274 + .rate_min = 8000,
4275 + .rate_max = 48000,
4276 + },
4277 +diff --git a/sound/soc/samsung/s3c-i2s-v2.c b/sound/soc/samsung/s3c-i2s-v2.c
4278 +index 593be1b668d6..b3e12d6a78a1 100644
4279 +--- a/sound/soc/samsung/s3c-i2s-v2.c
4280 ++++ b/sound/soc/samsung/s3c-i2s-v2.c
4281 +@@ -656,60 +656,6 @@ void s3c_i2sv2_cleanup(struct snd_soc_dai *dai,
4282 + }
4283 + EXPORT_SYMBOL_GPL(s3c_i2sv2_cleanup);
4284 +
4285 +-#ifdef CONFIG_PM
4286 +-static int s3c2412_i2s_suspend(struct snd_soc_dai *dai)
4287 +-{
4288 +- struct s3c_i2sv2_info *i2s = to_info(dai);
4289 +- u32 iismod;
4290 +-
4291 +- if (dai->active) {
4292 +- i2s->suspend_iismod = readl(i2s->regs + S3C2412_IISMOD);
4293 +- i2s->suspend_iiscon = readl(i2s->regs + S3C2412_IISCON);
4294 +- i2s->suspend_iispsr = readl(i2s->regs + S3C2412_IISPSR);
4295 +-
4296 +- /* some basic suspend checks */
4297 +-
4298 +- iismod = readl(i2s->regs + S3C2412_IISMOD);
4299 +-
4300 +- if (iismod & S3C2412_IISCON_RXDMA_ACTIVE)
4301 +- pr_warn("%s: RXDMA active?\n", __func__);
4302 +-
4303 +- if (iismod & S3C2412_IISCON_TXDMA_ACTIVE)
4304 +- pr_warn("%s: TXDMA active?\n", __func__);
4305 +-
4306 +- if (iismod & S3C2412_IISCON_IIS_ACTIVE)
4307 +- pr_warn("%s: IIS active\n", __func__);
4308 +- }
4309 +-
4310 +- return 0;
4311 +-}
4312 +-
4313 +-static int s3c2412_i2s_resume(struct snd_soc_dai *dai)
4314 +-{
4315 +- struct s3c_i2sv2_info *i2s = to_info(dai);
4316 +-
4317 +- pr_info("dai_active %d, IISMOD %08x, IISCON %08x\n",
4318 +- dai->active, i2s->suspend_iismod, i2s->suspend_iiscon);
4319 +-
4320 +- if (dai->active) {
4321 +- writel(i2s->suspend_iiscon, i2s->regs + S3C2412_IISCON);
4322 +- writel(i2s->suspend_iismod, i2s->regs + S3C2412_IISMOD);
4323 +- writel(i2s->suspend_iispsr, i2s->regs + S3C2412_IISPSR);
4324 +-
4325 +- writel(S3C2412_IISFIC_RXFLUSH | S3C2412_IISFIC_TXFLUSH,
4326 +- i2s->regs + S3C2412_IISFIC);
4327 +-
4328 +- ndelay(250);
4329 +- writel(0x0, i2s->regs + S3C2412_IISFIC);
4330 +- }
4331 +-
4332 +- return 0;
4333 +-}
4334 +-#else
4335 +-#define s3c2412_i2s_suspend NULL
4336 +-#define s3c2412_i2s_resume NULL
4337 +-#endif
4338 +-
4339 + int s3c_i2sv2_register_component(struct device *dev, int id,
4340 + const struct snd_soc_component_driver *cmp_drv,
4341 + struct snd_soc_dai_driver *dai_drv)
4342 +@@ -727,9 +673,6 @@ int s3c_i2sv2_register_component(struct device *dev, int id,
4343 + if (!ops->delay)
4344 + ops->delay = s3c2412_i2s_delay;
4345 +
4346 +- dai_drv->suspend = s3c2412_i2s_suspend;
4347 +- dai_drv->resume = s3c2412_i2s_resume;
4348 +-
4349 + return devm_snd_soc_register_component(dev, cmp_drv, dai_drv, 1);
4350 + }
4351 + EXPORT_SYMBOL_GPL(s3c_i2sv2_register_component);
4352 +diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c
4353 +index 787a3f6e9f24..b35d828c1cfe 100644
4354 +--- a/sound/soc/samsung/s3c2412-i2s.c
4355 ++++ b/sound/soc/samsung/s3c2412-i2s.c
4356 +@@ -117,6 +117,60 @@ static int s3c2412_i2s_hw_params(struct snd_pcm_substream *substream,
4357 + return 0;
4358 + }
4359 +
4360 ++#ifdef CONFIG_PM
4361 ++static int s3c2412_i2s_suspend(struct snd_soc_component *component)
4362 ++{
4363 ++ struct s3c_i2sv2_info *i2s = snd_soc_component_get_drvdata(component);
4364 ++ u32 iismod;
4365 ++
4366 ++ if (component->active) {
4367 ++ i2s->suspend_iismod = readl(i2s->regs + S3C2412_IISMOD);
4368 ++ i2s->suspend_iiscon = readl(i2s->regs + S3C2412_IISCON);
4369 ++ i2s->suspend_iispsr = readl(i2s->regs + S3C2412_IISPSR);
4370 ++
4371 ++ /* some basic suspend checks */
4372 ++
4373 ++ iismod = readl(i2s->regs + S3C2412_IISMOD);
4374 ++
4375 ++ if (iismod & S3C2412_IISCON_RXDMA_ACTIVE)
4376 ++ pr_warn("%s: RXDMA active?\n", __func__);
4377 ++
4378 ++ if (iismod & S3C2412_IISCON_TXDMA_ACTIVE)
4379 ++ pr_warn("%s: TXDMA active?\n", __func__);
4380 ++
4381 ++ if (iismod & S3C2412_IISCON_IIS_ACTIVE)
4382 ++ pr_warn("%s: IIS active\n", __func__);
4383 ++ }
4384 ++
4385 ++ return 0;
4386 ++}
4387 ++
4388 ++static int s3c2412_i2s_resume(struct snd_soc_component *component)
4389 ++{
4390 ++ struct s3c_i2sv2_info *i2s = snd_soc_component_get_drvdata(component);
4391 ++
4392 ++ pr_info("component_active %d, IISMOD %08x, IISCON %08x\n",
4393 ++ component->active, i2s->suspend_iismod, i2s->suspend_iiscon);
4394 ++
4395 ++ if (component->active) {
4396 ++ writel(i2s->suspend_iiscon, i2s->regs + S3C2412_IISCON);
4397 ++ writel(i2s->suspend_iismod, i2s->regs + S3C2412_IISMOD);
4398 ++ writel(i2s->suspend_iispsr, i2s->regs + S3C2412_IISPSR);
4399 ++
4400 ++ writel(S3C2412_IISFIC_RXFLUSH | S3C2412_IISFIC_TXFLUSH,
4401 ++ i2s->regs + S3C2412_IISFIC);
4402 ++
4403 ++ ndelay(250);
4404 ++ writel(0x0, i2s->regs + S3C2412_IISFIC);
4405 ++ }
4406 ++
4407 ++ return 0;
4408 ++}
4409 ++#else
4410 ++#define s3c2412_i2s_suspend NULL
4411 ++#define s3c2412_i2s_resume NULL
4412 ++#endif
4413 ++
4414 + #define S3C2412_I2S_RATES \
4415 + (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 | SNDRV_PCM_RATE_16000 | \
4416 + SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \
4417 +@@ -146,6 +200,8 @@ static struct snd_soc_dai_driver s3c2412_i2s_dai = {
4418 +
4419 + static const struct snd_soc_component_driver s3c2412_i2s_component = {
4420 + .name = "s3c2412-i2s",
4421 ++ .suspend = s3c2412_i2s_suspend,
4422 ++ .resume = s3c2412_i2s_resume,
4423 + };
4424 +
4425 + static int s3c2412_iis_dev_probe(struct platform_device *pdev)
4426 +diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
4427 +index 068d809c349a..b17366bac846 100644
4428 +--- a/sound/soc/soc-core.c
4429 ++++ b/sound/soc/soc-core.c
4430 +@@ -1256,8 +1256,18 @@ static int soc_probe_component(struct snd_soc_card *card,
4431 + ret = snd_soc_dapm_add_routes(dapm,
4432 + component->driver->dapm_routes,
4433 + component->driver->num_dapm_routes);
4434 +- if (ret < 0)
4435 +- goto err_probe;
4436 ++ if (ret < 0) {
4437 ++ if (card->disable_route_checks) {
4438 ++ dev_info(card->dev,
4439 ++ "%s: disable_route_checks set, ignoring errors on add_routes\n",
4440 ++ __func__);
4441 ++ } else {
4442 ++ dev_err(card->dev,
4443 ++ "%s: snd_soc_dapm_add_routes failed: %d\n",
4444 ++ __func__, ret);
4445 ++ goto err_probe;
4446 ++ }
4447 ++ }
4448 +
4449 + /* see for_each_card_components */
4450 + list_add(&component->card_list, &card->component_dev_list);
4451 +@@ -1938,8 +1948,18 @@ static int snd_soc_bind_card(struct snd_soc_card *card)
4452 +
4453 + ret = snd_soc_dapm_add_routes(&card->dapm, card->dapm_routes,
4454 + card->num_dapm_routes);
4455 +- if (ret < 0)
4456 +- goto probe_end;
4457 ++ if (ret < 0) {
4458 ++ if (card->disable_route_checks) {
4459 ++ dev_info(card->dev,
4460 ++ "%s: disable_route_checks set, ignoring errors on add_routes\n",
4461 ++ __func__);
4462 ++ } else {
4463 ++ dev_err(card->dev,
4464 ++ "%s: snd_soc_dapm_add_routes failed: %d\n",
4465 ++ __func__, ret);
4466 ++ goto probe_end;
4467 ++ }
4468 ++ }
4469 +
4470 + ret = snd_soc_dapm_add_routes(&card->dapm, card->of_dapm_routes,
4471 + card->num_of_dapm_routes);
4472 +diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
4473 +index 8f6f0ad50288..10e2305bb885 100644
4474 +--- a/sound/soc/soc-pcm.c
4475 ++++ b/sound/soc/soc-pcm.c
4476 +@@ -2890,22 +2890,19 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
4477 + capture = rtd->dai_link->dpcm_capture;
4478 + } else {
4479 + /* Adapt stream for codec2codec links */
4480 +- struct snd_soc_pcm_stream *cpu_capture = rtd->dai_link->params ?
4481 +- &cpu_dai->driver->playback : &cpu_dai->driver->capture;
4482 +- struct snd_soc_pcm_stream *cpu_playback = rtd->dai_link->params ?
4483 +- &cpu_dai->driver->capture : &cpu_dai->driver->playback;
4484 ++ int cpu_capture = rtd->dai_link->params ?
4485 ++ SNDRV_PCM_STREAM_PLAYBACK : SNDRV_PCM_STREAM_CAPTURE;
4486 ++ int cpu_playback = rtd->dai_link->params ?
4487 ++ SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK;
4488 +
4489 + for_each_rtd_codec_dai(rtd, i, codec_dai) {
4490 + if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_PLAYBACK) &&
4491 +- snd_soc_dai_stream_valid(cpu_dai, SNDRV_PCM_STREAM_CAPTURE))
4492 ++ snd_soc_dai_stream_valid(cpu_dai, cpu_playback))
4493 + playback = 1;
4494 + if (snd_soc_dai_stream_valid(codec_dai, SNDRV_PCM_STREAM_CAPTURE) &&
4495 +- snd_soc_dai_stream_valid(cpu_dai, SNDRV_PCM_STREAM_PLAYBACK))
4496 ++ snd_soc_dai_stream_valid(cpu_dai, cpu_capture))
4497 + capture = 1;
4498 + }
4499 +-
4500 +- capture = capture && cpu_capture->channels_min;
4501 +- playback = playback && cpu_playback->channels_min;
4502 + }
4503 +
4504 + if (rtd->dai_link->playback_only) {
4505 +diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c
4506 +index d3259de43712..7e965848796c 100644
4507 +--- a/sound/soc/stm/stm32_sai_sub.c
4508 ++++ b/sound/soc/stm/stm32_sai_sub.c
4509 +@@ -1543,6 +1543,9 @@ static int stm32_sai_sub_probe(struct platform_device *pdev)
4510 + return ret;
4511 + }
4512 +
4513 ++ if (STM_SAI_PROTOCOL_IS_SPDIF(sai))
4514 ++ conf = &stm32_sai_pcm_config_spdif;
4515 ++
4516 + ret = snd_dmaengine_pcm_register(&pdev->dev, conf, 0);
4517 + if (ret) {
4518 + dev_err(&pdev->dev, "Could not register pcm dma\n");
4519 +@@ -1551,15 +1554,10 @@ static int stm32_sai_sub_probe(struct platform_device *pdev)
4520 +
4521 + ret = snd_soc_register_component(&pdev->dev, &stm32_component,
4522 + &sai->cpu_dai_drv, 1);
4523 +- if (ret) {
4524 ++ if (ret)
4525 + snd_dmaengine_pcm_unregister(&pdev->dev);
4526 +- return ret;
4527 +- }
4528 +-
4529 +- if (STM_SAI_PROTOCOL_IS_SPDIF(sai))
4530 +- conf = &stm32_sai_pcm_config_spdif;
4531 +
4532 +- return 0;
4533 ++ return ret;
4534 + }
4535 +
4536 + static int stm32_sai_sub_remove(struct platform_device *pdev)
4537 +diff --git a/sound/soc/stm/stm32_spdifrx.c b/sound/soc/stm/stm32_spdifrx.c
4538 +index 3769d9ce5dbe..e6e75897cce8 100644
4539 +--- a/sound/soc/stm/stm32_spdifrx.c
4540 ++++ b/sound/soc/stm/stm32_spdifrx.c
4541 +@@ -1009,6 +1009,8 @@ static int stm32_spdifrx_probe(struct platform_device *pdev)
4542 +
4543 + if (idr == SPDIFRX_IPIDR_NUMBER) {
4544 + ret = regmap_read(spdifrx->regmap, STM32_SPDIFRX_VERR, &ver);
4545 ++ if (ret)
4546 ++ goto error;
4547 +
4548 + dev_dbg(&pdev->dev, "SPDIFRX version: %lu.%lu registered\n",
4549 + FIELD_GET(SPDIFRX_VERR_MAJ_MASK, ver),
4550 +diff --git a/tools/lib/bpf/netlink.c b/tools/lib/bpf/netlink.c
4551 +index c364e4be5e6e..c1a7fc185940 100644
4552 +--- a/tools/lib/bpf/netlink.c
4553 ++++ b/tools/lib/bpf/netlink.c
4554 +@@ -141,7 +141,7 @@ int bpf_set_link_xdp_fd(int ifindex, int fd, __u32 flags)
4555 + struct ifinfomsg ifinfo;
4556 + char attrbuf[64];
4557 + } req;
4558 +- __u32 nl_pid;
4559 ++ __u32 nl_pid = 0;
4560 +
4561 + sock = libbpf_netlink_open(&nl_pid);
4562 + if (sock < 0)
4563 +@@ -256,7 +256,7 @@ int bpf_get_link_xdp_info(int ifindex, struct xdp_link_info *info,
4564 + {
4565 + struct xdp_id_md xdp_id = {};
4566 + int sock, ret;
4567 +- __u32 nl_pid;
4568 ++ __u32 nl_pid = 0;
4569 + __u32 mask;
4570 +
4571 + if (flags & ~XDP_FLAGS_MASK || !info_size)
4572 +diff --git a/tools/objtool/check.c b/tools/objtool/check.c
4573 +index 2b765bbbef92..95c485d3d4d8 100644
4574 +--- a/tools/objtool/check.c
4575 ++++ b/tools/objtool/check.c
4576 +@@ -2307,14 +2307,27 @@ static bool ignore_unreachable_insn(struct instruction *insn)
4577 + !strcmp(insn->sec->name, ".altinstr_aux"))
4578 + return true;
4579 +
4580 ++ if (!insn->func)
4581 ++ return false;
4582 ++
4583 ++ /*
4584 ++ * CONFIG_UBSAN_TRAP inserts a UD2 when it sees
4585 ++ * __builtin_unreachable(). The BUG() macro has an unreachable() after
4586 ++ * the UD2, which causes GCC's undefined trap logic to emit another UD2
4587 ++ * (or occasionally a JMP to UD2).
4588 ++ */
4589 ++ if (list_prev_entry(insn, list)->dead_end &&
4590 ++ (insn->type == INSN_BUG ||
4591 ++ (insn->type == INSN_JUMP_UNCONDITIONAL &&
4592 ++ insn->jump_dest && insn->jump_dest->type == INSN_BUG)))
4593 ++ return true;
4594 ++
4595 + /*
4596 + * Check if this (or a subsequent) instruction is related to
4597 + * CONFIG_UBSAN or CONFIG_KASAN.
4598 + *
4599 + * End the search at 5 instructions to avoid going into the weeds.
4600 + */
4601 +- if (!insn->func)
4602 +- return false;
4603 + for (i = 0; i < 5; i++) {
4604 +
4605 + if (is_kasan_insn(insn) || is_ubsan_insn(insn))
4606 +diff --git a/tools/objtool/orc_dump.c b/tools/objtool/orc_dump.c
4607 +index 13ccf775a83a..ba4cbb1cdd63 100644
4608 +--- a/tools/objtool/orc_dump.c
4609 ++++ b/tools/objtool/orc_dump.c
4610 +@@ -66,7 +66,7 @@ int orc_dump(const char *_objname)
4611 + char *name;
4612 + size_t nr_sections;
4613 + Elf64_Addr orc_ip_addr = 0;
4614 +- size_t shstrtab_idx;
4615 ++ size_t shstrtab_idx, strtab_idx = 0;
4616 + Elf *elf;
4617 + Elf_Scn *scn;
4618 + GElf_Shdr sh;
4619 +@@ -127,6 +127,8 @@ int orc_dump(const char *_objname)
4620 +
4621 + if (!strcmp(name, ".symtab")) {
4622 + symtab = data;
4623 ++ } else if (!strcmp(name, ".strtab")) {
4624 ++ strtab_idx = i;
4625 + } else if (!strcmp(name, ".orc_unwind")) {
4626 + orc = data->d_buf;
4627 + orc_size = sh.sh_size;
4628 +@@ -138,7 +140,7 @@ int orc_dump(const char *_objname)
4629 + }
4630 + }
4631 +
4632 +- if (!symtab || !orc || !orc_ip)
4633 ++ if (!symtab || !strtab_idx || !orc || !orc_ip)
4634 + return 0;
4635 +
4636 + if (orc_size % sizeof(*orc) != 0) {
4637 +@@ -159,21 +161,29 @@ int orc_dump(const char *_objname)
4638 + return -1;
4639 + }
4640 +
4641 +- scn = elf_getscn(elf, sym.st_shndx);
4642 +- if (!scn) {
4643 +- WARN_ELF("elf_getscn");
4644 +- return -1;
4645 +- }
4646 +-
4647 +- if (!gelf_getshdr(scn, &sh)) {
4648 +- WARN_ELF("gelf_getshdr");
4649 +- return -1;
4650 +- }
4651 +-
4652 +- name = elf_strptr(elf, shstrtab_idx, sh.sh_name);
4653 +- if (!name || !*name) {
4654 +- WARN_ELF("elf_strptr");
4655 +- return -1;
4656 ++ if (GELF_ST_TYPE(sym.st_info) == STT_SECTION) {
4657 ++ scn = elf_getscn(elf, sym.st_shndx);
4658 ++ if (!scn) {
4659 ++ WARN_ELF("elf_getscn");
4660 ++ return -1;
4661 ++ }
4662 ++
4663 ++ if (!gelf_getshdr(scn, &sh)) {
4664 ++ WARN_ELF("gelf_getshdr");
4665 ++ return -1;
4666 ++ }
4667 ++
4668 ++ name = elf_strptr(elf, shstrtab_idx, sh.sh_name);
4669 ++ if (!name) {
4670 ++ WARN_ELF("elf_strptr");
4671 ++ return -1;
4672 ++ }
4673 ++ } else {
4674 ++ name = elf_strptr(elf, strtab_idx, sym.st_name);
4675 ++ if (!name) {
4676 ++ WARN_ELF("elf_strptr");
4677 ++ return -1;
4678 ++ }
4679 + }
4680 +
4681 + printf("%s+%llx:", name, (unsigned long long)rela.r_addend);
4682 +diff --git a/tools/testing/selftests/bpf/progs/test_btf_haskv.c b/tools/testing/selftests/bpf/progs/test_btf_haskv.c
4683 +index 88b0566da13d..31538c9ed193 100644
4684 +--- a/tools/testing/selftests/bpf/progs/test_btf_haskv.c
4685 ++++ b/tools/testing/selftests/bpf/progs/test_btf_haskv.c
4686 +@@ -20,20 +20,12 @@ struct bpf_map_def SEC("maps") btf_map = {
4687 +
4688 + BPF_ANNOTATE_KV_PAIR(btf_map, int, struct ipv_counts);
4689 +
4690 +-struct dummy_tracepoint_args {
4691 +- unsigned long long pad;
4692 +- struct sock *sock;
4693 +-};
4694 +-
4695 + __attribute__((noinline))
4696 +-int test_long_fname_2(struct dummy_tracepoint_args *arg)
4697 ++int test_long_fname_2(void)
4698 + {
4699 + struct ipv_counts *counts;
4700 + int key = 0;
4701 +
4702 +- if (!arg->sock)
4703 +- return 0;
4704 +-
4705 + counts = bpf_map_lookup_elem(&btf_map, &key);
4706 + if (!counts)
4707 + return 0;
4708 +@@ -44,15 +36,15 @@ int test_long_fname_2(struct dummy_tracepoint_args *arg)
4709 + }
4710 +
4711 + __attribute__((noinline))
4712 +-int test_long_fname_1(struct dummy_tracepoint_args *arg)
4713 ++int test_long_fname_1(void)
4714 + {
4715 +- return test_long_fname_2(arg);
4716 ++ return test_long_fname_2();
4717 + }
4718 +
4719 + SEC("dummy_tracepoint")
4720 +-int _dummy_tracepoint(struct dummy_tracepoint_args *arg)
4721 ++int _dummy_tracepoint(void *arg)
4722 + {
4723 +- return test_long_fname_1(arg);
4724 ++ return test_long_fname_1();
4725 + }
4726 +
4727 + char _license[] SEC("license") = "GPL";
4728 +diff --git a/tools/testing/selftests/bpf/progs/test_btf_newkv.c b/tools/testing/selftests/bpf/progs/test_btf_newkv.c
4729 +index a924e53c8e9d..6c5560162746 100644
4730 +--- a/tools/testing/selftests/bpf/progs/test_btf_newkv.c
4731 ++++ b/tools/testing/selftests/bpf/progs/test_btf_newkv.c
4732 +@@ -28,20 +28,12 @@ struct {
4733 + __type(value, struct ipv_counts);
4734 + } btf_map SEC(".maps");
4735 +
4736 +-struct dummy_tracepoint_args {
4737 +- unsigned long long pad;
4738 +- struct sock *sock;
4739 +-};
4740 +-
4741 + __attribute__((noinline))
4742 +-int test_long_fname_2(struct dummy_tracepoint_args *arg)
4743 ++int test_long_fname_2(void)
4744 + {
4745 + struct ipv_counts *counts;
4746 + int key = 0;
4747 +
4748 +- if (!arg->sock)
4749 +- return 0;
4750 +-
4751 + counts = bpf_map_lookup_elem(&btf_map, &key);
4752 + if (!counts)
4753 + return 0;
4754 +@@ -57,15 +49,15 @@ int test_long_fname_2(struct dummy_tracepoint_args *arg)
4755 + }
4756 +
4757 + __attribute__((noinline))
4758 +-int test_long_fname_1(struct dummy_tracepoint_args *arg)
4759 ++int test_long_fname_1(void)
4760 + {
4761 +- return test_long_fname_2(arg);
4762 ++ return test_long_fname_2();
4763 + }
4764 +
4765 + SEC("dummy_tracepoint")
4766 +-int _dummy_tracepoint(struct dummy_tracepoint_args *arg)
4767 ++int _dummy_tracepoint(void *arg)
4768 + {
4769 +- return test_long_fname_1(arg);
4770 ++ return test_long_fname_1();
4771 + }
4772 +
4773 + char _license[] SEC("license") = "GPL";
4774 +diff --git a/tools/testing/selftests/bpf/progs/test_btf_nokv.c b/tools/testing/selftests/bpf/progs/test_btf_nokv.c
4775 +index 983aedd1c072..506da7fd2da2 100644
4776 +--- a/tools/testing/selftests/bpf/progs/test_btf_nokv.c
4777 ++++ b/tools/testing/selftests/bpf/progs/test_btf_nokv.c
4778 +@@ -17,20 +17,12 @@ struct bpf_map_def SEC("maps") btf_map = {
4779 + .max_entries = 4,
4780 + };
4781 +
4782 +-struct dummy_tracepoint_args {
4783 +- unsigned long long pad;
4784 +- struct sock *sock;
4785 +-};
4786 +-
4787 + __attribute__((noinline))
4788 +-int test_long_fname_2(struct dummy_tracepoint_args *arg)
4789 ++int test_long_fname_2(void)
4790 + {
4791 + struct ipv_counts *counts;
4792 + int key = 0;
4793 +
4794 +- if (!arg->sock)
4795 +- return 0;
4796 +-
4797 + counts = bpf_map_lookup_elem(&btf_map, &key);
4798 + if (!counts)
4799 + return 0;
4800 +@@ -41,15 +33,15 @@ int test_long_fname_2(struct dummy_tracepoint_args *arg)
4801 + }
4802 +
4803 + __attribute__((noinline))
4804 +-int test_long_fname_1(struct dummy_tracepoint_args *arg)
4805 ++int test_long_fname_1(void)
4806 + {
4807 +- return test_long_fname_2(arg);
4808 ++ return test_long_fname_2();
4809 + }
4810 +
4811 + SEC("dummy_tracepoint")
4812 +-int _dummy_tracepoint(struct dummy_tracepoint_args *arg)
4813 ++int _dummy_tracepoint(void *arg)
4814 + {
4815 +- return test_long_fname_1(arg);
4816 ++ return test_long_fname_1();
4817 + }
4818 +
4819 + char _license[] SEC("license") = "GPL";
4820 +diff --git a/tools/testing/selftests/bpf/test_btf.c b/tools/testing/selftests/bpf/test_btf.c
4821 +index 8da77cda5f4a..305fae8f80a9 100644
4822 +--- a/tools/testing/selftests/bpf/test_btf.c
4823 ++++ b/tools/testing/selftests/bpf/test_btf.c
4824 +@@ -2854,7 +2854,7 @@ static struct btf_raw_test raw_tests[] = {
4825 + .value_type_id = 1,
4826 + .max_entries = 4,
4827 + .btf_load_err = true,
4828 +- .err_str = "vlen != 0",
4829 ++ .err_str = "Invalid func linkage",
4830 + },
4831 +
4832 + {
4833 +diff --git a/tools/testing/selftests/bpf/verifier/value_illegal_alu.c b/tools/testing/selftests/bpf/verifier/value_illegal_alu.c
4834 +index 7f6c232cd842..ed1c2cea1dea 100644
4835 +--- a/tools/testing/selftests/bpf/verifier/value_illegal_alu.c
4836 ++++ b/tools/testing/selftests/bpf/verifier/value_illegal_alu.c
4837 +@@ -88,6 +88,7 @@
4838 + BPF_EXIT_INSN(),
4839 + },
4840 + .fixup_map_hash_48b = { 3 },
4841 ++ .errstr_unpriv = "leaking pointer from stack off -8",
4842 + .errstr = "R0 invalid mem access 'inv'",
4843 + .result = REJECT,
4844 + .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,