Magellan Linux

Annotation of /trunk/kernel-alx/patches-5.4/0220-5.4.121-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3635 - (hide annotations) (download)
Mon Oct 24 12:34:12 2022 UTC (19 months, 1 week ago) by niro
File size: 53500 byte(s)
-sync kernel patches
1 niro 3635 diff --git a/Documentation/sphinx/parse-headers.pl b/Documentation/sphinx/parse-headers.pl
2     index c518050ffc3fb..0dcf369ab9040 100755
3     --- a/Documentation/sphinx/parse-headers.pl
4     +++ b/Documentation/sphinx/parse-headers.pl
5     @@ -1,4 +1,4 @@
6     -#!/usr/bin/perl
7     +#!/usr/bin/env perl
8     use strict;
9     use Text::Tabs;
10     use Getopt::Long;
11     diff --git a/Documentation/target/tcm_mod_builder.py b/Documentation/target/tcm_mod_builder.py
12     index 95d6e31f1e3a1..85e496086d6ec 100755
13     --- a/Documentation/target/tcm_mod_builder.py
14     +++ b/Documentation/target/tcm_mod_builder.py
15     @@ -1,4 +1,4 @@
16     -#!/usr/bin/python
17     +#!/usr/bin/env python
18     # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD
19     #
20     # Copyright (c) 2010 Rising Tide Systems
21     diff --git a/Documentation/trace/postprocess/decode_msr.py b/Documentation/trace/postprocess/decode_msr.py
22     index 0ab40e0db5809..aa9cc7abd5c2b 100644
23     --- a/Documentation/trace/postprocess/decode_msr.py
24     +++ b/Documentation/trace/postprocess/decode_msr.py
25     @@ -1,4 +1,4 @@
26     -#!/usr/bin/python
27     +#!/usr/bin/env python
28     # add symbolic names to read_msr / write_msr in trace
29     # decode_msr msr-index.h < trace
30     import sys
31     diff --git a/Documentation/trace/postprocess/trace-pagealloc-postprocess.pl b/Documentation/trace/postprocess/trace-pagealloc-postprocess.pl
32     index 0a120aae33ce5..b9b7d80c2f9d2 100644
33     --- a/Documentation/trace/postprocess/trace-pagealloc-postprocess.pl
34     +++ b/Documentation/trace/postprocess/trace-pagealloc-postprocess.pl
35     @@ -1,4 +1,4 @@
36     -#!/usr/bin/perl
37     +#!/usr/bin/env perl
38     # This is a POC (proof of concept or piece of crap, take your pick) for reading the
39     # text representation of trace output related to page allocation. It makes an attempt
40     # to extract some high-level information on what is going on. The accuracy of the parser
41     diff --git a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl
42     index 995da15b16cab..2f4e39875fb39 100644
43     --- a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl
44     +++ b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl
45     @@ -1,4 +1,4 @@
46     -#!/usr/bin/perl
47     +#!/usr/bin/env perl
48     # This is a POC for reading the text representation of trace output related to
49     # page reclaim. It makes an attempt to extract some high-level information on
50     # what is going on. The accuracy of the parser may vary
51     diff --git a/Makefile b/Makefile
52     index 8b116f6fdcfc2..18b4cebe55642 100644
53     --- a/Makefile
54     +++ b/Makefile
55     @@ -1,7 +1,7 @@
56     # SPDX-License-Identifier: GPL-2.0
57     VERSION = 5
58     PATCHLEVEL = 4
59     -SUBLEVEL = 120
60     +SUBLEVEL = 121
61     EXTRAVERSION =
62     NAME = Kleptomaniac Octopus
63    
64     diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h
65     index dd03d5e01a946..32564b017ba06 100644
66     --- a/arch/arm/include/asm/kvm_host.h
67     +++ b/arch/arm/include/asm/kvm_host.h
68     @@ -335,6 +335,7 @@ static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {}
69     static inline void kvm_arch_vcpu_block_finish(struct kvm_vcpu *vcpu) {}
70    
71     static inline void kvm_arm_init_debug(void) {}
72     +static inline void kvm_arm_vcpu_init_debug(struct kvm_vcpu *vcpu) {}
73     static inline void kvm_arm_setup_debug(struct kvm_vcpu *vcpu) {}
74     static inline void kvm_arm_clear_debug(struct kvm_vcpu *vcpu) {}
75     static inline void kvm_arm_reset_debug_ptr(struct kvm_vcpu *vcpu) {}
76     diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c
77     index bfb05c93494db..4ce2e29da14de 100644
78     --- a/arch/arm/kernel/asm-offsets.c
79     +++ b/arch/arm/kernel/asm-offsets.c
80     @@ -27,6 +27,7 @@
81     #include <asm/vdso_datapage.h>
82     #include <asm/hardware/cache-l2x0.h>
83     #include <linux/kbuild.h>
84     +#include <linux/arm-smccc.h>
85     #include "signal.h"
86    
87     /*
88     @@ -160,6 +161,8 @@ int main(void)
89     DEFINE(SLEEP_SAVE_SP_PHYS, offsetof(struct sleep_save_sp, save_ptr_stash_phys));
90     DEFINE(SLEEP_SAVE_SP_VIRT, offsetof(struct sleep_save_sp, save_ptr_stash));
91     #endif
92     + DEFINE(ARM_SMCCC_QUIRK_ID_OFFS, offsetof(struct arm_smccc_quirk, id));
93     + DEFINE(ARM_SMCCC_QUIRK_STATE_OFFS, offsetof(struct arm_smccc_quirk, state));
94     BLANK();
95     DEFINE(DMA_BIDIRECTIONAL, DMA_BIDIRECTIONAL);
96     DEFINE(DMA_TO_DEVICE, DMA_TO_DEVICE);
97     diff --git a/arch/arm/kernel/smccc-call.S b/arch/arm/kernel/smccc-call.S
98     index 00664c78facab..931df62a78312 100644
99     --- a/arch/arm/kernel/smccc-call.S
100     +++ b/arch/arm/kernel/smccc-call.S
101     @@ -3,7 +3,9 @@
102     * Copyright (c) 2015, Linaro Limited
103     */
104     #include <linux/linkage.h>
105     +#include <linux/arm-smccc.h>
106    
107     +#include <asm/asm-offsets.h>
108     #include <asm/opcodes-sec.h>
109     #include <asm/opcodes-virt.h>
110     #include <asm/unwind.h>
111     @@ -27,7 +29,14 @@ UNWIND( .fnstart)
112     UNWIND( .save {r4-r7})
113     ldm r12, {r4-r7}
114     \instr
115     - pop {r4-r7}
116     + ldr r4, [sp, #36]
117     + cmp r4, #0
118     + beq 1f // No quirk structure
119     + ldr r5, [r4, #ARM_SMCCC_QUIRK_ID_OFFS]
120     + cmp r5, #ARM_SMCCC_QUIRK_QCOM_A6
121     + bne 1f // No quirk present
122     + str r6, [r4, #ARM_SMCCC_QUIRK_STATE_OFFS]
123     +1: pop {r4-r7}
124     ldr r12, [sp, #(4 * 4)]
125     stm r12, {r0-r3}
126     bx lr
127     diff --git a/arch/arm/kernel/suspend.c b/arch/arm/kernel/suspend.c
128     index d08099269e35b..e126386fb78a8 100644
129     --- a/arch/arm/kernel/suspend.c
130     +++ b/arch/arm/kernel/suspend.c
131     @@ -1,4 +1,5 @@
132     // SPDX-License-Identifier: GPL-2.0
133     +#include <linux/ftrace.h>
134     #include <linux/init.h>
135     #include <linux/slab.h>
136     #include <linux/mm_types.h>
137     @@ -26,6 +27,13 @@ int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
138     if (!idmap_pgd)
139     return -EINVAL;
140    
141     + /*
142     + * Function graph tracer state gets incosistent when the kernel
143     + * calls functions that never return (aka suspend finishers) hence
144     + * disable graph tracing during their execution.
145     + */
146     + pause_graph_tracing();
147     +
148     /*
149     * Provide a temporary page table with an identity mapping for
150     * the MMU-enable code, required for resuming. On successful
151     @@ -33,6 +41,9 @@ int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
152     * back to the correct page tables.
153     */
154     ret = __cpu_suspend(arg, fn, __mpidr);
155     +
156     + unpause_graph_tracing();
157     +
158     if (ret == 0) {
159     cpu_switch_mm(mm->pgd, mm);
160     local_flush_bp_all();
161     @@ -46,7 +57,13 @@ int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
162     int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
163     {
164     u32 __mpidr = cpu_logical_map(smp_processor_id());
165     - return __cpu_suspend(arg, fn, __mpidr);
166     + int ret;
167     +
168     + pause_graph_tracing();
169     + ret = __cpu_suspend(arg, fn, __mpidr);
170     + unpause_graph_tracing();
171     +
172     + return ret;
173     }
174     #define idmap_pgd NULL
175     #endif
176     diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
177     index dfa6dc4575bec..697702a1a1ff1 100644
178     --- a/arch/arm64/include/asm/kvm_host.h
179     +++ b/arch/arm64/include/asm/kvm_host.h
180     @@ -552,6 +552,7 @@ static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {}
181     static inline void kvm_arch_vcpu_block_finish(struct kvm_vcpu *vcpu) {}
182    
183     void kvm_arm_init_debug(void);
184     +void kvm_arm_vcpu_init_debug(struct kvm_vcpu *vcpu);
185     void kvm_arm_setup_debug(struct kvm_vcpu *vcpu);
186     void kvm_arm_clear_debug(struct kvm_vcpu *vcpu);
187     void kvm_arm_reset_debug_ptr(struct kvm_vcpu *vcpu);
188     diff --git a/arch/arm64/kvm/debug.c b/arch/arm64/kvm/debug.c
189     index dbc8905116311..2484b2cca74bc 100644
190     --- a/arch/arm64/kvm/debug.c
191     +++ b/arch/arm64/kvm/debug.c
192     @@ -68,6 +68,64 @@ void kvm_arm_init_debug(void)
193     __this_cpu_write(mdcr_el2, kvm_call_hyp_ret(__kvm_get_mdcr_el2));
194     }
195    
196     +/**
197     + * kvm_arm_setup_mdcr_el2 - configure vcpu mdcr_el2 value
198     + *
199     + * @vcpu: the vcpu pointer
200     + *
201     + * This ensures we will trap access to:
202     + * - Performance monitors (MDCR_EL2_TPM/MDCR_EL2_TPMCR)
203     + * - Debug ROM Address (MDCR_EL2_TDRA)
204     + * - OS related registers (MDCR_EL2_TDOSA)
205     + * - Statistical profiler (MDCR_EL2_TPMS/MDCR_EL2_E2PB)
206     + * - Self-hosted Trace Filter controls (MDCR_EL2_TTRF)
207     + */
208     +static void kvm_arm_setup_mdcr_el2(struct kvm_vcpu *vcpu)
209     +{
210     + /*
211     + * This also clears MDCR_EL2_E2PB_MASK to disable guest access
212     + * to the profiling buffer.
213     + */
214     + vcpu->arch.mdcr_el2 = __this_cpu_read(mdcr_el2) & MDCR_EL2_HPMN_MASK;
215     + vcpu->arch.mdcr_el2 |= (MDCR_EL2_TPM |
216     + MDCR_EL2_TPMS |
217     + MDCR_EL2_TTRF |
218     + MDCR_EL2_TPMCR |
219     + MDCR_EL2_TDRA |
220     + MDCR_EL2_TDOSA);
221     +
222     + /* Is the VM being debugged by userspace? */
223     + if (vcpu->guest_debug)
224     + /* Route all software debug exceptions to EL2 */
225     + vcpu->arch.mdcr_el2 |= MDCR_EL2_TDE;
226     +
227     + /*
228     + * Trap debug register access when one of the following is true:
229     + * - Userspace is using the hardware to debug the guest
230     + * (KVM_GUESTDBG_USE_HW is set).
231     + * - The guest is not using debug (KVM_ARM64_DEBUG_DIRTY is clear).
232     + */
233     + if ((vcpu->guest_debug & KVM_GUESTDBG_USE_HW) ||
234     + !(vcpu->arch.flags & KVM_ARM64_DEBUG_DIRTY))
235     + vcpu->arch.mdcr_el2 |= MDCR_EL2_TDA;
236     +
237     + trace_kvm_arm_set_dreg32("MDCR_EL2", vcpu->arch.mdcr_el2);
238     +}
239     +
240     +/**
241     + * kvm_arm_vcpu_init_debug - setup vcpu debug traps
242     + *
243     + * @vcpu: the vcpu pointer
244     + *
245     + * Set vcpu initial mdcr_el2 value.
246     + */
247     +void kvm_arm_vcpu_init_debug(struct kvm_vcpu *vcpu)
248     +{
249     + preempt_disable();
250     + kvm_arm_setup_mdcr_el2(vcpu);
251     + preempt_enable();
252     +}
253     +
254     /**
255     * kvm_arm_reset_debug_ptr - reset the debug ptr to point to the vcpu state
256     */
257     @@ -83,13 +141,7 @@ void kvm_arm_reset_debug_ptr(struct kvm_vcpu *vcpu)
258     * @vcpu: the vcpu pointer
259     *
260     * This is called before each entry into the hypervisor to setup any
261     - * debug related registers. Currently this just ensures we will trap
262     - * access to:
263     - * - Performance monitors (MDCR_EL2_TPM/MDCR_EL2_TPMCR)
264     - * - Debug ROM Address (MDCR_EL2_TDRA)
265     - * - OS related registers (MDCR_EL2_TDOSA)
266     - * - Statistical profiler (MDCR_EL2_TPMS/MDCR_EL2_E2PB)
267     - * - Self-hosted Trace Filter controls (MDCR_EL2_TTRF)
268     + * debug related registers.
269     *
270     * Additionally, KVM only traps guest accesses to the debug registers if
271     * the guest is not actively using them (see the KVM_ARM64_DEBUG_DIRTY
272     @@ -101,28 +153,14 @@ void kvm_arm_reset_debug_ptr(struct kvm_vcpu *vcpu)
273    
274     void kvm_arm_setup_debug(struct kvm_vcpu *vcpu)
275     {
276     - bool trap_debug = !(vcpu->arch.flags & KVM_ARM64_DEBUG_DIRTY);
277     unsigned long mdscr, orig_mdcr_el2 = vcpu->arch.mdcr_el2;
278    
279     trace_kvm_arm_setup_debug(vcpu, vcpu->guest_debug);
280    
281     - /*
282     - * This also clears MDCR_EL2_E2PB_MASK to disable guest access
283     - * to the profiling buffer.
284     - */
285     - vcpu->arch.mdcr_el2 = __this_cpu_read(mdcr_el2) & MDCR_EL2_HPMN_MASK;
286     - vcpu->arch.mdcr_el2 |= (MDCR_EL2_TPM |
287     - MDCR_EL2_TPMS |
288     - MDCR_EL2_TTRF |
289     - MDCR_EL2_TPMCR |
290     - MDCR_EL2_TDRA |
291     - MDCR_EL2_TDOSA);
292     + kvm_arm_setup_mdcr_el2(vcpu);
293    
294     /* Is Guest debugging in effect? */
295     if (vcpu->guest_debug) {
296     - /* Route all software debug exceptions to EL2 */
297     - vcpu->arch.mdcr_el2 |= MDCR_EL2_TDE;
298     -
299     /* Save guest debug state */
300     save_guest_debug_regs(vcpu);
301    
302     @@ -176,7 +214,6 @@ void kvm_arm_setup_debug(struct kvm_vcpu *vcpu)
303    
304     vcpu->arch.debug_ptr = &vcpu->arch.external_debug_state;
305     vcpu->arch.flags |= KVM_ARM64_DEBUG_DIRTY;
306     - trap_debug = true;
307    
308     trace_kvm_arm_set_regset("BKPTS", get_num_brps(),
309     &vcpu->arch.debug_ptr->dbg_bcr[0],
310     @@ -191,10 +228,6 @@ void kvm_arm_setup_debug(struct kvm_vcpu *vcpu)
311     BUG_ON(!vcpu->guest_debug &&
312     vcpu->arch.debug_ptr != &vcpu->arch.vcpu_debug_state);
313    
314     - /* Trap debug register access */
315     - if (trap_debug)
316     - vcpu->arch.mdcr_el2 |= MDCR_EL2_TDA;
317     -
318     /* If KDE or MDE are set, perform a full save/restore cycle. */
319     if (vcpu_read_sys_reg(vcpu, MDSCR_EL1) & (DBG_MDSCR_KDE | DBG_MDSCR_MDE))
320     vcpu->arch.flags |= KVM_ARM64_DEBUG_DIRTY;
321     @@ -203,7 +236,6 @@ void kvm_arm_setup_debug(struct kvm_vcpu *vcpu)
322     if (has_vhe() && orig_mdcr_el2 != vcpu->arch.mdcr_el2)
323     write_sysreg(vcpu->arch.mdcr_el2, mdcr_el2);
324    
325     - trace_kvm_arm_set_dreg32("MDCR_EL2", vcpu->arch.mdcr_el2);
326     trace_kvm_arm_set_dreg32("MDSCR_EL1", vcpu_read_sys_reg(vcpu, MDSCR_EL1));
327     }
328    
329     diff --git a/arch/ia64/scripts/unwcheck.py b/arch/ia64/scripts/unwcheck.py
330     index c55276e31b6b6..bfd1b671e35fc 100644
331     --- a/arch/ia64/scripts/unwcheck.py
332     +++ b/arch/ia64/scripts/unwcheck.py
333     @@ -1,4 +1,4 @@
334     -#!/usr/bin/python
335     +#!/usr/bin/env python
336     # SPDX-License-Identifier: GPL-2.0
337     #
338     # Usage: unwcheck.py FILE
339     diff --git a/arch/riscv/include/asm/ftrace.h b/arch/riscv/include/asm/ftrace.h
340     index 02fbc175142e2..693c3839a7dfe 100644
341     --- a/arch/riscv/include/asm/ftrace.h
342     +++ b/arch/riscv/include/asm/ftrace.h
343     @@ -10,9 +10,19 @@
344     #endif
345     #define HAVE_FUNCTION_GRAPH_RET_ADDR_PTR
346    
347     +/*
348     + * Clang prior to 13 had "mcount" instead of "_mcount":
349     + * https://reviews.llvm.org/D98881
350     + */
351     +#if defined(CONFIG_CC_IS_GCC) || CONFIG_CLANG_VERSION >= 130000
352     +#define MCOUNT_NAME _mcount
353     +#else
354     +#define MCOUNT_NAME mcount
355     +#endif
356     +
357     #define ARCH_SUPPORTS_FTRACE_OPS 1
358     #ifndef __ASSEMBLY__
359     -void _mcount(void);
360     +void MCOUNT_NAME(void);
361     static inline unsigned long ftrace_call_adjust(unsigned long addr)
362     {
363     return addr;
364     @@ -33,7 +43,7 @@ struct dyn_arch_ftrace {
365     * both auipc and jalr at the same time.
366     */
367    
368     -#define MCOUNT_ADDR ((unsigned long)_mcount)
369     +#define MCOUNT_ADDR ((unsigned long)MCOUNT_NAME)
370     #define JALR_SIGN_MASK (0x00000800)
371     #define JALR_OFFSET_MASK (0x00000fff)
372     #define AUIPC_OFFSET_MASK (0xfffff000)
373     diff --git a/arch/riscv/kernel/mcount.S b/arch/riscv/kernel/mcount.S
374     index 8a5593ff9ff3d..6d462681c9c02 100644
375     --- a/arch/riscv/kernel/mcount.S
376     +++ b/arch/riscv/kernel/mcount.S
377     @@ -47,8 +47,8 @@
378    
379     ENTRY(ftrace_stub)
380     #ifdef CONFIG_DYNAMIC_FTRACE
381     - .global _mcount
382     - .set _mcount, ftrace_stub
383     + .global MCOUNT_NAME
384     + .set MCOUNT_NAME, ftrace_stub
385     #endif
386     ret
387     ENDPROC(ftrace_stub)
388     @@ -78,7 +78,7 @@ ENDPROC(return_to_handler)
389     #endif
390    
391     #ifndef CONFIG_DYNAMIC_FTRACE
392     -ENTRY(_mcount)
393     +ENTRY(MCOUNT_NAME)
394     la t4, ftrace_stub
395     #ifdef CONFIG_FUNCTION_GRAPH_TRACER
396     la t0, ftrace_graph_return
397     @@ -124,6 +124,6 @@ do_trace:
398     jalr t5
399     RESTORE_ABI_STATE
400     ret
401     -ENDPROC(_mcount)
402     +ENDPROC(MCOUNT_NAME)
403     #endif
404     -EXPORT_SYMBOL(_mcount)
405     +EXPORT_SYMBOL(MCOUNT_NAME)
406     diff --git a/arch/um/Kconfig.debug b/arch/um/Kconfig.debug
407     index 85726eeec3451..e4a0f12f20d97 100644
408     --- a/arch/um/Kconfig.debug
409     +++ b/arch/um/Kconfig.debug
410     @@ -17,6 +17,7 @@ config GCOV
411     bool "Enable gcov support"
412     depends on DEBUG_INFO
413     depends on !KCOV
414     + depends on !MODULES
415     help
416     This option allows developers to retrieve coverage data from a UML
417     session.
418     diff --git a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile
419     index 5aa882011e041..e698e0c7dbdca 100644
420     --- a/arch/um/kernel/Makefile
421     +++ b/arch/um/kernel/Makefile
422     @@ -21,7 +21,6 @@ obj-y = config.o exec.o exitcode.o irq.o ksyms.o mem.o \
423    
424     obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o
425     obj-$(CONFIG_GPROF) += gprof_syms.o
426     -obj-$(CONFIG_GCOV) += gmon_syms.o
427     obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
428     obj-$(CONFIG_STACKTRACE) += stacktrace.o
429    
430     diff --git a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S
431     index f5001481010c0..a82ec01133212 100644
432     --- a/arch/um/kernel/dyn.lds.S
433     +++ b/arch/um/kernel/dyn.lds.S
434     @@ -6,6 +6,12 @@ OUTPUT_ARCH(ELF_ARCH)
435     ENTRY(_start)
436     jiffies = jiffies_64;
437    
438     +VERSION {
439     + {
440     + local: *;
441     + };
442     +}
443     +
444     SECTIONS
445     {
446     PROVIDE (__executable_start = START);
447     diff --git a/arch/um/kernel/gmon_syms.c b/arch/um/kernel/gmon_syms.c
448     deleted file mode 100644
449     index 9361a8eb9bf1a..0000000000000
450     --- a/arch/um/kernel/gmon_syms.c
451     +++ /dev/null
452     @@ -1,16 +0,0 @@
453     -// SPDX-License-Identifier: GPL-2.0
454     -/*
455     - * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
456     - */
457     -
458     -#include <linux/module.h>
459     -
460     -extern void __bb_init_func(void *) __attribute__((weak));
461     -EXPORT_SYMBOL(__bb_init_func);
462     -
463     -extern void __gcov_init(void *) __attribute__((weak));
464     -EXPORT_SYMBOL(__gcov_init);
465     -extern void __gcov_merge_add(void *, unsigned int) __attribute__((weak));
466     -EXPORT_SYMBOL(__gcov_merge_add);
467     -extern void __gcov_exit(void) __attribute__((weak));
468     -EXPORT_SYMBOL(__gcov_exit);
469     diff --git a/arch/um/kernel/uml.lds.S b/arch/um/kernel/uml.lds.S
470     index 9f21443be2c9e..85b404d068f4b 100644
471     --- a/arch/um/kernel/uml.lds.S
472     +++ b/arch/um/kernel/uml.lds.S
473     @@ -7,6 +7,12 @@ OUTPUT_ARCH(ELF_ARCH)
474     ENTRY(_start)
475     jiffies = jiffies_64;
476    
477     +VERSION {
478     + {
479     + local: *;
480     + };
481     +}
482     +
483     SECTIONS
484     {
485     /* This must contain the right address - not quite the default ELF one.*/
486     diff --git a/arch/x86/lib/msr-smp.c b/arch/x86/lib/msr-smp.c
487     index fee8b9c0520c9..9009393f44c78 100644
488     --- a/arch/x86/lib/msr-smp.c
489     +++ b/arch/x86/lib/msr-smp.c
490     @@ -253,7 +253,7 @@ static void __wrmsr_safe_regs_on_cpu(void *info)
491     rv->err = wrmsr_safe_regs(rv->regs);
492     }
493    
494     -int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 *regs)
495     +int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8])
496     {
497     int err;
498     struct msr_regs_info rv;
499     @@ -266,7 +266,7 @@ int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 *regs)
500     }
501     EXPORT_SYMBOL(rdmsr_safe_regs_on_cpu);
502    
503     -int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 *regs)
504     +int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8])
505     {
506     int err;
507     struct msr_regs_info rv;
508     diff --git a/drivers/dma/dw-edma/dw-edma-core.c b/drivers/dma/dw-edma/dw-edma-core.c
509     index 31577316f80bc..afbd1a4590192 100644
510     --- a/drivers/dma/dw-edma/dw-edma-core.c
511     +++ b/drivers/dma/dw-edma/dw-edma-core.c
512     @@ -910,22 +910,21 @@ int dw_edma_remove(struct dw_edma_chip *chip)
513     /* Power management */
514     pm_runtime_disable(dev);
515    
516     + /* Deregister eDMA device */
517     + dma_async_device_unregister(&dw->wr_edma);
518     list_for_each_entry_safe(chan, _chan, &dw->wr_edma.channels,
519     vc.chan.device_node) {
520     - list_del(&chan->vc.chan.device_node);
521     tasklet_kill(&chan->vc.task);
522     + list_del(&chan->vc.chan.device_node);
523     }
524    
525     + dma_async_device_unregister(&dw->rd_edma);
526     list_for_each_entry_safe(chan, _chan, &dw->rd_edma.channels,
527     vc.chan.device_node) {
528     - list_del(&chan->vc.chan.device_node);
529     tasklet_kill(&chan->vc.task);
530     + list_del(&chan->vc.chan.device_node);
531     }
532    
533     - /* Deregister eDMA device */
534     - dma_async_device_unregister(&dw->wr_edma);
535     - dma_async_device_unregister(&dw->rd_edma);
536     -
537     /* Turn debugfs off */
538     dw_edma_v0_core_debugfs_off();
539    
540     diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
541     index 66dcab6ab26dd..e3ddc99c105d4 100644
542     --- a/drivers/gpio/gpiolib-acpi.c
543     +++ b/drivers/gpio/gpiolib-acpi.c
544     @@ -1394,6 +1394,20 @@ static const struct dmi_system_id gpiolib_acpi_quirks[] = {
545     .no_edge_events_on_boot = true,
546     },
547     },
548     + {
549     + /*
550     + * The Dell Venue 10 Pro 5055, with Bay Trail SoC + TI PMIC uses an
551     + * external embedded-controller connected via I2C + an ACPI GPIO
552     + * event handler on INT33FFC:02 pin 12, causing spurious wakeups.
553     + */
554     + .matches = {
555     + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
556     + DMI_MATCH(DMI_PRODUCT_NAME, "Venue 10 Pro 5055"),
557     + },
558     + .driver_data = &(struct acpi_gpiolib_dmi_quirk) {
559     + .ignore_wake = "INT33FC:02@12",
560     + },
561     + },
562     {
563     /*
564     * HP X2 10 models with Cherry Trail SoC + TI PMIC use an
565     diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
566     index 82f1d5434b82d..6e31e899192c5 100644
567     --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
568     +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
569     @@ -7267,6 +7267,53 @@ static int add_affected_mst_dsc_crtcs(struct drm_atomic_state *state, struct drm
570     }
571     #endif
572    
573     +static int validate_overlay(struct drm_atomic_state *state)
574     +{
575     + int i;
576     + struct drm_plane *plane;
577     + struct drm_plane_state *old_plane_state, *new_plane_state;
578     + struct drm_plane_state *primary_state, *overlay_state = NULL;
579     +
580     + /* Check if primary plane is contained inside overlay */
581     + for_each_oldnew_plane_in_state_reverse(state, plane, old_plane_state, new_plane_state, i) {
582     + if (plane->type == DRM_PLANE_TYPE_OVERLAY) {
583     + if (drm_atomic_plane_disabling(plane->state, new_plane_state))
584     + return 0;
585     +
586     + overlay_state = new_plane_state;
587     + continue;
588     + }
589     + }
590     +
591     + /* check if we're making changes to the overlay plane */
592     + if (!overlay_state)
593     + return 0;
594     +
595     + /* check if overlay plane is enabled */
596     + if (!overlay_state->crtc)
597     + return 0;
598     +
599     + /* find the primary plane for the CRTC that the overlay is enabled on */
600     + primary_state = drm_atomic_get_plane_state(state, overlay_state->crtc->primary);
601     + if (IS_ERR(primary_state))
602     + return PTR_ERR(primary_state);
603     +
604     + /* check if primary plane is enabled */
605     + if (!primary_state->crtc)
606     + return 0;
607     +
608     + /* Perform the bounds check to ensure the overlay plane covers the primary */
609     + if (primary_state->crtc_x < overlay_state->crtc_x ||
610     + primary_state->crtc_y < overlay_state->crtc_y ||
611     + primary_state->crtc_x + primary_state->crtc_w > overlay_state->crtc_x + overlay_state->crtc_w ||
612     + primary_state->crtc_y + primary_state->crtc_h > overlay_state->crtc_y + overlay_state->crtc_h) {
613     + DRM_DEBUG_ATOMIC("Overlay plane is enabled with hardware cursor but does not fully cover primary plane\n");
614     + return -EINVAL;
615     + }
616     +
617     + return 0;
618     +}
619     +
620     /**
621     * amdgpu_dm_atomic_check() - Atomic check implementation for AMDgpu DM.
622     * @dev: The DRM device
623     @@ -7440,6 +7487,10 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
624     goto fail;
625     }
626    
627     + ret = validate_overlay(state);
628     + if (ret)
629     + goto fail;
630     +
631     /* Add new/modified planes */
632     for_each_oldnew_plane_in_state_reverse(state, plane, old_plane_state, new_plane_state, i) {
633     ret = dm_update_plane_state(dc, state, plane,
634     diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c
635     index d4ad24ea54c8c..a51e7c85f5819 100644
636     --- a/drivers/input/touchscreen/elants_i2c.c
637     +++ b/drivers/input/touchscreen/elants_i2c.c
638     @@ -36,6 +36,7 @@
639     #include <linux/of.h>
640     #include <linux/gpio/consumer.h>
641     #include <linux/regulator/consumer.h>
642     +#include <linux/uuid.h>
643     #include <asm/unaligned.h>
644    
645     /* Device, Driver information */
646     @@ -1127,6 +1128,40 @@ static void elants_i2c_power_off(void *_data)
647     }
648     }
649    
650     +#ifdef CONFIG_ACPI
651     +static const struct acpi_device_id i2c_hid_ids[] = {
652     + {"ACPI0C50", 0 },
653     + {"PNP0C50", 0 },
654     + { },
655     +};
656     +
657     +static const guid_t i2c_hid_guid =
658     + GUID_INIT(0x3CDFF6F7, 0x4267, 0x4555,
659     + 0xAD, 0x05, 0xB3, 0x0A, 0x3D, 0x89, 0x38, 0xDE);
660     +
661     +static bool elants_acpi_is_hid_device(struct device *dev)
662     +{
663     + acpi_handle handle = ACPI_HANDLE(dev);
664     + union acpi_object *obj;
665     +
666     + if (acpi_match_device_ids(ACPI_COMPANION(dev), i2c_hid_ids))
667     + return false;
668     +
669     + obj = acpi_evaluate_dsm_typed(handle, &i2c_hid_guid, 1, 1, NULL, ACPI_TYPE_INTEGER);
670     + if (obj) {
671     + ACPI_FREE(obj);
672     + return true;
673     + }
674     +
675     + return false;
676     +}
677     +#else
678     +static bool elants_acpi_is_hid_device(struct device *dev)
679     +{
680     + return false;
681     +}
682     +#endif
683     +
684     static int elants_i2c_probe(struct i2c_client *client,
685     const struct i2c_device_id *id)
686     {
687     @@ -1135,9 +1170,14 @@ static int elants_i2c_probe(struct i2c_client *client,
688     unsigned long irqflags;
689     int error;
690    
691     + /* Don't bind to i2c-hid compatible devices, these are handled by the i2c-hid drv. */
692     + if (elants_acpi_is_hid_device(&client->dev)) {
693     + dev_warn(&client->dev, "This device appears to be an I2C-HID device, not binding\n");
694     + return -ENODEV;
695     + }
696     +
697     if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
698     - dev_err(&client->dev,
699     - "%s: i2c check functionality error\n", DEVICE_NAME);
700     + dev_err(&client->dev, "I2C check functionality error\n");
701     return -ENXIO;
702     }
703    
704     diff --git a/drivers/input/touchscreen/silead.c b/drivers/input/touchscreen/silead.c
705     index ad8b6a2bfd364..c8776146f1d1b 100644
706     --- a/drivers/input/touchscreen/silead.c
707     +++ b/drivers/input/touchscreen/silead.c
708     @@ -20,6 +20,7 @@
709     #include <linux/input/mt.h>
710     #include <linux/input/touchscreen.h>
711     #include <linux/pm.h>
712     +#include <linux/pm_runtime.h>
713     #include <linux/irq.h>
714     #include <linux/regulator/consumer.h>
715    
716     @@ -335,10 +336,8 @@ static int silead_ts_get_id(struct i2c_client *client)
717    
718     error = i2c_smbus_read_i2c_block_data(client, SILEAD_REG_ID,
719     sizeof(chip_id), (u8 *)&chip_id);
720     - if (error < 0) {
721     - dev_err(&client->dev, "Chip ID read error %d\n", error);
722     + if (error < 0)
723     return error;
724     - }
725    
726     data->chip_id = le32_to_cpu(chip_id);
727     dev_info(&client->dev, "Silead chip ID: 0x%8X", data->chip_id);
728     @@ -351,12 +350,49 @@ static int silead_ts_setup(struct i2c_client *client)
729     int error;
730     u32 status;
731    
732     + /*
733     + * Some buggy BIOS-es bring up the chip in a stuck state where it
734     + * blocks the I2C bus. The following steps are necessary to
735     + * unstuck the chip / bus:
736     + * 1. Turn off the Silead chip.
737     + * 2. Try to do an I2C transfer with the chip, this will fail in
738     + * response to which the I2C-bus-driver will call:
739     + * i2c_recover_bus() which will unstuck the I2C-bus. Note the
740     + * unstuck-ing of the I2C bus only works if we first drop the
741     + * chip off the bus by turning it off.
742     + * 3. Turn the chip back on.
743     + *
744     + * On the x86/ACPI systems were this problem is seen, step 1. and
745     + * 3. require making ACPI calls and dealing with ACPI Power
746     + * Resources. The workaround below runtime-suspends the chip to
747     + * turn it off, leaving it up to the ACPI subsystem to deal with
748     + * this.
749     + */
750     +
751     + if (device_property_read_bool(&client->dev,
752     + "silead,stuck-controller-bug")) {
753     + pm_runtime_set_active(&client->dev);
754     + pm_runtime_enable(&client->dev);
755     + pm_runtime_allow(&client->dev);
756     +
757     + pm_runtime_suspend(&client->dev);
758     +
759     + dev_warn(&client->dev, FW_BUG "Stuck I2C bus: please ignore the next 'controller timed out' error\n");
760     + silead_ts_get_id(client);
761     +
762     + /* The forbid will also resume the device */
763     + pm_runtime_forbid(&client->dev);
764     + pm_runtime_disable(&client->dev);
765     + }
766     +
767     silead_ts_set_power(client, SILEAD_POWER_OFF);
768     silead_ts_set_power(client, SILEAD_POWER_ON);
769    
770     error = silead_ts_get_id(client);
771     - if (error)
772     + if (error) {
773     + dev_err(&client->dev, "Chip ID read error %d\n", error);
774     return error;
775     + }
776    
777     error = silead_ts_init(client);
778     if (error)
779     diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c
780     index a4ceb61c5b603..18de41a266ebe 100644
781     --- a/drivers/isdn/capi/kcapi.c
782     +++ b/drivers/isdn/capi/kcapi.c
783     @@ -846,7 +846,7 @@ EXPORT_SYMBOL(capi20_put_message);
784     * Return value: CAPI result code
785     */
786    
787     -u16 capi20_get_manufacturer(u32 contr, u8 *buf)
788     +u16 capi20_get_manufacturer(u32 contr, u8 buf[CAPI_MANUFACTURER_LEN])
789     {
790     struct capi_ctr *ctr;
791     u16 ret;
792     @@ -916,7 +916,7 @@ EXPORT_SYMBOL(capi20_get_version);
793     * Return value: CAPI result code
794     */
795    
796     -u16 capi20_get_serial(u32 contr, u8 *serial)
797     +u16 capi20_get_serial(u32 contr, u8 serial[CAPI_SERIAL_LEN])
798     {
799     struct capi_ctr *ctr;
800     u16 ret;
801     diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c
802     index bccd341e9ae16..5c183c02dfd92 100644
803     --- a/drivers/misc/kgdbts.c
804     +++ b/drivers/misc/kgdbts.c
805     @@ -95,19 +95,19 @@
806    
807     #include <asm/sections.h>
808    
809     -#define v1printk(a...) do { \
810     - if (verbose) \
811     - printk(KERN_INFO a); \
812     - } while (0)
813     -#define v2printk(a...) do { \
814     - if (verbose > 1) \
815     - printk(KERN_INFO a); \
816     - touch_nmi_watchdog(); \
817     - } while (0)
818     -#define eprintk(a...) do { \
819     - printk(KERN_ERR a); \
820     - WARN_ON(1); \
821     - } while (0)
822     +#define v1printk(a...) do { \
823     + if (verbose) \
824     + printk(KERN_INFO a); \
825     +} while (0)
826     +#define v2printk(a...) do { \
827     + if (verbose > 1) \
828     + printk(KERN_INFO a); \
829     + touch_nmi_watchdog(); \
830     +} while (0)
831     +#define eprintk(a...) do { \
832     + printk(KERN_ERR a); \
833     + WARN_ON(1); \
834     +} while (0)
835     #define MAX_CONFIG_LEN 40
836    
837     static struct kgdb_io kgdbts_io_ops;
838     diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
839     index 2ce96cc1bad48..66ca51279018a 100644
840     --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
841     +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
842     @@ -2690,7 +2690,7 @@ do { \
843     seq_printf(seq, "%-12s", s); \
844     for (i = 0; i < n; ++i) \
845     seq_printf(seq, " %16" fmt_spec, v); \
846     - seq_putc(seq, '\n'); \
847     + seq_putc(seq, '\n'); \
848     } while (0)
849     #define S(s, v) S3("s", s, v)
850     #define T3(fmt_spec, s, v) S3(fmt_spec, s, tx[i].v)
851     diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
852     index a41ac13cc4e55..0d993f4b701c2 100644
853     --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
854     +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c
855     @@ -211,7 +211,7 @@ static void dwmac4_dma_rx_chan_op_mode(void __iomem *ioaddr, int mode,
856     u32 channel, int fifosz, u8 qmode)
857     {
858     unsigned int rqs = fifosz / 256 - 1;
859     - u32 mtl_rx_op, mtl_rx_int;
860     + u32 mtl_rx_op;
861    
862     mtl_rx_op = readl(ioaddr + MTL_CHAN_RX_OP_MODE(channel));
863    
864     @@ -282,11 +282,6 @@ static void dwmac4_dma_rx_chan_op_mode(void __iomem *ioaddr, int mode,
865     }
866    
867     writel(mtl_rx_op, ioaddr + MTL_CHAN_RX_OP_MODE(channel));
868     -
869     - /* Enable MTL RX overflow */
870     - mtl_rx_int = readl(ioaddr + MTL_CHAN_INT_CTRL(channel));
871     - writel(mtl_rx_int | MTL_RX_OVERFLOW_INT_EN,
872     - ioaddr + MTL_CHAN_INT_CTRL(channel));
873     }
874    
875     static void dwmac4_dma_tx_chan_op_mode(void __iomem *ioaddr, int mode,
876     diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
877     index 8e7c60e02fa09..10d28be73f456 100644
878     --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
879     +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
880     @@ -3855,7 +3855,6 @@ static irqreturn_t stmmac_interrupt(int irq, void *dev_id)
881     /* To handle GMAC own interrupts */
882     if ((priv->plat->has_gmac) || xmac) {
883     int status = stmmac_host_irq_status(priv, priv->hw, &priv->xstats);
884     - int mtl_status;
885    
886     if (unlikely(status)) {
887     /* For LPI we need to save the tx status */
888     @@ -3866,17 +3865,8 @@ static irqreturn_t stmmac_interrupt(int irq, void *dev_id)
889     }
890    
891     for (queue = 0; queue < queues_count; queue++) {
892     - struct stmmac_rx_queue *rx_q = &priv->rx_queue[queue];
893     -
894     - mtl_status = stmmac_host_mtl_irq_status(priv, priv->hw,
895     - queue);
896     - if (mtl_status != -EINVAL)
897     - status |= mtl_status;
898     -
899     - if (status & CORE_IRQ_MTL_RX_OVERFLOW)
900     - stmmac_set_rx_tail_ptr(priv, priv->ioaddr,
901     - rx_q->rx_tail_addr,
902     - queue);
903     + status = stmmac_host_mtl_irq_status(priv, priv->hw,
904     + queue);
905     }
906    
907     /* PCS link status */
908     diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
909     index b67460864b3c2..d8ee001d8e8eb 100644
910     --- a/drivers/net/virtio_net.c
911     +++ b/drivers/net/virtio_net.c
912     @@ -406,9 +406,13 @@ static struct sk_buff *page_to_skb(struct virtnet_info *vi,
913     offset += hdr_padded_len;
914     p += hdr_padded_len;
915    
916     - copy = len;
917     - if (copy > skb_tailroom(skb))
918     - copy = skb_tailroom(skb);
919     + /* Copy all frame if it fits skb->head, otherwise
920     + * we let virtio_net_hdr_to_skb() and GRO pull headers as needed.
921     + */
922     + if (len <= skb_tailroom(skb))
923     + copy = len;
924     + else
925     + copy = ETH_HLEN + metasize;
926     skb_put_data(skb, p, copy);
927    
928     if (metasize) {
929     diff --git a/drivers/pci/controller/pci-thunder-ecam.c b/drivers/pci/controller/pci-thunder-ecam.c
930     index 32d1d7b81ef4e..18715d2ce0229 100644
931     --- a/drivers/pci/controller/pci-thunder-ecam.c
932     +++ b/drivers/pci/controller/pci-thunder-ecam.c
933     @@ -116,7 +116,7 @@ static int thunder_ecam_p2_config_read(struct pci_bus *bus, unsigned int devfn,
934     * the config space access window. Since we are working with
935     * the high-order 32 bits, shift everything down by 32 bits.
936     */
937     - node_bits = (cfg->res.start >> 32) & (1 << 12);
938     + node_bits = upper_32_bits(cfg->res.start) & (1 << 12);
939    
940     v |= node_bits;
941     set_val(v, where, size, val);
942     diff --git a/drivers/pci/controller/pci-thunder-pem.c b/drivers/pci/controller/pci-thunder-pem.c
943     index f127ce8bd4ef3..1650ec2c35f9a 100644
944     --- a/drivers/pci/controller/pci-thunder-pem.c
945     +++ b/drivers/pci/controller/pci-thunder-pem.c
946     @@ -11,6 +11,7 @@
947     #include <linux/pci-acpi.h>
948     #include <linux/pci-ecam.h>
949     #include <linux/platform_device.h>
950     +#include <linux/io-64-nonatomic-lo-hi.h>
951     #include "../pci.h"
952    
953     #if defined(CONFIG_PCI_HOST_THUNDER_PEM) || (defined(CONFIG_ACPI) && defined(CONFIG_PCI_QUIRKS))
954     @@ -314,9 +315,9 @@ static int thunder_pem_init(struct device *dev, struct pci_config_window *cfg,
955     * structure here for the BAR.
956     */
957     bar4_start = res_pem->start + 0xf00000;
958     - pem_pci->ea_entry[0] = (u32)bar4_start | 2;
959     - pem_pci->ea_entry[1] = (u32)(res_pem->end - bar4_start) & ~3u;
960     - pem_pci->ea_entry[2] = (u32)(bar4_start >> 32);
961     + pem_pci->ea_entry[0] = lower_32_bits(bar4_start) | 2;
962     + pem_pci->ea_entry[1] = lower_32_bits(res_pem->end - bar4_start) & ~3u;
963     + pem_pci->ea_entry[2] = upper_32_bits(bar4_start);
964    
965     cfg->priv = pem_pci;
966     return 0;
967     @@ -324,9 +325,9 @@ static int thunder_pem_init(struct device *dev, struct pci_config_window *cfg,
968    
969     #if defined(CONFIG_ACPI) && defined(CONFIG_PCI_QUIRKS)
970    
971     -#define PEM_RES_BASE 0x87e0c0000000UL
972     -#define PEM_NODE_MASK GENMASK(45, 44)
973     -#define PEM_INDX_MASK GENMASK(26, 24)
974     +#define PEM_RES_BASE 0x87e0c0000000ULL
975     +#define PEM_NODE_MASK GENMASK_ULL(45, 44)
976     +#define PEM_INDX_MASK GENMASK_ULL(26, 24)
977     #define PEM_MIN_DOM_IN_NODE 4
978     #define PEM_MAX_DOM_IN_NODE 10
979    
980     diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
981     index 6e60b4b1bf53b..98be06ac2af24 100644
982     --- a/drivers/pci/hotplug/acpiphp_glue.c
983     +++ b/drivers/pci/hotplug/acpiphp_glue.c
984     @@ -540,6 +540,7 @@ static void enable_slot(struct acpiphp_slot *slot, bool bridge)
985     slot->flags &= ~SLOT_ENABLED;
986     continue;
987     }
988     + pci_dev_put(dev);
989     }
990     }
991    
992     diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
993     index a5adc2e2c351d..572c2f0a2f0c7 100644
994     --- a/drivers/pci/pci.h
995     +++ b/drivers/pci/pci.h
996     @@ -588,6 +588,12 @@ static inline int pci_dev_specific_reset(struct pci_dev *dev, int probe)
997     #if defined(CONFIG_PCI_QUIRKS) && defined(CONFIG_ARM64)
998     int acpi_get_rc_resources(struct device *dev, const char *hid, u16 segment,
999     struct resource *res);
1000     +#else
1001     +static inline int acpi_get_rc_resources(struct device *dev, const char *hid,
1002     + u16 segment, struct resource *res)
1003     +{
1004     + return -ENODEV;
1005     +}
1006     #endif
1007    
1008     u32 pci_rebar_get_possible_sizes(struct pci_dev *pdev, int bar);
1009     diff --git a/drivers/pinctrl/pinctrl-ingenic.c b/drivers/pinctrl/pinctrl-ingenic.c
1010     index 61e7d938d4c5c..91596eee0bda1 100644
1011     --- a/drivers/pinctrl/pinctrl-ingenic.c
1012     +++ b/drivers/pinctrl/pinctrl-ingenic.c
1013     @@ -1846,7 +1846,8 @@ static int ingenic_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
1014     break;
1015    
1016     default:
1017     - unreachable();
1018     + /* unreachable */
1019     + break;
1020     }
1021     }
1022    
1023     diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
1024     index ef7cef316d210..795460eda6a59 100644
1025     --- a/drivers/scsi/lpfc/lpfc_sli.c
1026     +++ b/drivers/scsi/lpfc/lpfc_sli.c
1027     @@ -11337,13 +11337,20 @@ lpfc_sli_validate_fcp_iocb(struct lpfc_iocbq *iocbq, struct lpfc_vport *vport,
1028     lpfc_ctx_cmd ctx_cmd)
1029     {
1030     struct lpfc_io_buf *lpfc_cmd;
1031     + IOCB_t *icmd = NULL;
1032     int rc = 1;
1033    
1034     if (iocbq->vport != vport)
1035     return rc;
1036    
1037     - if (!(iocbq->iocb_flag & LPFC_IO_FCP) ||
1038     - !(iocbq->iocb_flag & LPFC_IO_ON_TXCMPLQ))
1039     + if (!(iocbq->iocb_flag & LPFC_IO_FCP) ||
1040     + !(iocbq->iocb_flag & LPFC_IO_ON_TXCMPLQ) ||
1041     + iocbq->iocb_flag & LPFC_DRIVER_ABORTED)
1042     + return rc;
1043     +
1044     + icmd = &iocbq->iocb;
1045     + if (icmd->ulpCommand == CMD_ABORT_XRI_CN ||
1046     + icmd->ulpCommand == CMD_CLOSE_XRI_CN)
1047     return rc;
1048    
1049     lpfc_cmd = container_of(iocbq, struct lpfc_io_buf, cur_iocbq);
1050     diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
1051     index d6634baebb474..71144e33272a3 100644
1052     --- a/drivers/target/target_core_user.c
1053     +++ b/drivers/target/target_core_user.c
1054     @@ -1205,7 +1205,7 @@ static void tcmu_set_next_deadline(struct list_head *queue,
1055     del_timer(timer);
1056     }
1057    
1058     -static unsigned int tcmu_handle_completions(struct tcmu_dev *udev)
1059     +static bool tcmu_handle_completions(struct tcmu_dev *udev)
1060     {
1061     struct tcmu_mailbox *mb;
1062     struct tcmu_cmd *cmd;
1063     @@ -1245,7 +1245,7 @@ static unsigned int tcmu_handle_completions(struct tcmu_dev *udev)
1064     pr_err("cmd_id %u not found, ring is broken\n",
1065     entry->hdr.cmd_id);
1066     set_bit(TCMU_DEV_BIT_BROKEN, &udev->flags);
1067     - break;
1068     + return false;
1069     }
1070    
1071     tcmu_handle_completion(cmd, entry);
1072     diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
1073     index 72a34a1eb6189..936fddc6d8207 100644
1074     --- a/drivers/usb/host/sl811-hcd.c
1075     +++ b/drivers/usb/host/sl811-hcd.c
1076     @@ -1287,11 +1287,10 @@ sl811h_hub_control(
1077     goto error;
1078     put_unaligned_le32(sl811->port1, buf);
1079    
1080     -#ifndef VERBOSE
1081     - if (*(u16*)(buf+2)) /* only if wPortChange is interesting */
1082     -#endif
1083     - dev_dbg(hcd->self.controller, "GetPortStatus %08x\n",
1084     - sl811->port1);
1085     + if (__is_defined(VERBOSE) ||
1086     + *(u16*)(buf+2)) /* only if wPortChange is interesting */
1087     + dev_dbg(hcd->self.controller, "GetPortStatus %08x\n",
1088     + sl811->port1);
1089     break;
1090     case SetPortFeature:
1091     if (wIndex != 1 || wLength != 0)
1092     diff --git a/fs/block_dev.c b/fs/block_dev.c
1093     index bd93563477a43..fa329c7eddf02 100644
1094     --- a/fs/block_dev.c
1095     +++ b/fs/block_dev.c
1096     @@ -1987,6 +1987,7 @@ ssize_t blkdev_write_iter(struct kiocb *iocb, struct iov_iter *from)
1097     struct inode *bd_inode = bdev_file_inode(file);
1098     loff_t size = i_size_read(bd_inode);
1099     struct blk_plug plug;
1100     + size_t shorted = 0;
1101     ssize_t ret;
1102    
1103     if (bdev_read_only(I_BDEV(bd_inode)))
1104     @@ -2005,12 +2006,17 @@ ssize_t blkdev_write_iter(struct kiocb *iocb, struct iov_iter *from)
1105     if ((iocb->ki_flags & (IOCB_NOWAIT | IOCB_DIRECT)) == IOCB_NOWAIT)
1106     return -EOPNOTSUPP;
1107    
1108     - iov_iter_truncate(from, size - iocb->ki_pos);
1109     + size -= iocb->ki_pos;
1110     + if (iov_iter_count(from) > size) {
1111     + shorted = iov_iter_count(from) - size;
1112     + iov_iter_truncate(from, size);
1113     + }
1114    
1115     blk_start_plug(&plug);
1116     ret = __generic_file_write_iter(iocb, from);
1117     if (ret > 0)
1118     ret = generic_write_sync(iocb, ret);
1119     + iov_iter_reexpand(from, iov_iter_count(from) + shorted);
1120     blk_finish_plug(&plug);
1121     return ret;
1122     }
1123     @@ -2022,13 +2028,21 @@ ssize_t blkdev_read_iter(struct kiocb *iocb, struct iov_iter *to)
1124     struct inode *bd_inode = bdev_file_inode(file);
1125     loff_t size = i_size_read(bd_inode);
1126     loff_t pos = iocb->ki_pos;
1127     + size_t shorted = 0;
1128     + ssize_t ret;
1129    
1130     if (pos >= size)
1131     return 0;
1132    
1133     size -= pos;
1134     - iov_iter_truncate(to, size);
1135     - return generic_file_read_iter(iocb, to);
1136     + if (iov_iter_count(to) > size) {
1137     + shorted = iov_iter_count(to) - size;
1138     + iov_iter_truncate(to, size);
1139     + }
1140     +
1141     + ret = generic_file_read_iter(iocb, to);
1142     + iov_iter_reexpand(to, iov_iter_count(to) + shorted);
1143     + return ret;
1144     }
1145     EXPORT_SYMBOL_GPL(blkdev_read_iter);
1146    
1147     diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
1148     index 22833fa5bb589..a6047caf77ecb 100644
1149     --- a/fs/ceph/caps.c
1150     +++ b/fs/ceph/caps.c
1151     @@ -1780,6 +1780,7 @@ static int try_nonblocking_invalidate(struct inode *inode)
1152     u32 invalidating_gen = ci->i_rdcache_gen;
1153    
1154     spin_unlock(&ci->i_ceph_lock);
1155     + ceph_fscache_invalidate(inode);
1156     invalidate_mapping_pages(&inode->i_data, 0, -1);
1157     spin_lock(&ci->i_ceph_lock);
1158    
1159     diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
1160     index 660a878e20ef2..5beebbbb42f09 100644
1161     --- a/fs/ceph/inode.c
1162     +++ b/fs/ceph/inode.c
1163     @@ -1875,6 +1875,7 @@ static void ceph_do_invalidate_pages(struct inode *inode)
1164     orig_gen = ci->i_rdcache_gen;
1165     spin_unlock(&ci->i_ceph_lock);
1166    
1167     + ceph_fscache_invalidate(inode);
1168     if (invalidate_inode_pages2(inode->i_mapping) < 0) {
1169     pr_err("invalidate_pages %p fails\n", inode);
1170     }
1171     diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h
1172     index 98775d7fa6963..b465f8f3e554f 100644
1173     --- a/include/linux/virtio_net.h
1174     +++ b/include/linux/virtio_net.h
1175     @@ -65,14 +65,18 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb,
1176     skb_reset_mac_header(skb);
1177    
1178     if (hdr->flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) {
1179     - u16 start = __virtio16_to_cpu(little_endian, hdr->csum_start);
1180     - u16 off = __virtio16_to_cpu(little_endian, hdr->csum_offset);
1181     + u32 start = __virtio16_to_cpu(little_endian, hdr->csum_start);
1182     + u32 off = __virtio16_to_cpu(little_endian, hdr->csum_offset);
1183     + u32 needed = start + max_t(u32, thlen, off + sizeof(__sum16));
1184     +
1185     + if (!pskb_may_pull(skb, needed))
1186     + return -EINVAL;
1187    
1188     if (!skb_partial_csum_set(skb, start, off))
1189     return -EINVAL;
1190    
1191     p_off = skb_transport_offset(skb) + thlen;
1192     - if (p_off > skb_headlen(skb))
1193     + if (!pskb_may_pull(skb, p_off))
1194     return -EINVAL;
1195     } else {
1196     /* gso packets without NEEDS_CSUM do not set transport_offset.
1197     @@ -102,14 +106,14 @@ retry:
1198     }
1199    
1200     p_off = keys.control.thoff + thlen;
1201     - if (p_off > skb_headlen(skb) ||
1202     + if (!pskb_may_pull(skb, p_off) ||
1203     keys.basic.ip_proto != ip_proto)
1204     return -EINVAL;
1205    
1206     skb_set_transport_header(skb, keys.control.thoff);
1207     } else if (gso_type) {
1208     p_off = thlen;
1209     - if (p_off > skb_headlen(skb))
1210     + if (!pskb_may_pull(skb, p_off))
1211     return -EINVAL;
1212     }
1213     }
1214     diff --git a/lib/stackdepot.c b/lib/stackdepot.c
1215     index 81c69c08d1d15..468626b8eb1b9 100644
1216     --- a/lib/stackdepot.c
1217     +++ b/lib/stackdepot.c
1218     @@ -69,7 +69,7 @@ static void *stack_slabs[STACK_ALLOC_MAX_SLABS];
1219     static int depot_index;
1220     static int next_slab_inited;
1221     static size_t depot_offset;
1222     -static DEFINE_SPINLOCK(depot_lock);
1223     +static DEFINE_RAW_SPINLOCK(depot_lock);
1224    
1225     static bool init_stack_slab(void **prealloc)
1226     {
1227     @@ -269,7 +269,7 @@ depot_stack_handle_t stack_depot_save(unsigned long *entries,
1228     prealloc = page_address(page);
1229     }
1230    
1231     - spin_lock_irqsave(&depot_lock, flags);
1232     + raw_spin_lock_irqsave(&depot_lock, flags);
1233    
1234     found = find_stack(*bucket, entries, nr_entries, hash);
1235     if (!found) {
1236     @@ -293,7 +293,7 @@ depot_stack_handle_t stack_depot_save(unsigned long *entries,
1237     WARN_ON(!init_stack_slab(&prealloc));
1238     }
1239    
1240     - spin_unlock_irqrestore(&depot_lock, flags);
1241     + raw_spin_unlock_irqrestore(&depot_lock, flags);
1242     exit:
1243     if (prealloc) {
1244     /* Nobody used this memory, ok to free it. */
1245     diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
1246     index a0a54482aabc4..8a664148f57aa 100644
1247     --- a/net/bridge/br_netlink.c
1248     +++ b/net/bridge/br_netlink.c
1249     @@ -99,8 +99,9 @@ static size_t br_get_link_af_size_filtered(const struct net_device *dev,
1250    
1251     rcu_read_lock();
1252     if (netif_is_bridge_port(dev)) {
1253     - p = br_port_get_rcu(dev);
1254     - vg = nbp_vlan_group_rcu(p);
1255     + p = br_port_get_check_rcu(dev);
1256     + if (p)
1257     + vg = nbp_vlan_group_rcu(p);
1258     } else if (dev->priv_flags & IFF_EBRIDGE) {
1259     br = netdev_priv(dev);
1260     vg = br_vlan_group_rcu(br);
1261     diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
1262     index e4a43a8941c86..0cb8056d98003 100644
1263     --- a/net/ipv6/ip6_gre.c
1264     +++ b/net/ipv6/ip6_gre.c
1265     @@ -387,7 +387,6 @@ static struct ip6_tnl *ip6gre_tunnel_locate(struct net *net,
1266     if (!(nt->parms.o_flags & TUNNEL_SEQ))
1267     dev->features |= NETIF_F_LLTX;
1268    
1269     - dev_hold(dev);
1270     ip6gre_tunnel_link(ign, nt);
1271     return nt;
1272    
1273     @@ -1483,6 +1482,7 @@ static int ip6gre_tunnel_init_common(struct net_device *dev)
1274     }
1275     ip6gre_tnl_init_features(dev);
1276    
1277     + dev_hold(dev);
1278     return 0;
1279    
1280     cleanup_dst_cache_init:
1281     @@ -1525,8 +1525,6 @@ static void ip6gre_fb_tunnel_init(struct net_device *dev)
1282     strcpy(tunnel->parms.name, dev->name);
1283    
1284     tunnel->hlen = sizeof(struct ipv6hdr) + 4;
1285     -
1286     - dev_hold(dev);
1287     }
1288    
1289     static struct inet6_protocol ip6gre_protocol __read_mostly = {
1290     @@ -1876,6 +1874,7 @@ static int ip6erspan_tap_init(struct net_device *dev)
1291     dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
1292     ip6erspan_tnl_link_config(tunnel, 1);
1293    
1294     + dev_hold(dev);
1295     return 0;
1296    
1297     cleanup_dst_cache_init:
1298     @@ -1975,8 +1974,6 @@ static int ip6gre_newlink_common(struct net *src_net, struct net_device *dev,
1299     if (tb[IFLA_MTU])
1300     ip6_tnl_change_mtu(dev, nla_get_u32(tb[IFLA_MTU]));
1301    
1302     - dev_hold(dev);
1303     -
1304     out:
1305     return err;
1306     }
1307     diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
1308     index 69799b612ee80..fd0d1cee2d3f5 100644
1309     --- a/net/ipv6/ip6_tunnel.c
1310     +++ b/net/ipv6/ip6_tunnel.c
1311     @@ -267,7 +267,6 @@ static int ip6_tnl_create2(struct net_device *dev)
1312    
1313     strcpy(t->parms.name, dev->name);
1314    
1315     - dev_hold(dev);
1316     ip6_tnl_link(ip6n, t);
1317     return 0;
1318    
1319     @@ -1861,6 +1860,7 @@ ip6_tnl_dev_init_gen(struct net_device *dev)
1320     dev->min_mtu = ETH_MIN_MTU;
1321     dev->max_mtu = IP6_MAX_MTU - dev->hard_header_len;
1322    
1323     + dev_hold(dev);
1324     return 0;
1325    
1326     destroy_dst:
1327     @@ -1904,7 +1904,6 @@ static int __net_init ip6_fb_tnl_dev_init(struct net_device *dev)
1328     struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id);
1329    
1330     t->parms.proto = IPPROTO_IPV6;
1331     - dev_hold(dev);
1332    
1333     rcu_assign_pointer(ip6n->tnls_wc[0], t);
1334     return 0;
1335     diff --git a/net/ipv6/ip6_vti.c b/net/ipv6/ip6_vti.c
1336     index 01ddb0f70c578..12ab6605d9617 100644
1337     --- a/net/ipv6/ip6_vti.c
1338     +++ b/net/ipv6/ip6_vti.c
1339     @@ -952,7 +952,6 @@ static int __net_init vti6_fb_tnl_dev_init(struct net_device *dev)
1340     struct vti6_net *ip6n = net_generic(net, vti6_net_id);
1341    
1342     t->parms.proto = IPPROTO_IPV6;
1343     - dev_hold(dev);
1344    
1345     rcu_assign_pointer(ip6n->tnls_wc[0], t);
1346     return 0;
1347     diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
1348     index 2710f3bc856f8..7f9cae4c49e7e 100644
1349     --- a/net/ipv6/sit.c
1350     +++ b/net/ipv6/sit.c
1351     @@ -211,8 +211,6 @@ static int ipip6_tunnel_create(struct net_device *dev)
1352    
1353     ipip6_tunnel_clone_6rd(dev, sitn);
1354    
1355     - dev_hold(dev);
1356     -
1357     ipip6_tunnel_link(sitn, t);
1358     return 0;
1359    
1360     @@ -1408,7 +1406,7 @@ static int ipip6_tunnel_init(struct net_device *dev)
1361     dev->tstats = NULL;
1362     return err;
1363     }
1364     -
1365     + dev_hold(dev);
1366     return 0;
1367     }
1368    
1369     @@ -1424,7 +1422,6 @@ static void __net_init ipip6_fb_tunnel_init(struct net_device *dev)
1370     iph->ihl = 5;
1371     iph->ttl = 64;
1372    
1373     - dev_hold(dev);
1374     rcu_assign_pointer(sitn->tunnels_wc[0], tunnel);
1375     }
1376    
1377     diff --git a/net/xdp/xsk_queue.h b/net/xdp/xsk_queue.h
1378     index eddae46888629..ee3f8c857dd8c 100644
1379     --- a/net/xdp/xsk_queue.h
1380     +++ b/net/xdp/xsk_queue.h
1381     @@ -363,12 +363,15 @@ static inline void xskq_produce_flush_desc(struct xsk_queue *q)
1382    
1383     static inline bool xskq_full_desc(struct xsk_queue *q)
1384     {
1385     - return xskq_nb_avail(q, q->nentries) == q->nentries;
1386     + /* No barriers needed since data is not accessed */
1387     + return READ_ONCE(q->ring->producer) - READ_ONCE(q->ring->consumer) ==
1388     + q->nentries;
1389     }
1390    
1391     static inline bool xskq_empty_desc(struct xsk_queue *q)
1392     {
1393     - return xskq_nb_free(q, q->prod_tail, q->nentries) == q->nentries;
1394     + /* No barriers needed since data is not accessed */
1395     + return READ_ONCE(q->ring->consumer) == READ_ONCE(q->ring->producer);
1396     }
1397    
1398     void xskq_set_umem(struct xsk_queue *q, u64 size, u64 chunk_mask);
1399     diff --git a/scripts/bloat-o-meter b/scripts/bloat-o-meter
1400     index 8c965f6a98812..a1b95100b3196 100755
1401     --- a/scripts/bloat-o-meter
1402     +++ b/scripts/bloat-o-meter
1403     @@ -1,4 +1,4 @@
1404     -#!/usr/bin/python
1405     +#!/usr/bin/env python3
1406     #
1407     # Copyright 2004 Matt Mackall <mpm@selenic.com>
1408     #
1409     diff --git a/scripts/config b/scripts/config
1410     index eee5b7f3a092a..8c8d7c3d7accc 100755
1411     --- a/scripts/config
1412     +++ b/scripts/config
1413     @@ -1,4 +1,4 @@
1414     -#!/bin/bash
1415     +#!/usr/bin/env bash
1416     # SPDX-License-Identifier: GPL-2.0
1417     # Manipulate options in a .config file from the command line
1418    
1419     diff --git a/scripts/diffconfig b/scripts/diffconfig
1420     index 89abf777f1973..d5da5fa05d1d3 100755
1421     --- a/scripts/diffconfig
1422     +++ b/scripts/diffconfig
1423     @@ -1,4 +1,4 @@
1424     -#!/usr/bin/python
1425     +#!/usr/bin/env python3
1426     # SPDX-License-Identifier: GPL-2.0
1427     #
1428     # diffconfig - a tool to compare .config files.
1429     diff --git a/scripts/get_abi.pl b/scripts/get_abi.pl
1430     index c738cb7955141..ba87b230fe0a4 100755
1431     --- a/scripts/get_abi.pl
1432     +++ b/scripts/get_abi.pl
1433     @@ -1,4 +1,4 @@
1434     -#!/usr/bin/perl
1435     +#!/usr/bin/env perl
1436     # SPDX-License-Identifier: GPL-2.0
1437    
1438     use strict;
1439     diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
1440     index 0bafed857e171..4f84657f55c23 100755
1441     --- a/scripts/recordmcount.pl
1442     +++ b/scripts/recordmcount.pl
1443     @@ -395,7 +395,7 @@ if ($arch eq "x86_64") {
1444     $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s_mcount\$";
1445     } elsif ($arch eq "riscv") {
1446     $function_regex = "^([0-9a-fA-F]+)\\s+<([^.0-9][0-9a-zA-Z_\\.]+)>:";
1447     - $mcount_regex = "^\\s*([0-9a-fA-F]+):\\sR_RISCV_CALL\\s_mcount\$";
1448     + $mcount_regex = "^\\s*([0-9a-fA-F]+):\\sR_RISCV_CALL(_PLT)?\\s_?mcount\$";
1449     $type = ".quad";
1450     $alignment = 2;
1451     } elsif ($arch eq "nds32") {
1452     diff --git a/scripts/show_delta b/scripts/show_delta
1453     index 264399307c4fc..28e67e1781941 100755
1454     --- a/scripts/show_delta
1455     +++ b/scripts/show_delta
1456     @@ -1,4 +1,4 @@
1457     -#!/usr/bin/python
1458     +#!/usr/bin/env python
1459     # SPDX-License-Identifier: GPL-2.0-only
1460     #
1461     # show_deltas: Read list of printk messages instrumented with
1462     diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
1463     index 3b638c0e1a4fd..62cb61baad83f 100755
1464     --- a/scripts/sphinx-pre-install
1465     +++ b/scripts/sphinx-pre-install
1466     @@ -1,4 +1,4 @@
1467     -#!/usr/bin/perl
1468     +#!/usr/bin/env perl
1469     # SPDX-License-Identifier: GPL-2.0-or-later
1470     use strict;
1471    
1472     diff --git a/scripts/split-man.pl b/scripts/split-man.pl
1473     index c3db607ee9ec1..96bd99dc977a5 100755
1474     --- a/scripts/split-man.pl
1475     +++ b/scripts/split-man.pl
1476     @@ -1,4 +1,4 @@
1477     -#!/usr/bin/perl
1478     +#!/usr/bin/env perl
1479     # SPDX-License-Identifier: GPL-2.0
1480     #
1481     # Author: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
1482     diff --git a/scripts/tracing/draw_functrace.py b/scripts/tracing/draw_functrace.py
1483     index b657357585209..74f8aadfd4cbc 100755
1484     --- a/scripts/tracing/draw_functrace.py
1485     +++ b/scripts/tracing/draw_functrace.py
1486     @@ -1,4 +1,4 @@
1487     -#!/usr/bin/python
1488     +#!/usr/bin/env python
1489     # SPDX-License-Identifier: GPL-2.0-only
1490    
1491     """
1492     diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
1493     index efceeae09045f..7ac3f04ca8c00 100644
1494     --- a/sound/pci/hda/hda_generic.c
1495     +++ b/sound/pci/hda/hda_generic.c
1496     @@ -1202,11 +1202,17 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
1497     *index = ch;
1498     return "Headphone";
1499     case AUTO_PIN_LINE_OUT:
1500     - /* This deals with the case where we have two DACs and
1501     - * one LO, one HP and one Speaker */
1502     - if (!ch && cfg->speaker_outs && cfg->hp_outs) {
1503     - bool hp_lo_shared = !path_has_mixer(codec, spec->hp_paths[0], ctl_type);
1504     - bool spk_lo_shared = !path_has_mixer(codec, spec->speaker_paths[0], ctl_type);
1505     + /* This deals with the case where one HP or one Speaker or
1506     + * one HP + one Speaker need to share the DAC with LO
1507     + */
1508     + if (!ch) {
1509     + bool hp_lo_shared = false, spk_lo_shared = false;
1510     +
1511     + if (cfg->speaker_outs)
1512     + spk_lo_shared = !path_has_mixer(codec,
1513     + spec->speaker_paths[0], ctl_type);
1514     + if (cfg->hp_outs)
1515     + hp_lo_shared = !path_has_mixer(codec, spec->hp_paths[0], ctl_type);
1516     if (hp_lo_shared && spk_lo_shared)
1517     return spec->vmaster_mute.hook ? "PCM" : "Master";
1518     if (hp_lo_shared)
1519     diff --git a/tools/perf/python/tracepoint.py b/tools/perf/python/tracepoint.py
1520     index eb76f6516247e..461848c7f57dc 100755
1521     --- a/tools/perf/python/tracepoint.py
1522     +++ b/tools/perf/python/tracepoint.py
1523     @@ -1,4 +1,4 @@
1524     -#! /usr/bin/python
1525     +#! /usr/bin/env python
1526     # SPDX-License-Identifier: GPL-2.0
1527     # -*- python -*-
1528     # -*- coding: utf-8 -*-
1529     diff --git a/tools/perf/python/twatch.py b/tools/perf/python/twatch.py
1530     index ff87ccf5b7085..04f3db29b9bc1 100755
1531     --- a/tools/perf/python/twatch.py
1532     +++ b/tools/perf/python/twatch.py
1533     @@ -1,4 +1,4 @@
1534     -#! /usr/bin/python
1535     +#! /usr/bin/env python
1536     # SPDX-License-Identifier: GPL-2.0-only
1537     # -*- python -*-
1538     # -*- coding: utf-8 -*-
1539     diff --git a/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py b/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py
1540     index 1351975d07699..085cbe4a56df6 100755
1541     --- a/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py
1542     +++ b/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py
1543     @@ -1,4 +1,4 @@
1544     -#!/usr/bin/python
1545     +#!/usr/bin/env python
1546     # SPDX-License-Identifier: GPL-2.0-only
1547     # -*- coding: utf-8 -*-
1548     #
1549     diff --git a/tools/testing/ktest/compare-ktest-sample.pl b/tools/testing/ktest/compare-ktest-sample.pl
1550     index 4118eb4a842d2..ebea21d0a1be8 100755
1551     --- a/tools/testing/ktest/compare-ktest-sample.pl
1552     +++ b/tools/testing/ktest/compare-ktest-sample.pl
1553     @@ -1,4 +1,4 @@
1554     -#!/usr/bin/perl
1555     +#!/usr/bin/env perl
1556     # SPDX-License-Identifier: GPL-2.0
1557    
1558     open (IN,"ktest.pl");
1559     diff --git a/tools/testing/selftests/bpf/test_offload.py b/tools/testing/selftests/bpf/test_offload.py
1560     index 8f918847ddf89..f9e3daaf7cffb 100755
1561     --- a/tools/testing/selftests/bpf/test_offload.py
1562     +++ b/tools/testing/selftests/bpf/test_offload.py
1563     @@ -1,4 +1,4 @@
1564     -#!/usr/bin/python3
1565     +#!/usr/bin/env python3
1566    
1567     # Copyright (C) 2017 Netronome Systems, Inc.
1568     # Copyright (c) 2019 Mellanox Technologies. All rights reserved
1569     diff --git a/tools/testing/selftests/kselftest/prefix.pl b/tools/testing/selftests/kselftest/prefix.pl
1570     index 31f7c2a0a8bd4..12a7f4ca2684d 100755
1571     --- a/tools/testing/selftests/kselftest/prefix.pl
1572     +++ b/tools/testing/selftests/kselftest/prefix.pl
1573     @@ -1,4 +1,4 @@
1574     -#!/usr/bin/perl
1575     +#!/usr/bin/env perl
1576     # SPDX-License-Identifier: GPL-2.0
1577     # Prefix all lines with "# ", unbuffered. Command being piped in may need
1578     # to have unbuffering forced with "stdbuf -i0 -o0 -e0 $cmd".
1579     diff --git a/tools/testing/selftests/tc-testing/tdc_batch.py b/tools/testing/selftests/tc-testing/tdc_batch.py
1580     index 995f66ce43eba..35d5d94937842 100755
1581     --- a/tools/testing/selftests/tc-testing/tdc_batch.py
1582     +++ b/tools/testing/selftests/tc-testing/tdc_batch.py
1583     @@ -1,4 +1,4 @@
1584     -#!/usr/bin/python3
1585     +#!/usr/bin/env python3
1586    
1587     """
1588     tdc_batch.py - a script to generate TC batch file
1589     diff --git a/tools/testing/selftests/tc-testing/tdc_multibatch.py b/tools/testing/selftests/tc-testing/tdc_multibatch.py
1590     index 5e7237952e497..48e1f17ff2e86 100755
1591     --- a/tools/testing/selftests/tc-testing/tdc_multibatch.py
1592     +++ b/tools/testing/selftests/tc-testing/tdc_multibatch.py
1593     @@ -1,4 +1,4 @@
1594     -#!/usr/bin/python3
1595     +#!/usr/bin/env python3
1596     # SPDX-License-Identifier: GPL-2.0
1597     """
1598     tdc_multibatch.py - a thin wrapper over tdc_batch.py to generate multiple batch
1599     diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c
1600     index 2e7d2b3f29079..4af85605730e4 100644
1601     --- a/virt/kvm/arm/arm.c
1602     +++ b/virt/kvm/arm/arm.c
1603     @@ -579,6 +579,8 @@ static int kvm_vcpu_first_run_init(struct kvm_vcpu *vcpu)
1604    
1605     vcpu->arch.has_run_once = true;
1606    
1607     + kvm_arm_vcpu_init_debug(vcpu);
1608     +
1609     if (likely(irqchip_in_kernel(kvm))) {
1610     /*
1611     * Map the VGIC hardware resources before running a vcpu the