Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:5.15 commit in: /
Date: Fri, 23 Sep 2022 12:39:32
Message-Id: 1663936758.0b9512851c65f6d3a2d5ba258b54343697f012c6.mpagano@gentoo
1 commit: 0b9512851c65f6d3a2d5ba258b54343697f012c6
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 23 12:39:18 2022 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 23 12:39:18 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=0b951285
7
8 Linux patch 5.15.70
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 +
13 1069_linux-5.15.70.patch | 1274 ++++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 1278 insertions(+)
15
16 diff --git a/0000_README b/0000_README
17 index 7caf56d0..673caa1d 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -319,6 +319,10 @@ Patch: 1068_linux-5.15.69.patch
21 From: http://www.kernel.org
22 Desc: Linux 5.15.69
23
24 +Patch: 1069_linux-5.15.70.patch
25 +From: http://www.kernel.org
26 +Desc: Linux 5.15.70
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/1069_linux-5.15.70.patch b/1069_linux-5.15.70.patch
33 new file mode 100644
34 index 00000000..2e159ef8
35 --- /dev/null
36 +++ b/1069_linux-5.15.70.patch
37 @@ -0,0 +1,1274 @@
38 +diff --git a/Makefile b/Makefile
39 +index 2134d5711dccc..e815677ec0112 100644
40 +--- a/Makefile
41 ++++ b/Makefile
42 +@@ -1,7 +1,7 @@
43 + # SPDX-License-Identifier: GPL-2.0
44 + VERSION = 5
45 + PATCHLEVEL = 15
46 +-SUBLEVEL = 69
47 ++SUBLEVEL = 70
48 + EXTRAVERSION =
49 + NAME = Trick or Treat
50 +
51 +diff --git a/arch/arm64/boot/dts/arm/juno-base.dtsi b/arch/arm64/boot/dts/arm/juno-base.dtsi
52 +index a2635b14da309..34e5549ea748a 100644
53 +--- a/arch/arm64/boot/dts/arm/juno-base.dtsi
54 ++++ b/arch/arm64/boot/dts/arm/juno-base.dtsi
55 +@@ -26,7 +26,8 @@
56 + compatible = "arm,mhu", "arm,primecell";
57 + reg = <0x0 0x2b1f0000 0x0 0x1000>;
58 + interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>,
59 +- <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
60 ++ <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
61 ++ <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
62 + #mbox-cells = <1>;
63 + clocks = <&soc_refclk100mhz>;
64 + clock-names = "apb_pclk";
65 +diff --git a/arch/mips/cavium-octeon/octeon-irq.c b/arch/mips/cavium-octeon/octeon-irq.c
66 +index be5d4afcd30f9..353dfeee0a6d3 100644
67 +--- a/arch/mips/cavium-octeon/octeon-irq.c
68 ++++ b/arch/mips/cavium-octeon/octeon-irq.c
69 +@@ -127,6 +127,16 @@ static void octeon_irq_free_cd(struct irq_domain *d, unsigned int irq)
70 + static int octeon_irq_force_ciu_mapping(struct irq_domain *domain,
71 + int irq, int line, int bit)
72 + {
73 ++ struct device_node *of_node;
74 ++ int ret;
75 ++
76 ++ of_node = irq_domain_get_of_node(domain);
77 ++ if (!of_node)
78 ++ return -EINVAL;
79 ++ ret = irq_alloc_desc_at(irq, of_node_to_nid(of_node));
80 ++ if (ret < 0)
81 ++ return ret;
82 ++
83 + return irq_domain_associate(domain, irq, line << 6 | bit);
84 + }
85 +
86 +diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
87 +index e6542e44caded..117b0f882750a 100644
88 +--- a/arch/parisc/Kconfig
89 ++++ b/arch/parisc/Kconfig
90 +@@ -220,8 +220,18 @@ config MLONGCALLS
91 + Enabling this option will probably slow down your kernel.
92 +
93 + config 64BIT
94 +- def_bool "$(ARCH)" = "parisc64"
95 ++ def_bool y if "$(ARCH)" = "parisc64"
96 ++ bool "64-bit kernel" if "$(ARCH)" = "parisc"
97 + depends on PA8X00
98 ++ help
99 ++ Enable this if you want to support 64bit kernel on PA-RISC platform.
100 ++
101 ++ At the moment, only people willing to use more than 2GB of RAM,
102 ++ or having a 64bit-only capable PA-RISC machine should say Y here.
103 ++
104 ++ Since there is no 64bit userland on PA-RISC, there is no point to
105 ++ enable this option otherwise. The 64bit kernel is significantly bigger
106 ++ and slower than the 32bit one.
107 +
108 + choice
109 + prompt "Kernel page size"
110 +diff --git a/arch/x86/include/asm/kvm-x86-ops.h b/arch/x86/include/asm/kvm-x86-ops.h
111 +index 9e50da3ed01a3..23ea8a25cbbeb 100644
112 +--- a/arch/x86/include/asm/kvm-x86-ops.h
113 ++++ b/arch/x86/include/asm/kvm-x86-ops.h
114 +@@ -115,6 +115,7 @@ KVM_X86_OP(enable_smi_window)
115 + KVM_X86_OP_NULL(mem_enc_op)
116 + KVM_X86_OP_NULL(mem_enc_reg_region)
117 + KVM_X86_OP_NULL(mem_enc_unreg_region)
118 ++KVM_X86_OP_NULL(guest_memory_reclaimed)
119 + KVM_X86_OP(get_msr_feature)
120 + KVM_X86_OP(can_emulate_instruction)
121 + KVM_X86_OP(apic_init_signal_blocked)
122 +diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
123 +index 74b5819120dab..9e800d4d323c6 100644
124 +--- a/arch/x86/include/asm/kvm_host.h
125 ++++ b/arch/x86/include/asm/kvm_host.h
126 +@@ -1476,6 +1476,7 @@ struct kvm_x86_ops {
127 + int (*mem_enc_reg_region)(struct kvm *kvm, struct kvm_enc_region *argp);
128 + int (*mem_enc_unreg_region)(struct kvm *kvm, struct kvm_enc_region *argp);
129 + int (*vm_copy_enc_context_from)(struct kvm *kvm, unsigned int source_fd);
130 ++ void (*guest_memory_reclaimed)(struct kvm *kvm);
131 +
132 + int (*get_msr_feature)(struct kvm_msr_entry *entry);
133 +
134 +diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
135 +index 86f3096f042f7..eeedcb3d40e89 100644
136 +--- a/arch/x86/kvm/svm/sev.c
137 ++++ b/arch/x86/kvm/svm/sev.c
138 +@@ -2037,6 +2037,14 @@ static void sev_flush_guest_memory(struct vcpu_svm *svm, void *va,
139 + wbinvd_on_all_cpus();
140 + }
141 +
142 ++void sev_guest_memory_reclaimed(struct kvm *kvm)
143 ++{
144 ++ if (!sev_guest(kvm))
145 ++ return;
146 ++
147 ++ wbinvd_on_all_cpus();
148 ++}
149 ++
150 + void sev_free_vcpu(struct kvm_vcpu *vcpu)
151 + {
152 + struct vcpu_svm *svm;
153 +diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
154 +index 2947e3c965e32..49bb3db2761a7 100644
155 +--- a/arch/x86/kvm/svm/svm.c
156 ++++ b/arch/x86/kvm/svm/svm.c
157 +@@ -4678,6 +4678,7 @@ static struct kvm_x86_ops svm_x86_ops __initdata = {
158 + .mem_enc_op = svm_mem_enc_op,
159 + .mem_enc_reg_region = svm_register_enc_region,
160 + .mem_enc_unreg_region = svm_unregister_enc_region,
161 ++ .guest_memory_reclaimed = sev_guest_memory_reclaimed,
162 +
163 + .vm_copy_enc_context_from = svm_vm_copy_asid_from,
164 +
165 +diff --git a/arch/x86/kvm/svm/svm.h b/arch/x86/kvm/svm/svm.h
166 +index cf2d8365aeb4b..7004f356edf94 100644
167 +--- a/arch/x86/kvm/svm/svm.h
168 ++++ b/arch/x86/kvm/svm/svm.h
169 +@@ -555,6 +555,8 @@ int svm_register_enc_region(struct kvm *kvm,
170 + int svm_unregister_enc_region(struct kvm *kvm,
171 + struct kvm_enc_region *range);
172 + int svm_vm_copy_asid_from(struct kvm *kvm, unsigned int source_fd);
173 ++void sev_guest_memory_reclaimed(struct kvm *kvm);
174 ++
175 + void pre_sev_run(struct vcpu_svm *svm, int cpu);
176 + void __init sev_set_cpu_caps(void);
177 + void __init sev_hardware_setup(void);
178 +diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
179 +index 9109e5589b421..11e73d02fb3ae 100644
180 +--- a/arch/x86/kvm/x86.c
181 ++++ b/arch/x86/kvm/x86.c
182 +@@ -9557,6 +9557,11 @@ void kvm_arch_mmu_notifier_invalidate_range(struct kvm *kvm,
183 + kvm_make_all_cpus_request(kvm, KVM_REQ_APIC_PAGE_RELOAD);
184 + }
185 +
186 ++void kvm_arch_guest_memory_reclaimed(struct kvm *kvm)
187 ++{
188 ++ static_call_cond(kvm_x86_guest_memory_reclaimed)(kvm);
189 ++}
190 ++
191 + void kvm_vcpu_reload_apic_access_page(struct kvm_vcpu *vcpu)
192 + {
193 + if (!lapic_in_kernel(vcpu))
194 +diff --git a/block/blk-core.c b/block/blk-core.c
195 +index 5009b9f1c3c9d..13e1fca1e923f 100644
196 +--- a/block/blk-core.c
197 ++++ b/block/blk-core.c
198 +@@ -447,7 +447,7 @@ int blk_queue_enter(struct request_queue *q, blk_mq_req_flags_t flags)
199 +
200 + while (!blk_try_enter_queue(q, pm)) {
201 + if (flags & BLK_MQ_REQ_NOWAIT)
202 +- return -EBUSY;
203 ++ return -EAGAIN;
204 +
205 + /*
206 + * read pair of barrier in blk_freeze_queue_start(), we need to
207 +@@ -478,7 +478,7 @@ static inline int bio_queue_enter(struct bio *bio)
208 + if (test_bit(GD_DEAD, &disk->state))
209 + goto dead;
210 + bio_wouldblock_error(bio);
211 +- return -EBUSY;
212 ++ return -EAGAIN;
213 + }
214 +
215 + /*
216 +diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c
217 +index 849f8dff0be1b..8ed450125c924 100644
218 +--- a/drivers/android/binder_alloc.c
219 ++++ b/drivers/android/binder_alloc.c
220 +@@ -315,16 +315,9 @@ static inline void binder_alloc_set_vma(struct binder_alloc *alloc,
221 + {
222 + unsigned long vm_start = 0;
223 +
224 +- /*
225 +- * Allow clearing the vma with holding just the read lock to allow
226 +- * munmapping downgrade of the write lock before freeing and closing the
227 +- * file using binder_alloc_vma_close().
228 +- */
229 + if (vma) {
230 + vm_start = vma->vm_start;
231 + mmap_assert_write_locked(alloc->vma_vm_mm);
232 +- } else {
233 +- mmap_assert_locked(alloc->vma_vm_mm);
234 + }
235 +
236 + alloc->vma_addr = vm_start;
237 +diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c
238 +index a964e25ea6206..763256efddc2b 100644
239 +--- a/drivers/gpio/gpio-mpc8xxx.c
240 ++++ b/drivers/gpio/gpio-mpc8xxx.c
241 +@@ -172,6 +172,7 @@ static int mpc8xxx_irq_set_type(struct irq_data *d, unsigned int flow_type)
242 +
243 + switch (flow_type) {
244 + case IRQ_TYPE_EDGE_FALLING:
245 ++ case IRQ_TYPE_LEVEL_LOW:
246 + raw_spin_lock_irqsave(&mpc8xxx_gc->lock, flags);
247 + gc->write_reg(mpc8xxx_gc->regs + GPIO_ICR,
248 + gc->read_reg(mpc8xxx_gc->regs + GPIO_ICR)
249 +diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c
250 +index 22b8f0aa80f19..f31b0947eaaa1 100644
251 +--- a/drivers/gpio/gpio-rockchip.c
252 ++++ b/drivers/gpio/gpio-rockchip.c
253 +@@ -418,11 +418,11 @@ static int rockchip_irq_set_type(struct irq_data *d, unsigned int type)
254 + goto out;
255 + } else {
256 + bank->toggle_edge_mode |= mask;
257 +- level |= mask;
258 ++ level &= ~mask;
259 +
260 + /*
261 + * Determine gpio state. If 1 next interrupt should be
262 +- * falling otherwise rising.
263 ++ * low otherwise high.
264 + */
265 + data = readl(bank->reg_base + bank->gpio_regs->ext_port);
266 + if (data & mask)
267 +diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c b/drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c
268 +index b184b656b9b6b..6f21154d4891f 100644
269 +--- a/drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c
270 ++++ b/drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c
271 +@@ -366,6 +366,7 @@ static void nbio_v2_3_enable_aspm(struct amdgpu_device *adev,
272 + WREG32_PCIE(smnPCIE_LC_CNTL, data);
273 + }
274 +
275 ++#ifdef CONFIG_PCIEASPM
276 + static void nbio_v2_3_program_ltr(struct amdgpu_device *adev)
277 + {
278 + uint32_t def, data;
279 +@@ -387,9 +388,11 @@ static void nbio_v2_3_program_ltr(struct amdgpu_device *adev)
280 + if (def != data)
281 + WREG32_PCIE(smnBIF_CFG_DEV0_EPF0_DEVICE_CNTL2, data);
282 + }
283 ++#endif
284 +
285 + static void nbio_v2_3_program_aspm(struct amdgpu_device *adev)
286 + {
287 ++#ifdef CONFIG_PCIEASPM
288 + uint32_t def, data;
289 +
290 + def = data = RREG32_PCIE(smnPCIE_LC_CNTL);
291 +@@ -445,7 +448,10 @@ static void nbio_v2_3_program_aspm(struct amdgpu_device *adev)
292 + if (def != data)
293 + WREG32_PCIE(smnPCIE_LC_CNTL6, data);
294 +
295 +- nbio_v2_3_program_ltr(adev);
296 ++ /* Don't bother about LTR if LTR is not enabled
297 ++ * in the path */
298 ++ if (adev->pdev->ltr_path)
299 ++ nbio_v2_3_program_ltr(adev);
300 +
301 + def = data = RREG32_SOC15(NBIO, 0, mmRCC_BIF_STRAP3);
302 + data |= 0x5DE0 << RCC_BIF_STRAP3__STRAP_VLINK_ASPM_IDLE_TIMER__SHIFT;
303 +@@ -469,6 +475,7 @@ static void nbio_v2_3_program_aspm(struct amdgpu_device *adev)
304 + data &= ~PCIE_LC_CNTL3__LC_DSC_DONT_ENTER_L23_AFTER_PME_ACK_MASK;
305 + if (def != data)
306 + WREG32_PCIE(smnPCIE_LC_CNTL3, data);
307 ++#endif
308 + }
309 +
310 + static void nbio_v2_3_apply_lc_spc_mode_wa(struct amdgpu_device *adev)
311 +diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c b/drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c
312 +index 0d2d629e2d6a2..be3f6c52c3ffd 100644
313 +--- a/drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c
314 ++++ b/drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c
315 +@@ -278,6 +278,7 @@ static void nbio_v6_1_init_registers(struct amdgpu_device *adev)
316 + WREG32_PCIE(smnPCIE_CI_CNTL, data);
317 + }
318 +
319 ++#ifdef CONFIG_PCIEASPM
320 + static void nbio_v6_1_program_ltr(struct amdgpu_device *adev)
321 + {
322 + uint32_t def, data;
323 +@@ -299,9 +300,11 @@ static void nbio_v6_1_program_ltr(struct amdgpu_device *adev)
324 + if (def != data)
325 + WREG32_PCIE(smnBIF_CFG_DEV0_EPF0_DEVICE_CNTL2, data);
326 + }
327 ++#endif
328 +
329 + static void nbio_v6_1_program_aspm(struct amdgpu_device *adev)
330 + {
331 ++#ifdef CONFIG_PCIEASPM
332 + uint32_t def, data;
333 +
334 + def = data = RREG32_PCIE(smnPCIE_LC_CNTL);
335 +@@ -357,7 +360,10 @@ static void nbio_v6_1_program_aspm(struct amdgpu_device *adev)
336 + if (def != data)
337 + WREG32_PCIE(smnPCIE_LC_CNTL6, data);
338 +
339 +- nbio_v6_1_program_ltr(adev);
340 ++ /* Don't bother about LTR if LTR is not enabled
341 ++ * in the path */
342 ++ if (adev->pdev->ltr_path)
343 ++ nbio_v6_1_program_ltr(adev);
344 +
345 + def = data = RREG32_PCIE(smnRCC_BIF_STRAP3);
346 + data |= 0x5DE0 << RCC_BIF_STRAP3__STRAP_VLINK_ASPM_IDLE_TIMER__SHIFT;
347 +@@ -381,6 +387,7 @@ static void nbio_v6_1_program_aspm(struct amdgpu_device *adev)
348 + data &= ~PCIE_LC_CNTL3__LC_DSC_DONT_ENTER_L23_AFTER_PME_ACK_MASK;
349 + if (def != data)
350 + WREG32_PCIE(smnPCIE_LC_CNTL3, data);
351 ++#endif
352 + }
353 +
354 + const struct amdgpu_nbio_funcs nbio_v6_1_funcs = {
355 +diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c b/drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c
356 +index f50045cebd44c..74cd7543729be 100644
357 +--- a/drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c
358 ++++ b/drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c
359 +@@ -630,6 +630,7 @@ const struct amdgpu_nbio_ras_funcs nbio_v7_4_ras_funcs = {
360 + .ras_fini = amdgpu_nbio_ras_fini,
361 + };
362 +
363 ++#ifdef CONFIG_PCIEASPM
364 + static void nbio_v7_4_program_ltr(struct amdgpu_device *adev)
365 + {
366 + uint32_t def, data;
367 +@@ -651,9 +652,11 @@ static void nbio_v7_4_program_ltr(struct amdgpu_device *adev)
368 + if (def != data)
369 + WREG32_PCIE(smnBIF_CFG_DEV0_EPF0_DEVICE_CNTL2, data);
370 + }
371 ++#endif
372 +
373 + static void nbio_v7_4_program_aspm(struct amdgpu_device *adev)
374 + {
375 ++#ifdef CONFIG_PCIEASPM
376 + uint32_t def, data;
377 +
378 + def = data = RREG32_PCIE(smnPCIE_LC_CNTL);
379 +@@ -709,7 +712,10 @@ static void nbio_v7_4_program_aspm(struct amdgpu_device *adev)
380 + if (def != data)
381 + WREG32_PCIE(smnPCIE_LC_CNTL6, data);
382 +
383 +- nbio_v7_4_program_ltr(adev);
384 ++ /* Don't bother about LTR if LTR is not enabled
385 ++ * in the path */
386 ++ if (adev->pdev->ltr_path)
387 ++ nbio_v7_4_program_ltr(adev);
388 +
389 + def = data = RREG32_PCIE(smnRCC_BIF_STRAP3);
390 + data |= 0x5DE0 << RCC_BIF_STRAP3__STRAP_VLINK_ASPM_IDLE_TIMER__SHIFT;
391 +@@ -733,6 +739,7 @@ static void nbio_v7_4_program_aspm(struct amdgpu_device *adev)
392 + data &= ~PCIE_LC_CNTL3__LC_DSC_DONT_ENTER_L23_AFTER_PME_ACK_MASK;
393 + if (def != data)
394 + WREG32_PCIE(smnPCIE_LC_CNTL3, data);
395 ++#endif
396 + }
397 +
398 + const struct amdgpu_nbio_funcs nbio_v7_4_funcs = {
399 +diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
400 +index 9014f71d52ddf..8b20326c4c05a 100644
401 +--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
402 ++++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
403 +@@ -1507,6 +1507,11 @@ static int sdma_v4_0_start(struct amdgpu_device *adev)
404 + WREG32_SDMA(i, mmSDMA0_CNTL, temp);
405 +
406 + if (!amdgpu_sriov_vf(adev)) {
407 ++ ring = &adev->sdma.instance[i].ring;
408 ++ adev->nbio.funcs->sdma_doorbell_range(adev, i,
409 ++ ring->use_doorbell, ring->doorbell_index,
410 ++ adev->doorbell_index.sdma_doorbell_range);
411 ++
412 + /* unhalt engine */
413 + temp = RREG32_SDMA(i, mmSDMA0_F32_CNTL);
414 + temp = REG_SET_FIELD(temp, SDMA0_F32_CNTL, HALT, 0);
415 +diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c
416 +index bdb47ae96ce6a..7d5ff50435e58 100644
417 +--- a/drivers/gpu/drm/amd/amdgpu/soc15.c
418 ++++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
419 +@@ -1416,25 +1416,6 @@ static int soc15_common_sw_fini(void *handle)
420 + return 0;
421 + }
422 +
423 +-static void soc15_doorbell_range_init(struct amdgpu_device *adev)
424 +-{
425 +- int i;
426 +- struct amdgpu_ring *ring;
427 +-
428 +- /* sdma/ih doorbell range are programed by hypervisor */
429 +- if (!amdgpu_sriov_vf(adev)) {
430 +- for (i = 0; i < adev->sdma.num_instances; i++) {
431 +- ring = &adev->sdma.instance[i].ring;
432 +- adev->nbio.funcs->sdma_doorbell_range(adev, i,
433 +- ring->use_doorbell, ring->doorbell_index,
434 +- adev->doorbell_index.sdma_doorbell_range);
435 +- }
436 +-
437 +- adev->nbio.funcs->ih_doorbell_range(adev, adev->irq.ih.use_doorbell,
438 +- adev->irq.ih.doorbell_index);
439 +- }
440 +-}
441 +-
442 + static int soc15_common_hw_init(void *handle)
443 + {
444 + struct amdgpu_device *adev = (struct amdgpu_device *)handle;
445 +@@ -1454,12 +1435,6 @@ static int soc15_common_hw_init(void *handle)
446 +
447 + /* enable the doorbell aperture */
448 + soc15_enable_doorbell_aperture(adev, true);
449 +- /* HW doorbell routing policy: doorbell writing not
450 +- * in SDMA/IH/MM/ACV range will be routed to CP. So
451 +- * we need to init SDMA/IH/MM/ACV doorbell range prior
452 +- * to CP ip block init and ring test.
453 +- */
454 +- soc15_doorbell_range_init(adev);
455 +
456 + return 0;
457 + }
458 +diff --git a/drivers/gpu/drm/amd/amdgpu/vega10_ih.c b/drivers/gpu/drm/amd/amdgpu/vega10_ih.c
459 +index a9ca6988009e3..73728fa859970 100644
460 +--- a/drivers/gpu/drm/amd/amdgpu/vega10_ih.c
461 ++++ b/drivers/gpu/drm/amd/amdgpu/vega10_ih.c
462 +@@ -289,6 +289,10 @@ static int vega10_ih_irq_init(struct amdgpu_device *adev)
463 + }
464 + }
465 +
466 ++ if (!amdgpu_sriov_vf(adev))
467 ++ adev->nbio.funcs->ih_doorbell_range(adev, adev->irq.ih.use_doorbell,
468 ++ adev->irq.ih.doorbell_index);
469 ++
470 + pci_set_master(adev->pdev);
471 +
472 + /* enable interrupts */
473 +diff --git a/drivers/gpu/drm/amd/amdgpu/vega20_ih.c b/drivers/gpu/drm/amd/amdgpu/vega20_ih.c
474 +index f51dfc38ac656..ac34af4cb178c 100644
475 +--- a/drivers/gpu/drm/amd/amdgpu/vega20_ih.c
476 ++++ b/drivers/gpu/drm/amd/amdgpu/vega20_ih.c
477 +@@ -340,6 +340,10 @@ static int vega20_ih_irq_init(struct amdgpu_device *adev)
478 + }
479 + }
480 +
481 ++ if (!amdgpu_sriov_vf(adev))
482 ++ adev->nbio.funcs->ih_doorbell_range(adev, adev->irq.ih.use_doorbell,
483 ++ adev->irq.ih.doorbell_index);
484 ++
485 + pci_set_master(adev->pdev);
486 +
487 + /* enable interrupts */
488 +diff --git a/drivers/gpu/drm/meson/meson_plane.c b/drivers/gpu/drm/meson/meson_plane.c
489 +index 8640a8a8a4691..44aa526294439 100644
490 +--- a/drivers/gpu/drm/meson/meson_plane.c
491 ++++ b/drivers/gpu/drm/meson/meson_plane.c
492 +@@ -168,7 +168,7 @@ static void meson_plane_atomic_update(struct drm_plane *plane,
493 +
494 + /* Enable OSD and BLK0, set max global alpha */
495 + priv->viu.osd1_ctrl_stat = OSD_ENABLE |
496 +- (0xFF << OSD_GLOBAL_ALPHA_SHIFT) |
497 ++ (0x100 << OSD_GLOBAL_ALPHA_SHIFT) |
498 + OSD_BLK0_ENABLE;
499 +
500 + priv->viu.osd1_ctrl_stat2 = readl(priv->io_base +
501 +diff --git a/drivers/gpu/drm/meson/meson_viu.c b/drivers/gpu/drm/meson/meson_viu.c
502 +index bb7e109534de1..d4b907889a21d 100644
503 +--- a/drivers/gpu/drm/meson/meson_viu.c
504 ++++ b/drivers/gpu/drm/meson/meson_viu.c
505 +@@ -94,7 +94,7 @@ static void meson_viu_set_g12a_osd1_matrix(struct meson_drm *priv,
506 + priv->io_base + _REG(VPP_WRAP_OSD1_MATRIX_COEF11_12));
507 + writel(((m[9] & 0x1fff) << 16) | (m[10] & 0x1fff),
508 + priv->io_base + _REG(VPP_WRAP_OSD1_MATRIX_COEF20_21));
509 +- writel((m[11] & 0x1fff) << 16,
510 ++ writel((m[11] & 0x1fff),
511 + priv->io_base + _REG(VPP_WRAP_OSD1_MATRIX_COEF22));
512 +
513 + writel(((m[18] & 0xfff) << 16) | (m[19] & 0xfff),
514 +diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
515 +index 194af7f607a6e..be36dd060a2b4 100644
516 +--- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c
517 ++++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
518 +@@ -132,6 +132,17 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev)
519 + return PTR_ERR(opp);
520 +
521 + panfrost_devfreq_profile.initial_freq = cur_freq;
522 ++
523 ++ /*
524 ++ * Set the recommend OPP this will enable and configure the regulator
525 ++ * if any and will avoid a switch off by regulator_late_cleanup()
526 ++ */
527 ++ ret = dev_pm_opp_set_opp(dev, opp);
528 ++ if (ret) {
529 ++ DRM_DEV_ERROR(dev, "Couldn't set recommended OPP\n");
530 ++ return ret;
531 ++ }
532 ++
533 + dev_pm_opp_put(opp);
534 +
535 + /*
536 +diff --git a/drivers/gpu/drm/tegra/vic.c b/drivers/gpu/drm/tegra/vic.c
537 +index da4af53719917..d3e2fab910860 100644
538 +--- a/drivers/gpu/drm/tegra/vic.c
539 ++++ b/drivers/gpu/drm/tegra/vic.c
540 +@@ -275,7 +275,7 @@ cleanup:
541 + }
542 +
543 +
544 +-static int vic_runtime_resume(struct device *dev)
545 ++static int __maybe_unused vic_runtime_resume(struct device *dev)
546 + {
547 + struct vic *vic = dev_get_drvdata(dev);
548 + int err;
549 +@@ -309,7 +309,7 @@ disable:
550 + return err;
551 + }
552 +
553 +-static int vic_runtime_suspend(struct device *dev)
554 ++static int __maybe_unused vic_runtime_suspend(struct device *dev)
555 + {
556 + struct vic *vic = dev_get_drvdata(dev);
557 + int err;
558 +diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
559 +index 3e1aab1e894e3..15c90441285cf 100644
560 +--- a/drivers/net/usb/qmi_wwan.c
561 ++++ b/drivers/net/usb/qmi_wwan.c
562 +@@ -1085,6 +1085,7 @@ static const struct usb_device_id products[] = {
563 + {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0512)}, /* Quectel EG12/EM12 */
564 + {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0620)}, /* Quectel EM160R-GL */
565 + {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0800)}, /* Quectel RM500Q-GL */
566 ++ {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0801)}, /* Quectel RM520N */
567 +
568 + /* 3. Combined interface devices matching on interface number */
569 + {QMI_FIXED_INTF(0x0408, 0xea42, 4)}, /* Yota / Megafon M100-1 */
570 +diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
571 +index feddf4045a8ca..52a2574b7d13b 100644
572 +--- a/drivers/net/wireless/mac80211_hwsim.c
573 ++++ b/drivers/net/wireless/mac80211_hwsim.c
574 +@@ -4278,6 +4278,10 @@ static int hwsim_virtio_handle_cmd(struct sk_buff *skb)
575 +
576 + nlh = nlmsg_hdr(skb);
577 + gnlh = nlmsg_data(nlh);
578 ++
579 ++ if (skb->len < nlh->nlmsg_len)
580 ++ return -EINVAL;
581 ++
582 + err = genlmsg_parse(nlh, &hwsim_genl_family, tb, HWSIM_ATTR_MAX,
583 + hwsim_genl_policy, NULL);
584 + if (err) {
585 +@@ -4320,7 +4324,8 @@ static void hwsim_virtio_rx_work(struct work_struct *work)
586 + spin_unlock_irqrestore(&hwsim_virtio_lock, flags);
587 +
588 + skb->data = skb->head;
589 +- skb_set_tail_pointer(skb, len);
590 ++ skb_reset_tail_pointer(skb);
591 ++ skb_put(skb, len);
592 + hwsim_virtio_handle_cmd(skb);
593 +
594 + spin_lock_irqsave(&hwsim_virtio_lock, flags);
595 +diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
596 +index d245628b15dd4..338171c978cc1 100644
597 +--- a/drivers/of/fdt.c
598 ++++ b/drivers/of/fdt.c
599 +@@ -313,7 +313,7 @@ static int unflatten_dt_nodes(const void *blob,
600 + for (offset = 0;
601 + offset >= 0 && depth >= initial_depth;
602 + offset = fdt_next_node(blob, offset, &depth)) {
603 +- if (WARN_ON_ONCE(depth >= FDT_MAX_DEPTH))
604 ++ if (WARN_ON_ONCE(depth >= FDT_MAX_DEPTH - 1))
605 + continue;
606 +
607 + if (!IS_ENABLED(CONFIG_OF_KOBJ) &&
608 +diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c
609 +index f69ab90b5e22d..6052f264bbb0a 100644
610 +--- a/drivers/parisc/ccio-dma.c
611 ++++ b/drivers/parisc/ccio-dma.c
612 +@@ -1546,6 +1546,7 @@ static int __init ccio_probe(struct parisc_device *dev)
613 + }
614 + ccio_ioc_init(ioc);
615 + if (ccio_init_resources(ioc)) {
616 ++ iounmap(ioc->ioc_regs);
617 + kfree(ioc);
618 + return -ENOMEM;
619 + }
620 +diff --git a/drivers/pinctrl/qcom/pinctrl-sc8180x.c b/drivers/pinctrl/qcom/pinctrl-sc8180x.c
621 +index 0d9654b4ab60b..a4725ff12da01 100644
622 +--- a/drivers/pinctrl/qcom/pinctrl-sc8180x.c
623 ++++ b/drivers/pinctrl/qcom/pinctrl-sc8180x.c
624 +@@ -530,10 +530,10 @@ DECLARE_MSM_GPIO_PINS(187);
625 + DECLARE_MSM_GPIO_PINS(188);
626 + DECLARE_MSM_GPIO_PINS(189);
627 +
628 +-static const unsigned int sdc2_clk_pins[] = { 190 };
629 +-static const unsigned int sdc2_cmd_pins[] = { 191 };
630 +-static const unsigned int sdc2_data_pins[] = { 192 };
631 +-static const unsigned int ufs_reset_pins[] = { 193 };
632 ++static const unsigned int ufs_reset_pins[] = { 190 };
633 ++static const unsigned int sdc2_clk_pins[] = { 191 };
634 ++static const unsigned int sdc2_cmd_pins[] = { 192 };
635 ++static const unsigned int sdc2_data_pins[] = { 193 };
636 +
637 + enum sc8180x_functions {
638 + msm_mux_adsp_ext,
639 +@@ -1582,7 +1582,7 @@ static const int sc8180x_acpi_reserved_gpios[] = {
640 + static const struct msm_gpio_wakeirq_map sc8180x_pdc_map[] = {
641 + { 3, 31 }, { 5, 32 }, { 8, 33 }, { 9, 34 }, { 10, 100 }, { 12, 104 },
642 + { 24, 37 }, { 26, 38 }, { 27, 41 }, { 28, 42 }, { 30, 39 }, { 36, 43 },
643 +- { 37, 43 }, { 38, 45 }, { 39, 118 }, { 39, 125 }, { 41, 47 },
644 ++ { 37, 44 }, { 38, 45 }, { 39, 118 }, { 39, 125 }, { 41, 47 },
645 + { 42, 48 }, { 46, 50 }, { 47, 49 }, { 48, 51 }, { 49, 53 }, { 50, 52 },
646 + { 51, 116 }, { 51, 123 }, { 53, 54 }, { 54, 55 }, { 55, 56 },
647 + { 56, 57 }, { 58, 58 }, { 60, 60 }, { 68, 62 }, { 70, 63 }, { 76, 86 },
648 +diff --git a/drivers/pinctrl/sunxi/pinctrl-sun50i-a100-r.c b/drivers/pinctrl/sunxi/pinctrl-sun50i-a100-r.c
649 +index 21054fcacd345..18088f6f44b23 100644
650 +--- a/drivers/pinctrl/sunxi/pinctrl-sun50i-a100-r.c
651 ++++ b/drivers/pinctrl/sunxi/pinctrl-sun50i-a100-r.c
652 +@@ -98,7 +98,7 @@ MODULE_DEVICE_TABLE(of, a100_r_pinctrl_match);
653 + static struct platform_driver a100_r_pinctrl_driver = {
654 + .probe = a100_r_pinctrl_probe,
655 + .driver = {
656 +- .name = "sun50iw10p1-r-pinctrl",
657 ++ .name = "sun50i-a100-r-pinctrl",
658 + .of_match_table = a100_r_pinctrl_match,
659 + },
660 + };
661 +diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c
662 +index aa55cfca9e400..a9a0bd918d1e2 100644
663 +--- a/drivers/regulator/pfuze100-regulator.c
664 ++++ b/drivers/regulator/pfuze100-regulator.c
665 +@@ -763,7 +763,7 @@ static int pfuze100_regulator_probe(struct i2c_client *client,
666 + ((pfuze_chip->chip_id == PFUZE3000) ? "3000" : "3001"))));
667 +
668 + memcpy(pfuze_chip->regulator_descs, pfuze_chip->pfuze_regulators,
669 +- sizeof(pfuze_chip->regulator_descs));
670 ++ regulator_num * sizeof(struct pfuze_regulator));
671 +
672 + ret = pfuze_parse_regulators_dt(pfuze_chip);
673 + if (ret)
674 +diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
675 +index 7da8e4c845df8..41313fcaf84a3 100644
676 +--- a/drivers/scsi/lpfc/lpfc_scsi.c
677 ++++ b/drivers/scsi/lpfc/lpfc_scsi.c
678 +@@ -4278,7 +4278,7 @@ lpfc_fcp_io_cmd_wqe_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn,
679 + lpfc_cmd->result == IOERR_NO_RESOURCES ||
680 + lpfc_cmd->result == IOERR_ABORT_REQUESTED ||
681 + lpfc_cmd->result == IOERR_SLER_CMD_RCV_FAILURE) {
682 +- cmd->result = DID_REQUEUE << 16;
683 ++ cmd->result = DID_TRANSPORT_DISRUPTED << 16;
684 + break;
685 + }
686 + if ((lpfc_cmd->result == IOERR_RX_DMA_FAILED ||
687 +@@ -4567,7 +4567,7 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
688 + lpfc_cmd->result == IOERR_NO_RESOURCES ||
689 + lpfc_cmd->result == IOERR_ABORT_REQUESTED ||
690 + lpfc_cmd->result == IOERR_SLER_CMD_RCV_FAILURE) {
691 +- cmd->result = DID_REQUEUE << 16;
692 ++ cmd->result = DID_TRANSPORT_DISRUPTED << 16;
693 + break;
694 + }
695 + if ((lpfc_cmd->result == IOERR_RX_DMA_FAILED ||
696 +diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
697 +index dd350c5908804..c0a86558ceaa1 100644
698 +--- a/drivers/tty/serial/atmel_serial.c
699 ++++ b/drivers/tty/serial/atmel_serial.c
700 +@@ -295,20 +295,16 @@ static int atmel_config_rs485(struct uart_port *port,
701 +
702 + mode = atmel_uart_readl(port, ATMEL_US_MR);
703 +
704 +- /* Resetting serial mode to RS232 (0x0) */
705 +- mode &= ~ATMEL_US_USMODE;
706 +-
707 +- port->rs485 = *rs485conf;
708 +-
709 + if (rs485conf->flags & SER_RS485_ENABLED) {
710 + dev_dbg(port->dev, "Setting UART to RS485\n");
711 +- if (port->rs485.flags & SER_RS485_RX_DURING_TX)
712 ++ if (rs485conf->flags & SER_RS485_RX_DURING_TX)
713 + atmel_port->tx_done_mask = ATMEL_US_TXRDY;
714 + else
715 + atmel_port->tx_done_mask = ATMEL_US_TXEMPTY;
716 +
717 + atmel_uart_writel(port, ATMEL_US_TTGR,
718 + rs485conf->delay_rts_after_send);
719 ++ mode &= ~ATMEL_US_USMODE;
720 + mode |= ATMEL_US_USMODE_RS485;
721 + } else {
722 + dev_dbg(port->dev, "Setting UART to RS232\n");
723 +diff --git a/drivers/video/fbdev/i740fb.c b/drivers/video/fbdev/i740fb.c
724 +index ad5ced4ef972d..8fb4e01e1943f 100644
725 +--- a/drivers/video/fbdev/i740fb.c
726 ++++ b/drivers/video/fbdev/i740fb.c
727 +@@ -662,6 +662,9 @@ static int i740fb_decode_var(const struct fb_var_screeninfo *var,
728 +
729 + static int i740fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
730 + {
731 ++ if (!var->pixclock)
732 ++ return -EINVAL;
733 ++
734 + switch (var->bits_per_pixel) {
735 + case 8:
736 + var->red.offset = var->green.offset = var->blue.offset = 0;
737 +diff --git a/drivers/video/fbdev/pxa3xx-gcu.c b/drivers/video/fbdev/pxa3xx-gcu.c
738 +index 9421d14d0eb02..9e9888e40c573 100644
739 +--- a/drivers/video/fbdev/pxa3xx-gcu.c
740 ++++ b/drivers/video/fbdev/pxa3xx-gcu.c
741 +@@ -381,7 +381,7 @@ pxa3xx_gcu_write(struct file *file, const char *buff,
742 + struct pxa3xx_gcu_batch *buffer;
743 + struct pxa3xx_gcu_priv *priv = to_pxa3xx_gcu_priv(file);
744 +
745 +- int words = count / 4;
746 ++ size_t words = count / 4;
747 +
748 + /* Does not need to be atomic. There's a lock in user space,
749 + * but anyhow, this is just for statistics. */
750 +diff --git a/fs/afs/misc.c b/fs/afs/misc.c
751 +index 933e67fcdab1a..805328ca54284 100644
752 +--- a/fs/afs/misc.c
753 ++++ b/fs/afs/misc.c
754 +@@ -69,6 +69,7 @@ int afs_abort_to_error(u32 abort_code)
755 + /* Unified AFS error table */
756 + case UAEPERM: return -EPERM;
757 + case UAENOENT: return -ENOENT;
758 ++ case UAEAGAIN: return -EAGAIN;
759 + case UAEACCES: return -EACCES;
760 + case UAEBUSY: return -EBUSY;
761 + case UAEEXIST: return -EEXIST;
762 +diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
763 +index 70da1d27be3db..278634a63895d 100644
764 +--- a/fs/cifs/connect.c
765 ++++ b/fs/cifs/connect.c
766 +@@ -519,9 +519,6 @@ cifs_readv_from_socket(struct TCP_Server_Info *server, struct msghdr *smb_msg)
767 + int length = 0;
768 + int total_read;
769 +
770 +- smb_msg->msg_control = NULL;
771 +- smb_msg->msg_controllen = 0;
772 +-
773 + for (total_read = 0; msg_data_left(smb_msg); total_read += length) {
774 + try_to_freeze();
775 +
776 +@@ -572,7 +569,7 @@ int
777 + cifs_read_from_socket(struct TCP_Server_Info *server, char *buf,
778 + unsigned int to_read)
779 + {
780 +- struct msghdr smb_msg;
781 ++ struct msghdr smb_msg = {};
782 + struct kvec iov = {.iov_base = buf, .iov_len = to_read};
783 + iov_iter_kvec(&smb_msg.msg_iter, READ, &iov, 1, to_read);
784 +
785 +@@ -582,15 +579,13 @@ cifs_read_from_socket(struct TCP_Server_Info *server, char *buf,
786 + ssize_t
787 + cifs_discard_from_socket(struct TCP_Server_Info *server, size_t to_read)
788 + {
789 +- struct msghdr smb_msg;
790 ++ struct msghdr smb_msg = {};
791 +
792 + /*
793 + * iov_iter_discard already sets smb_msg.type and count and iov_offset
794 + * and cifs_readv_from_socket sets msg_control and msg_controllen
795 + * so little to initialize in struct msghdr
796 + */
797 +- smb_msg.msg_name = NULL;
798 +- smb_msg.msg_namelen = 0;
799 + iov_iter_discard(&smb_msg.msg_iter, READ, to_read);
800 +
801 + return cifs_readv_from_socket(server, &smb_msg);
802 +@@ -600,7 +595,7 @@ int
803 + cifs_read_page_from_socket(struct TCP_Server_Info *server, struct page *page,
804 + unsigned int page_offset, unsigned int to_read)
805 + {
806 +- struct msghdr smb_msg;
807 ++ struct msghdr smb_msg = {};
808 + struct bio_vec bv = {
809 + .bv_page = page, .bv_len = to_read, .bv_offset = page_offset};
810 + iov_iter_bvec(&smb_msg.msg_iter, READ, &bv, 1, to_read);
811 +diff --git a/fs/cifs/file.c b/fs/cifs/file.c
812 +index 3015a8b20bd99..2ef57bc054d2f 100644
813 +--- a/fs/cifs/file.c
814 ++++ b/fs/cifs/file.c
815 +@@ -3318,6 +3318,9 @@ static ssize_t __cifs_writev(
816 +
817 + ssize_t cifs_direct_writev(struct kiocb *iocb, struct iov_iter *from)
818 + {
819 ++ struct file *file = iocb->ki_filp;
820 ++
821 ++ cifs_revalidate_mapping(file->f_inode);
822 + return __cifs_writev(iocb, from, true);
823 + }
824 +
825 +diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
826 +index 61ea3d3f95b4a..514056605fa7a 100644
827 +--- a/fs/cifs/transport.c
828 ++++ b/fs/cifs/transport.c
829 +@@ -196,10 +196,6 @@ smb_send_kvec(struct TCP_Server_Info *server, struct msghdr *smb_msg,
830 +
831 + *sent = 0;
832 +
833 +- smb_msg->msg_name = (struct sockaddr *) &server->dstaddr;
834 +- smb_msg->msg_namelen = sizeof(struct sockaddr);
835 +- smb_msg->msg_control = NULL;
836 +- smb_msg->msg_controllen = 0;
837 + if (server->noblocksnd)
838 + smb_msg->msg_flags = MSG_DONTWAIT + MSG_NOSIGNAL;
839 + else
840 +@@ -311,7 +307,7 @@ __smb_send_rqst(struct TCP_Server_Info *server, int num_rqst,
841 + sigset_t mask, oldmask;
842 + size_t total_len = 0, sent, size;
843 + struct socket *ssocket = server->ssocket;
844 +- struct msghdr smb_msg;
845 ++ struct msghdr smb_msg = {};
846 + __be32 rfc1002_marker;
847 +
848 + if (cifs_rdma_enabled(server)) {
849 +diff --git a/fs/nfs/super.c b/fs/nfs/super.c
850 +index e65c83494c052..a847011f36c96 100644
851 +--- a/fs/nfs/super.c
852 ++++ b/fs/nfs/super.c
853 +@@ -1046,22 +1046,31 @@ static void nfs_fill_super(struct super_block *sb, struct nfs_fs_context *ctx)
854 + if (ctx->bsize)
855 + sb->s_blocksize = nfs_block_size(ctx->bsize, &sb->s_blocksize_bits);
856 +
857 +- if (server->nfs_client->rpc_ops->version != 2) {
858 +- /* The VFS shouldn't apply the umask to mode bits. We will do
859 +- * so ourselves when necessary.
860 ++ switch (server->nfs_client->rpc_ops->version) {
861 ++ case 2:
862 ++ sb->s_time_gran = 1000;
863 ++ sb->s_time_min = 0;
864 ++ sb->s_time_max = U32_MAX;
865 ++ break;
866 ++ case 3:
867 ++ /*
868 ++ * The VFS shouldn't apply the umask to mode bits.
869 ++ * We will do so ourselves when necessary.
870 + */
871 + sb->s_flags |= SB_POSIXACL;
872 + sb->s_time_gran = 1;
873 +- sb->s_export_op = &nfs_export_ops;
874 +- } else
875 +- sb->s_time_gran = 1000;
876 +-
877 +- if (server->nfs_client->rpc_ops->version != 4) {
878 + sb->s_time_min = 0;
879 + sb->s_time_max = U32_MAX;
880 +- } else {
881 ++ sb->s_export_op = &nfs_export_ops;
882 ++ break;
883 ++ case 4:
884 ++ sb->s_flags |= SB_POSIXACL;
885 ++ sb->s_time_gran = 1;
886 + sb->s_time_min = S64_MIN;
887 + sb->s_time_max = S64_MAX;
888 ++ if (server->caps & NFS_CAP_ATOMIC_OPEN_V1)
889 ++ sb->s_export_op = &nfs_export_ops;
890 ++ break;
891 + }
892 +
893 + sb->s_magic = NFS_SUPER_MAGIC;
894 +diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
895 +index 38b7e9ab48b84..725f8f13adb55 100644
896 +--- a/include/linux/kvm_host.h
897 ++++ b/include/linux/kvm_host.h
898 +@@ -1912,6 +1912,8 @@ static inline long kvm_arch_vcpu_async_ioctl(struct file *filp,
899 + void kvm_arch_mmu_notifier_invalidate_range(struct kvm *kvm,
900 + unsigned long start, unsigned long end);
901 +
902 ++void kvm_arch_guest_memory_reclaimed(struct kvm *kvm);
903 ++
904 + #ifdef CONFIG_HAVE_KVM_VCPU_RUN_PID_CHANGE
905 + int kvm_arch_vcpu_run_pid_change(struct kvm_vcpu *vcpu);
906 + #else
907 +diff --git a/include/linux/of_device.h b/include/linux/of_device.h
908 +index 1d7992a02e36e..1a803e4335d30 100644
909 +--- a/include/linux/of_device.h
910 ++++ b/include/linux/of_device.h
911 +@@ -101,8 +101,9 @@ static inline struct device_node *of_cpu_device_node_get(int cpu)
912 + }
913 +
914 + static inline int of_dma_configure_id(struct device *dev,
915 +- struct device_node *np,
916 +- bool force_dma)
917 ++ struct device_node *np,
918 ++ bool force_dma,
919 ++ const u32 *id)
920 + {
921 + return 0;
922 + }
923 +diff --git a/include/net/xfrm.h b/include/net/xfrm.h
924 +index 65242172e41c2..73030094c6e6f 100644
925 +--- a/include/net/xfrm.h
926 ++++ b/include/net/xfrm.h
927 +@@ -1190,6 +1190,8 @@ int __xfrm_sk_clone_policy(struct sock *sk, const struct sock *osk);
928 +
929 + static inline int xfrm_sk_clone_policy(struct sock *sk, const struct sock *osk)
930 + {
931 ++ if (!sk_fullsock(osk))
932 ++ return 0;
933 + sk->sk_policy[0] = NULL;
934 + sk->sk_policy[1] = NULL;
935 + if (unlikely(osk->sk_policy[0] || osk->sk_policy[1]))
936 +diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c
937 +index 58900dc92ac98..ee8b3d80f19ee 100644
938 +--- a/kernel/cgroup/cgroup-v1.c
939 ++++ b/kernel/cgroup/cgroup-v1.c
940 +@@ -59,6 +59,7 @@ int cgroup_attach_task_all(struct task_struct *from, struct task_struct *tsk)
941 + int retval = 0;
942 +
943 + mutex_lock(&cgroup_mutex);
944 ++ cpus_read_lock();
945 + percpu_down_write(&cgroup_threadgroup_rwsem);
946 + for_each_root(root) {
947 + struct cgroup *from_cgrp;
948 +@@ -75,6 +76,7 @@ int cgroup_attach_task_all(struct task_struct *from, struct task_struct *tsk)
949 + break;
950 + }
951 + percpu_up_write(&cgroup_threadgroup_rwsem);
952 ++ cpus_read_unlock();
953 + mutex_unlock(&cgroup_mutex);
954 +
955 + return retval;
956 +diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
957 +index 7aff0179b3c2d..ef786c6232df7 100644
958 +--- a/net/ipv4/ip_output.c
959 ++++ b/net/ipv4/ip_output.c
960 +@@ -1704,7 +1704,7 @@ void ip_send_unicast_reply(struct sock *sk, struct sk_buff *skb,
961 + tcp_hdr(skb)->source, tcp_hdr(skb)->dest,
962 + arg->uid);
963 + security_skb_classify_flow(skb, flowi4_to_flowi_common(&fl4));
964 +- rt = ip_route_output_key(net, &fl4);
965 ++ rt = ip_route_output_flow(net, &fl4, sk);
966 + if (IS_ERR(rt))
967 + return;
968 +
969 +diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
970 +index dae0776c49487..88a45d5650da4 100644
971 +--- a/net/ipv4/tcp_ipv4.c
972 ++++ b/net/ipv4/tcp_ipv4.c
973 +@@ -817,6 +817,7 @@ static void tcp_v4_send_reset(const struct sock *sk, struct sk_buff *skb)
974 + ctl_sk->sk_priority = (sk->sk_state == TCP_TIME_WAIT) ?
975 + inet_twsk(sk)->tw_priority : sk->sk_priority;
976 + transmit_time = tcp_transmit_time(sk);
977 ++ xfrm_sk_clone_policy(ctl_sk, sk);
978 + }
979 + ip_send_unicast_reply(ctl_sk,
980 + skb, &TCP_SKB_CB(skb)->header.h4.opt,
981 +@@ -825,6 +826,7 @@ static void tcp_v4_send_reset(const struct sock *sk, struct sk_buff *skb)
982 + transmit_time);
983 +
984 + ctl_sk->sk_mark = 0;
985 ++ xfrm_sk_free_policy(ctl_sk);
986 + sock_net_set(ctl_sk, &init_net);
987 + __TCP_INC_STATS(net, TCP_MIB_OUTSEGS);
988 + __TCP_INC_STATS(net, TCP_MIB_OUTRSTS);
989 +diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
990 +index 8ab39cf57d435..66d00368db828 100644
991 +--- a/net/ipv6/tcp_ipv6.c
992 ++++ b/net/ipv6/tcp_ipv6.c
993 +@@ -1001,7 +1001,10 @@ static void tcp_v6_send_response(const struct sock *sk, struct sk_buff *skb, u32
994 + * Underlying function will use this to retrieve the network
995 + * namespace
996 + */
997 +- dst = ip6_dst_lookup_flow(sock_net(ctl_sk), ctl_sk, &fl6, NULL);
998 ++ if (sk && sk->sk_state != TCP_TIME_WAIT)
999 ++ dst = ip6_dst_lookup_flow(net, sk, &fl6, NULL); /*sk's xfrm_policy can be referred*/
1000 ++ else
1001 ++ dst = ip6_dst_lookup_flow(net, ctl_sk, &fl6, NULL);
1002 + if (!IS_ERR(dst)) {
1003 + skb_dst_set(buff, dst);
1004 + ip6_xmit(ctl_sk, buff, &fl6, fl6.flowi6_mark, NULL,
1005 +diff --git a/net/rxrpc/call_event.c b/net/rxrpc/call_event.c
1006 +index f8ecad2b730e8..2a93e7b5fbd05 100644
1007 +--- a/net/rxrpc/call_event.c
1008 ++++ b/net/rxrpc/call_event.c
1009 +@@ -166,7 +166,7 @@ static void rxrpc_resend(struct rxrpc_call *call, unsigned long now_j)
1010 + _enter("{%d,%d}", call->tx_hard_ack, call->tx_top);
1011 +
1012 + now = ktime_get_real();
1013 +- max_age = ktime_sub(now, jiffies_to_usecs(call->peer->rto_j));
1014 ++ max_age = ktime_sub_us(now, jiffies_to_usecs(call->peer->rto_j));
1015 +
1016 + spin_lock_bh(&call->lock);
1017 +
1018 +diff --git a/net/rxrpc/local_object.c b/net/rxrpc/local_object.c
1019 +index ef43fe8bdd2ff..1d15940f61d7e 100644
1020 +--- a/net/rxrpc/local_object.c
1021 ++++ b/net/rxrpc/local_object.c
1022 +@@ -406,6 +406,9 @@ static void rxrpc_local_processor(struct work_struct *work)
1023 + container_of(work, struct rxrpc_local, processor);
1024 + bool again;
1025 +
1026 ++ if (local->dead)
1027 ++ return;
1028 ++
1029 + trace_rxrpc_local(local->debug_id, rxrpc_local_processing,
1030 + atomic_read(&local->usage), NULL);
1031 +
1032 +diff --git a/scripts/mksysmap b/scripts/mksysmap
1033 +index 9aa23d15862a0..ad8bbc52267d0 100755
1034 +--- a/scripts/mksysmap
1035 ++++ b/scripts/mksysmap
1036 +@@ -41,4 +41,4 @@
1037 + # so we just ignore them to let readprofile continue to work.
1038 + # (At least sparc64 has __crc_ in the middle).
1039 +
1040 +-$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\( \.L\)' > $2
1041 ++$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\( \.L\)\|\( L0\)' > $2
1042 +diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
1043 +index 773f4903550a0..f0e556f2ccf69 100644
1044 +--- a/sound/pci/hda/hda_tegra.c
1045 ++++ b/sound/pci/hda/hda_tegra.c
1046 +@@ -451,7 +451,8 @@ MODULE_DEVICE_TABLE(of, hda_tegra_match);
1047 + static int hda_tegra_probe(struct platform_device *pdev)
1048 + {
1049 + const unsigned int driver_flags = AZX_DCAPS_CORBRP_SELF_CLEAR |
1050 +- AZX_DCAPS_PM_RUNTIME;
1051 ++ AZX_DCAPS_PM_RUNTIME |
1052 ++ AZX_DCAPS_4K_BDLE_BOUNDARY;
1053 + struct snd_card *card;
1054 + struct azx *chip;
1055 + struct hda_tegra *hda;
1056 +diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
1057 +index 61df4d33c48ff..7f340f18599c9 100644
1058 +--- a/sound/pci/hda/patch_sigmatel.c
1059 ++++ b/sound/pci/hda/patch_sigmatel.c
1060 +@@ -209,6 +209,7 @@ struct sigmatel_spec {
1061 +
1062 + /* beep widgets */
1063 + hda_nid_t anabeep_nid;
1064 ++ bool beep_power_on;
1065 +
1066 + /* SPDIF-out mux */
1067 + const char * const *spdif_labels;
1068 +@@ -4443,6 +4444,28 @@ static int stac_suspend(struct hda_codec *codec)
1069 +
1070 + return 0;
1071 + }
1072 ++
1073 ++static int stac_check_power_status(struct hda_codec *codec, hda_nid_t nid)
1074 ++{
1075 ++#ifdef CONFIG_SND_HDA_INPUT_BEEP
1076 ++ struct sigmatel_spec *spec = codec->spec;
1077 ++#endif
1078 ++ int ret = snd_hda_gen_check_power_status(codec, nid);
1079 ++
1080 ++#ifdef CONFIG_SND_HDA_INPUT_BEEP
1081 ++ if (nid == spec->gen.beep_nid && codec->beep) {
1082 ++ if (codec->beep->enabled != spec->beep_power_on) {
1083 ++ spec->beep_power_on = codec->beep->enabled;
1084 ++ if (spec->beep_power_on)
1085 ++ snd_hda_power_up_pm(codec);
1086 ++ else
1087 ++ snd_hda_power_down_pm(codec);
1088 ++ }
1089 ++ ret |= spec->beep_power_on;
1090 ++ }
1091 ++#endif
1092 ++ return ret;
1093 ++}
1094 + #else
1095 + #define stac_suspend NULL
1096 + #endif /* CONFIG_PM */
1097 +@@ -4455,6 +4478,7 @@ static const struct hda_codec_ops stac_patch_ops = {
1098 + .unsol_event = snd_hda_jack_unsol_event,
1099 + #ifdef CONFIG_PM
1100 + .suspend = stac_suspend,
1101 ++ .check_power_status = stac_check_power_status,
1102 + #endif
1103 + };
1104 +
1105 +diff --git a/sound/soc/codecs/nau8824.c b/sound/soc/codecs/nau8824.c
1106 +index f7018f2dd21fd..27589900f4fbf 100644
1107 +--- a/sound/soc/codecs/nau8824.c
1108 ++++ b/sound/soc/codecs/nau8824.c
1109 +@@ -1042,6 +1042,7 @@ static int nau8824_hw_params(struct snd_pcm_substream *substream,
1110 + struct snd_soc_component *component = dai->component;
1111 + struct nau8824 *nau8824 = snd_soc_component_get_drvdata(component);
1112 + unsigned int val_len = 0, osr, ctrl_val, bclk_fs, bclk_div;
1113 ++ int err = -EINVAL;
1114 +
1115 + nau8824_sema_acquire(nau8824, HZ);
1116 +
1117 +@@ -1058,7 +1059,7 @@ static int nau8824_hw_params(struct snd_pcm_substream *substream,
1118 + osr &= NAU8824_DAC_OVERSAMPLE_MASK;
1119 + if (nau8824_clock_check(nau8824, substream->stream,
1120 + nau8824->fs, osr))
1121 +- return -EINVAL;
1122 ++ goto error;
1123 + regmap_update_bits(nau8824->regmap, NAU8824_REG_CLK_DIVIDER,
1124 + NAU8824_CLK_DAC_SRC_MASK,
1125 + osr_dac_sel[osr].clk_src << NAU8824_CLK_DAC_SRC_SFT);
1126 +@@ -1068,7 +1069,7 @@ static int nau8824_hw_params(struct snd_pcm_substream *substream,
1127 + osr &= NAU8824_ADC_SYNC_DOWN_MASK;
1128 + if (nau8824_clock_check(nau8824, substream->stream,
1129 + nau8824->fs, osr))
1130 +- return -EINVAL;
1131 ++ goto error;
1132 + regmap_update_bits(nau8824->regmap, NAU8824_REG_CLK_DIVIDER,
1133 + NAU8824_CLK_ADC_SRC_MASK,
1134 + osr_adc_sel[osr].clk_src << NAU8824_CLK_ADC_SRC_SFT);
1135 +@@ -1089,7 +1090,7 @@ static int nau8824_hw_params(struct snd_pcm_substream *substream,
1136 + else if (bclk_fs <= 256)
1137 + bclk_div = 0;
1138 + else
1139 +- return -EINVAL;
1140 ++ goto error;
1141 + regmap_update_bits(nau8824->regmap,
1142 + NAU8824_REG_PORT0_I2S_PCM_CTRL_2,
1143 + NAU8824_I2S_LRC_DIV_MASK | NAU8824_I2S_BLK_DIV_MASK,
1144 +@@ -1110,15 +1111,17 @@ static int nau8824_hw_params(struct snd_pcm_substream *substream,
1145 + val_len |= NAU8824_I2S_DL_32;
1146 + break;
1147 + default:
1148 +- return -EINVAL;
1149 ++ goto error;
1150 + }
1151 +
1152 + regmap_update_bits(nau8824->regmap, NAU8824_REG_PORT0_I2S_PCM_CTRL_1,
1153 + NAU8824_I2S_DL_MASK, val_len);
1154 ++ err = 0;
1155 +
1156 ++ error:
1157 + nau8824_sema_release(nau8824);
1158 +
1159 +- return 0;
1160 ++ return err;
1161 + }
1162 +
1163 + static int nau8824_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
1164 +@@ -1127,8 +1130,6 @@ static int nau8824_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
1165 + struct nau8824 *nau8824 = snd_soc_component_get_drvdata(component);
1166 + unsigned int ctrl1_val = 0, ctrl2_val = 0;
1167 +
1168 +- nau8824_sema_acquire(nau8824, HZ);
1169 +-
1170 + switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
1171 + case SND_SOC_DAIFMT_CBM_CFM:
1172 + ctrl2_val |= NAU8824_I2S_MS_MASTER;
1173 +@@ -1170,6 +1171,8 @@ static int nau8824_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
1174 + return -EINVAL;
1175 + }
1176 +
1177 ++ nau8824_sema_acquire(nau8824, HZ);
1178 ++
1179 + regmap_update_bits(nau8824->regmap, NAU8824_REG_PORT0_I2S_PCM_CTRL_1,
1180 + NAU8824_I2S_DF_MASK | NAU8824_I2S_BP_MASK |
1181 + NAU8824_I2S_PCMB_EN, ctrl1_val);
1182 +diff --git a/tools/include/uapi/asm/errno.h b/tools/include/uapi/asm/errno.h
1183 +index d30439b4b8ab4..869379f91fe48 100644
1184 +--- a/tools/include/uapi/asm/errno.h
1185 ++++ b/tools/include/uapi/asm/errno.h
1186 +@@ -9,8 +9,8 @@
1187 + #include "../../../arch/alpha/include/uapi/asm/errno.h"
1188 + #elif defined(__mips__)
1189 + #include "../../../arch/mips/include/uapi/asm/errno.h"
1190 +-#elif defined(__xtensa__)
1191 +-#include "../../../arch/xtensa/include/uapi/asm/errno.h"
1192 ++#elif defined(__hppa__)
1193 ++#include "../../../arch/parisc/include/uapi/asm/errno.h"
1194 + #else
1195 + #include <asm-generic/errno.h>
1196 + #endif
1197 +diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
1198 +index 86fc429a0e438..3ae5f6a3eae49 100644
1199 +--- a/virt/kvm/kvm_main.c
1200 ++++ b/virt/kvm/kvm_main.c
1201 +@@ -162,6 +162,10 @@ __weak void kvm_arch_mmu_notifier_invalidate_range(struct kvm *kvm,
1202 + {
1203 + }
1204 +
1205 ++__weak void kvm_arch_guest_memory_reclaimed(struct kvm *kvm)
1206 ++{
1207 ++}
1208 ++
1209 + bool kvm_is_zone_device_pfn(kvm_pfn_t pfn)
1210 + {
1211 + /*
1212 +@@ -353,6 +357,12 @@ void kvm_reload_remote_mmus(struct kvm *kvm)
1213 + kvm_make_all_cpus_request(kvm, KVM_REQ_MMU_RELOAD);
1214 + }
1215 +
1216 ++static void kvm_flush_shadow_all(struct kvm *kvm)
1217 ++{
1218 ++ kvm_arch_flush_shadow_all(kvm);
1219 ++ kvm_arch_guest_memory_reclaimed(kvm);
1220 ++}
1221 ++
1222 + #ifdef KVM_ARCH_NR_OBJS_PER_MEMORY_CACHE
1223 + static inline void *mmu_memory_cache_alloc_obj(struct kvm_mmu_memory_cache *mc,
1224 + gfp_t gfp_flags)
1225 +@@ -469,12 +479,15 @@ typedef bool (*hva_handler_t)(struct kvm *kvm, struct kvm_gfn_range *range);
1226 + typedef void (*on_lock_fn_t)(struct kvm *kvm, unsigned long start,
1227 + unsigned long end);
1228 +
1229 ++typedef void (*on_unlock_fn_t)(struct kvm *kvm);
1230 ++
1231 + struct kvm_hva_range {
1232 + unsigned long start;
1233 + unsigned long end;
1234 + pte_t pte;
1235 + hva_handler_t handler;
1236 + on_lock_fn_t on_lock;
1237 ++ on_unlock_fn_t on_unlock;
1238 + bool flush_on_ret;
1239 + bool may_block;
1240 + };
1241 +@@ -551,8 +564,11 @@ static __always_inline int __kvm_handle_hva_range(struct kvm *kvm,
1242 + if (range->flush_on_ret && ret)
1243 + kvm_flush_remote_tlbs(kvm);
1244 +
1245 +- if (locked)
1246 ++ if (locked) {
1247 + KVM_MMU_UNLOCK(kvm);
1248 ++ if (!IS_KVM_NULL_FN(range->on_unlock))
1249 ++ range->on_unlock(kvm);
1250 ++ }
1251 +
1252 + srcu_read_unlock(&kvm->srcu, idx);
1253 +
1254 +@@ -573,6 +589,7 @@ static __always_inline int kvm_handle_hva_range(struct mmu_notifier *mn,
1255 + .pte = pte,
1256 + .handler = handler,
1257 + .on_lock = (void *)kvm_null_fn,
1258 ++ .on_unlock = (void *)kvm_null_fn,
1259 + .flush_on_ret = true,
1260 + .may_block = false,
1261 + };
1262 +@@ -592,6 +609,7 @@ static __always_inline int kvm_handle_hva_range_no_flush(struct mmu_notifier *mn
1263 + .pte = __pte(0),
1264 + .handler = handler,
1265 + .on_lock = (void *)kvm_null_fn,
1266 ++ .on_unlock = (void *)kvm_null_fn,
1267 + .flush_on_ret = false,
1268 + .may_block = false,
1269 + };
1270 +@@ -660,6 +678,7 @@ static int kvm_mmu_notifier_invalidate_range_start(struct mmu_notifier *mn,
1271 + .pte = __pte(0),
1272 + .handler = kvm_unmap_gfn_range,
1273 + .on_lock = kvm_inc_notifier_count,
1274 ++ .on_unlock = kvm_arch_guest_memory_reclaimed,
1275 + .flush_on_ret = true,
1276 + .may_block = mmu_notifier_range_blockable(range),
1277 + };
1278 +@@ -711,6 +730,7 @@ static void kvm_mmu_notifier_invalidate_range_end(struct mmu_notifier *mn,
1279 + .pte = __pte(0),
1280 + .handler = (void *)kvm_null_fn,
1281 + .on_lock = kvm_dec_notifier_count,
1282 ++ .on_unlock = (void *)kvm_null_fn,
1283 + .flush_on_ret = false,
1284 + .may_block = mmu_notifier_range_blockable(range),
1285 + };
1286 +@@ -783,7 +803,7 @@ static void kvm_mmu_notifier_release(struct mmu_notifier *mn,
1287 + int idx;
1288 +
1289 + idx = srcu_read_lock(&kvm->srcu);
1290 +- kvm_arch_flush_shadow_all(kvm);
1291 ++ kvm_flush_shadow_all(kvm);
1292 + srcu_read_unlock(&kvm->srcu, idx);
1293 + }
1294 +
1295 +@@ -1188,7 +1208,7 @@ static void kvm_destroy_vm(struct kvm *kvm)
1296 + WARN_ON(rcuwait_active(&kvm->mn_memslots_update_rcuwait));
1297 + kvm->mn_active_invalidate_count = 0;
1298 + #else
1299 +- kvm_arch_flush_shadow_all(kvm);
1300 ++ kvm_flush_shadow_all(kvm);
1301 + #endif
1302 + kvm_arch_destroy_vm(kvm);
1303 + kvm_destroy_devices(kvm);
1304 +@@ -1588,6 +1608,7 @@ static int kvm_set_memslot(struct kvm *kvm,
1305 + * - kvm_is_visible_gfn (mmu_check_root)
1306 + */
1307 + kvm_arch_flush_shadow_memslot(kvm, slot);
1308 ++ kvm_arch_guest_memory_reclaimed(kvm);
1309 +
1310 + /* Released in install_new_memslots. */
1311 + mutex_lock(&kvm->slots_arch_lock);