Contents of /trunk/kernel-alx/patches-5.4/0166-5.4.67-all-fixes.patch
Parent Directory | Revision Log
Revision 3635 -
(show annotations)
(download)
Mon Oct 24 12:34:12 2022 UTC (23 months ago) by niro
File size: 72976 byte(s)
Mon Oct 24 12:34:12 2022 UTC (23 months ago) by niro
File size: 72976 byte(s)
-sync kernel patches
1 | diff --git a/Makefile b/Makefile |
2 | index a3686247e10e9..d2e46ca4c955b 100644 |
3 | --- a/Makefile |
4 | +++ b/Makefile |
5 | @@ -1,7 +1,7 @@ |
6 | # SPDX-License-Identifier: GPL-2.0 |
7 | VERSION = 5 |
8 | PATCHLEVEL = 4 |
9 | -SUBLEVEL = 66 |
10 | +SUBLEVEL = 67 |
11 | EXTRAVERSION = |
12 | NAME = Kleptomaniac Octopus |
13 | |
14 | diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c |
15 | index 51462c59ab5da..d2e738c455566 100644 |
16 | --- a/arch/arm64/kernel/cpu_errata.c |
17 | +++ b/arch/arm64/kernel/cpu_errata.c |
18 | @@ -917,8 +917,12 @@ const struct arm64_cpu_capabilities arm64_errata[] = { |
19 | .desc = "ARM erratum 1418040", |
20 | .capability = ARM64_WORKAROUND_1418040, |
21 | ERRATA_MIDR_RANGE_LIST(erratum_1418040_list), |
22 | - .type = (ARM64_CPUCAP_SCOPE_LOCAL_CPU | |
23 | - ARM64_CPUCAP_PERMITTED_FOR_LATE_CPU), |
24 | + /* |
25 | + * We need to allow affected CPUs to come in late, but |
26 | + * also need the non-affected CPUs to be able to come |
27 | + * in at any point in time. Wonderful. |
28 | + */ |
29 | + .type = ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE, |
30 | }, |
31 | #endif |
32 | #ifdef CONFIG_ARM64_ERRATUM_1165522 |
33 | diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c |
34 | index cdc79de0c794a..945e5f690edec 100644 |
35 | --- a/arch/arm64/net/bpf_jit_comp.c |
36 | +++ b/arch/arm64/net/bpf_jit_comp.c |
37 | @@ -141,14 +141,17 @@ static inline void emit_addr_mov_i64(const int reg, const u64 val, |
38 | } |
39 | } |
40 | |
41 | -static inline int bpf2a64_offset(int bpf_to, int bpf_from, |
42 | +static inline int bpf2a64_offset(int bpf_insn, int off, |
43 | const struct jit_ctx *ctx) |
44 | { |
45 | - int to = ctx->offset[bpf_to]; |
46 | - /* -1 to account for the Branch instruction */ |
47 | - int from = ctx->offset[bpf_from] - 1; |
48 | - |
49 | - return to - from; |
50 | + /* BPF JMP offset is relative to the next instruction */ |
51 | + bpf_insn++; |
52 | + /* |
53 | + * Whereas arm64 branch instructions encode the offset |
54 | + * from the branch itself, so we must subtract 1 from the |
55 | + * instruction offset. |
56 | + */ |
57 | + return ctx->offset[bpf_insn + off] - (ctx->offset[bpf_insn] - 1); |
58 | } |
59 | |
60 | static void jit_fill_hole(void *area, unsigned int size) |
61 | @@ -532,7 +535,7 @@ emit_bswap_uxt: |
62 | |
63 | /* JUMP off */ |
64 | case BPF_JMP | BPF_JA: |
65 | - jmp_offset = bpf2a64_offset(i + off, i, ctx); |
66 | + jmp_offset = bpf2a64_offset(i, off, ctx); |
67 | check_imm26(jmp_offset); |
68 | emit(A64_B(jmp_offset), ctx); |
69 | break; |
70 | @@ -559,7 +562,7 @@ emit_bswap_uxt: |
71 | case BPF_JMP32 | BPF_JSLE | BPF_X: |
72 | emit(A64_CMP(is64, dst, src), ctx); |
73 | emit_cond_jmp: |
74 | - jmp_offset = bpf2a64_offset(i + off, i, ctx); |
75 | + jmp_offset = bpf2a64_offset(i, off, ctx); |
76 | check_imm19(jmp_offset); |
77 | switch (BPF_OP(code)) { |
78 | case BPF_JEQ: |
79 | @@ -780,10 +783,21 @@ static int build_body(struct jit_ctx *ctx, bool extra_pass) |
80 | const struct bpf_prog *prog = ctx->prog; |
81 | int i; |
82 | |
83 | + /* |
84 | + * - offset[0] offset of the end of prologue, |
85 | + * start of the 1st instruction. |
86 | + * - offset[1] - offset of the end of 1st instruction, |
87 | + * start of the 2nd instruction |
88 | + * [....] |
89 | + * - offset[3] - offset of the end of 3rd instruction, |
90 | + * start of 4th instruction |
91 | + */ |
92 | for (i = 0; i < prog->len; i++) { |
93 | const struct bpf_insn *insn = &prog->insnsi[i]; |
94 | int ret; |
95 | |
96 | + if (ctx->image == NULL) |
97 | + ctx->offset[i] = ctx->idx; |
98 | ret = build_insn(insn, ctx, extra_pass); |
99 | if (ret > 0) { |
100 | i++; |
101 | @@ -791,11 +805,16 @@ static int build_body(struct jit_ctx *ctx, bool extra_pass) |
102 | ctx->offset[i] = ctx->idx; |
103 | continue; |
104 | } |
105 | - if (ctx->image == NULL) |
106 | - ctx->offset[i] = ctx->idx; |
107 | if (ret) |
108 | return ret; |
109 | } |
110 | + /* |
111 | + * offset is allocated with prog->len + 1 so fill in |
112 | + * the last element with the offset after the last |
113 | + * instruction (end of program) |
114 | + */ |
115 | + if (ctx->image == NULL) |
116 | + ctx->offset[i] = ctx->idx; |
117 | |
118 | return 0; |
119 | } |
120 | @@ -871,7 +890,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog) |
121 | memset(&ctx, 0, sizeof(ctx)); |
122 | ctx.prog = prog; |
123 | |
124 | - ctx.offset = kcalloc(prog->len, sizeof(int), GFP_KERNEL); |
125 | + ctx.offset = kcalloc(prog->len + 1, sizeof(int), GFP_KERNEL); |
126 | if (ctx.offset == NULL) { |
127 | prog = orig_prog; |
128 | goto out_off; |
129 | @@ -951,7 +970,7 @@ skip_init_ctx: |
130 | prog->jited_len = image_size; |
131 | |
132 | if (!prog->is_func || extra_pass) { |
133 | - bpf_prog_fill_jited_linfo(prog, ctx.offset); |
134 | + bpf_prog_fill_jited_linfo(prog, ctx.offset + 1); |
135 | out_off: |
136 | kfree(ctx.offset); |
137 | kfree(jit_data); |
138 | diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig |
139 | index e5c2d47608feb..6ecdc690f7336 100644 |
140 | --- a/arch/mips/Kconfig |
141 | +++ b/arch/mips/Kconfig |
142 | @@ -862,6 +862,7 @@ config SNI_RM |
143 | select I8253 |
144 | select I8259 |
145 | select ISA |
146 | + select MIPS_L1_CACHE_SHIFT_6 |
147 | select SWAP_IO_SPACE if CPU_BIG_ENDIAN |
148 | select SYS_HAS_CPU_R4X00 |
149 | select SYS_HAS_CPU_R5000 |
150 | diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c |
151 | index 1109924560d8c..b22a3565e1330 100644 |
152 | --- a/arch/mips/kvm/mips.c |
153 | +++ b/arch/mips/kvm/mips.c |
154 | @@ -131,6 +131,8 @@ int kvm_arch_check_processor_compat(void) |
155 | int kvm_arch_init_vm(struct kvm *kvm, unsigned long type) |
156 | { |
157 | switch (type) { |
158 | + case KVM_VM_MIPS_AUTO: |
159 | + break; |
160 | #ifdef CONFIG_KVM_MIPS_VZ |
161 | case KVM_VM_MIPS_VZ: |
162 | #else |
163 | diff --git a/arch/mips/sni/a20r.c b/arch/mips/sni/a20r.c |
164 | index f9407e1704762..c6af7047eb0d2 100644 |
165 | --- a/arch/mips/sni/a20r.c |
166 | +++ b/arch/mips/sni/a20r.c |
167 | @@ -143,7 +143,10 @@ static struct platform_device sc26xx_pdev = { |
168 | }, |
169 | }; |
170 | |
171 | -static u32 a20r_ack_hwint(void) |
172 | +/* |
173 | + * Trigger chipset to update CPU's CAUSE IP field |
174 | + */ |
175 | +static u32 a20r_update_cause_ip(void) |
176 | { |
177 | u32 status = read_c0_status(); |
178 | |
179 | @@ -205,12 +208,14 @@ static void a20r_hwint(void) |
180 | int irq; |
181 | |
182 | clear_c0_status(IE_IRQ0); |
183 | - status = a20r_ack_hwint(); |
184 | + status = a20r_update_cause_ip(); |
185 | cause = read_c0_cause(); |
186 | |
187 | irq = ffs(((cause & status) >> 8) & 0xf8); |
188 | if (likely(irq > 0)) |
189 | do_IRQ(SNI_A20R_IRQ_BASE + irq - 1); |
190 | + |
191 | + a20r_update_cause_ip(); |
192 | set_c0_status(IE_IRQ0); |
193 | } |
194 | |
195 | diff --git a/arch/openrisc/mm/cache.c b/arch/openrisc/mm/cache.c |
196 | index 08f56af387ac4..534a52ec5e667 100644 |
197 | --- a/arch/openrisc/mm/cache.c |
198 | +++ b/arch/openrisc/mm/cache.c |
199 | @@ -16,7 +16,7 @@ |
200 | #include <asm/cacheflush.h> |
201 | #include <asm/tlbflush.h> |
202 | |
203 | -static void cache_loop(struct page *page, const unsigned int reg) |
204 | +static __always_inline void cache_loop(struct page *page, const unsigned int reg) |
205 | { |
206 | unsigned long paddr = page_to_pfn(page) << PAGE_SHIFT; |
207 | unsigned long line = paddr & ~(L1_CACHE_BYTES - 1); |
208 | diff --git a/arch/powerpc/include/asm/book3s/64/mmu.h b/arch/powerpc/include/asm/book3s/64/mmu.h |
209 | index bb3deb76c951b..2f4ddc802fe9d 100644 |
210 | --- a/arch/powerpc/include/asm/book3s/64/mmu.h |
211 | +++ b/arch/powerpc/include/asm/book3s/64/mmu.h |
212 | @@ -225,14 +225,14 @@ static inline void early_init_mmu_secondary(void) |
213 | |
214 | extern void hash__setup_initial_memory_limit(phys_addr_t first_memblock_base, |
215 | phys_addr_t first_memblock_size); |
216 | -extern void radix__setup_initial_memory_limit(phys_addr_t first_memblock_base, |
217 | - phys_addr_t first_memblock_size); |
218 | static inline void setup_initial_memory_limit(phys_addr_t first_memblock_base, |
219 | phys_addr_t first_memblock_size) |
220 | { |
221 | - if (early_radix_enabled()) |
222 | - return radix__setup_initial_memory_limit(first_memblock_base, |
223 | - first_memblock_size); |
224 | + /* |
225 | + * Hash has more strict restrictions. At this point we don't |
226 | + * know which translations we will pick. Hence go with hash |
227 | + * restrictions. |
228 | + */ |
229 | return hash__setup_initial_memory_limit(first_memblock_base, |
230 | first_memblock_size); |
231 | } |
232 | diff --git a/arch/powerpc/kernel/dma-iommu.c b/arch/powerpc/kernel/dma-iommu.c |
233 | index e486d1d78de28..f4cb2c546adbb 100644 |
234 | --- a/arch/powerpc/kernel/dma-iommu.c |
235 | +++ b/arch/powerpc/kernel/dma-iommu.c |
236 | @@ -160,7 +160,8 @@ u64 dma_iommu_get_required_mask(struct device *dev) |
237 | return bypass_mask; |
238 | } |
239 | |
240 | - mask = 1ULL < (fls_long(tbl->it_offset + tbl->it_size) - 1); |
241 | + mask = 1ULL << (fls_long(tbl->it_offset + tbl->it_size) + |
242 | + tbl->it_page_shift - 1); |
243 | mask += mask - 1; |
244 | |
245 | return mask; |
246 | diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c b/arch/powerpc/mm/book3s64/radix_pgtable.c |
247 | index 6ee17d09649c3..770542ccdb468 100644 |
248 | --- a/arch/powerpc/mm/book3s64/radix_pgtable.c |
249 | +++ b/arch/powerpc/mm/book3s64/radix_pgtable.c |
250 | @@ -643,21 +643,6 @@ void radix__mmu_cleanup_all(void) |
251 | } |
252 | } |
253 | |
254 | -void radix__setup_initial_memory_limit(phys_addr_t first_memblock_base, |
255 | - phys_addr_t first_memblock_size) |
256 | -{ |
257 | - /* |
258 | - * We don't currently support the first MEMBLOCK not mapping 0 |
259 | - * physical on those processors |
260 | - */ |
261 | - BUG_ON(first_memblock_base != 0); |
262 | - |
263 | - /* |
264 | - * Radix mode is not limited by RMA / VRMA addressing. |
265 | - */ |
266 | - ppc64_rma_size = ULONG_MAX; |
267 | -} |
268 | - |
269 | #ifdef CONFIG_MEMORY_HOTPLUG |
270 | static void free_pte_table(pte_t *pte_start, pmd_t *pmd) |
271 | { |
272 | diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c |
273 | index 4e08246acd79a..210f1c28b8e41 100644 |
274 | --- a/arch/powerpc/mm/init_64.c |
275 | +++ b/arch/powerpc/mm/init_64.c |
276 | @@ -415,9 +415,16 @@ void __init mmu_early_init_devtree(void) |
277 | if (!(mfmsr() & MSR_HV)) |
278 | early_check_vec5(); |
279 | |
280 | - if (early_radix_enabled()) |
281 | + if (early_radix_enabled()) { |
282 | radix__early_init_devtree(); |
283 | - else |
284 | + /* |
285 | + * We have finalized the translation we are going to use by now. |
286 | + * Radix mode is not limited by RMA / VRMA addressing. |
287 | + * Hence don't limit memblock allocations. |
288 | + */ |
289 | + ppc64_rma_size = ULONG_MAX; |
290 | + memblock_set_current_limit(MEMBLOCK_ALLOC_ANYWHERE); |
291 | + } else |
292 | hash__early_init_devtree(); |
293 | } |
294 | #endif /* CONFIG_PPC_BOOK3S_64 */ |
295 | diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c |
296 | index b1eb6a0411183..d49e334071d45 100644 |
297 | --- a/arch/riscv/mm/init.c |
298 | +++ b/arch/riscv/mm/init.c |
299 | @@ -167,12 +167,11 @@ void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot) |
300 | |
301 | ptep = &fixmap_pte[pte_index(addr)]; |
302 | |
303 | - if (pgprot_val(prot)) { |
304 | + if (pgprot_val(prot)) |
305 | set_pte(ptep, pfn_pte(phys >> PAGE_SHIFT, prot)); |
306 | - } else { |
307 | + else |
308 | pte_clear(&init_mm, addr, ptep); |
309 | - local_flush_tlb_page(addr); |
310 | - } |
311 | + local_flush_tlb_page(addr); |
312 | } |
313 | |
314 | static pte_t *__init get_pte_virt(phys_addr_t pa) |
315 | diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile |
316 | index 98aac5b4bdb7e..292b5bc6e3a30 100644 |
317 | --- a/arch/x86/boot/compressed/Makefile |
318 | +++ b/arch/x86/boot/compressed/Makefile |
319 | @@ -38,6 +38,8 @@ KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector) |
320 | KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member) |
321 | KBUILD_CFLAGS += $(call cc-disable-warning, gnu) |
322 | KBUILD_CFLAGS += -Wno-pointer-sign |
323 | +# Disable relocation relaxation in case the link is not PIE. |
324 | +KBUILD_CFLAGS += $(call as-option,-Wa$(comma)-mrelax-relocations=no) |
325 | |
326 | KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ |
327 | GCOV_PROFILE := n |
328 | diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c |
329 | index 88497bff1135f..ba32adaeefdd0 100644 |
330 | --- a/block/bfq-iosched.c |
331 | +++ b/block/bfq-iosched.c |
332 | @@ -5890,18 +5890,6 @@ static void bfq_finish_requeue_request(struct request *rq) |
333 | struct bfq_queue *bfqq = RQ_BFQQ(rq); |
334 | struct bfq_data *bfqd; |
335 | |
336 | - /* |
337 | - * Requeue and finish hooks are invoked in blk-mq without |
338 | - * checking whether the involved request is actually still |
339 | - * referenced in the scheduler. To handle this fact, the |
340 | - * following two checks make this function exit in case of |
341 | - * spurious invocations, for which there is nothing to do. |
342 | - * |
343 | - * First, check whether rq has nothing to do with an elevator. |
344 | - */ |
345 | - if (unlikely(!(rq->rq_flags & RQF_ELVPRIV))) |
346 | - return; |
347 | - |
348 | /* |
349 | * rq either is not associated with any icq, or is an already |
350 | * requeued request that has not (yet) been re-inserted into |
351 | diff --git a/block/blk-mq-sched.h b/block/blk-mq-sched.h |
352 | index 126021fc3a11f..e81ca1bf6e10b 100644 |
353 | --- a/block/blk-mq-sched.h |
354 | +++ b/block/blk-mq-sched.h |
355 | @@ -66,7 +66,7 @@ static inline void blk_mq_sched_requeue_request(struct request *rq) |
356 | struct request_queue *q = rq->q; |
357 | struct elevator_queue *e = q->elevator; |
358 | |
359 | - if (e && e->type->ops.requeue_request) |
360 | + if ((rq->rq_flags & RQF_ELVPRIV) && e && e->type->ops.requeue_request) |
361 | e->type->ops.requeue_request(rq); |
362 | } |
363 | |
364 | diff --git a/drivers/base/firmware_loader/firmware.h b/drivers/base/firmware_loader/firmware.h |
365 | index 7ecd590e67fe1..9bef6c35f344a 100644 |
366 | --- a/drivers/base/firmware_loader/firmware.h |
367 | +++ b/drivers/base/firmware_loader/firmware.h |
368 | @@ -139,10 +139,12 @@ int assign_fw(struct firmware *fw, struct device *device, |
369 | void fw_free_paged_buf(struct fw_priv *fw_priv); |
370 | int fw_grow_paged_buf(struct fw_priv *fw_priv, int pages_needed); |
371 | int fw_map_paged_buf(struct fw_priv *fw_priv); |
372 | +bool fw_is_paged_buf(struct fw_priv *fw_priv); |
373 | #else |
374 | static inline void fw_free_paged_buf(struct fw_priv *fw_priv) {} |
375 | static inline int fw_grow_paged_buf(struct fw_priv *fw_priv, int pages_needed) { return -ENXIO; } |
376 | static inline int fw_map_paged_buf(struct fw_priv *fw_priv) { return -ENXIO; } |
377 | +static inline bool fw_is_paged_buf(struct fw_priv *fw_priv) { return false; } |
378 | #endif |
379 | |
380 | #endif /* __FIRMWARE_LOADER_H */ |
381 | diff --git a/drivers/base/firmware_loader/main.c b/drivers/base/firmware_loader/main.c |
382 | index bf44c79beae92..95d21b4af9045 100644 |
383 | --- a/drivers/base/firmware_loader/main.c |
384 | +++ b/drivers/base/firmware_loader/main.c |
385 | @@ -252,9 +252,11 @@ static void __free_fw_priv(struct kref *ref) |
386 | list_del(&fw_priv->list); |
387 | spin_unlock(&fwc->lock); |
388 | |
389 | - fw_free_paged_buf(fw_priv); /* free leftover pages */ |
390 | - if (!fw_priv->allocated_size) |
391 | + if (fw_is_paged_buf(fw_priv)) |
392 | + fw_free_paged_buf(fw_priv); |
393 | + else if (!fw_priv->allocated_size) |
394 | vfree(fw_priv->data); |
395 | + |
396 | kfree_const(fw_priv->fw_name); |
397 | kfree(fw_priv); |
398 | } |
399 | @@ -268,6 +270,11 @@ static void free_fw_priv(struct fw_priv *fw_priv) |
400 | } |
401 | |
402 | #ifdef CONFIG_FW_LOADER_PAGED_BUF |
403 | +bool fw_is_paged_buf(struct fw_priv *fw_priv) |
404 | +{ |
405 | + return fw_priv->is_paged_buf; |
406 | +} |
407 | + |
408 | void fw_free_paged_buf(struct fw_priv *fw_priv) |
409 | { |
410 | int i; |
411 | @@ -275,6 +282,8 @@ void fw_free_paged_buf(struct fw_priv *fw_priv) |
412 | if (!fw_priv->pages) |
413 | return; |
414 | |
415 | + vunmap(fw_priv->data); |
416 | + |
417 | for (i = 0; i < fw_priv->nr_pages; i++) |
418 | __free_page(fw_priv->pages[i]); |
419 | kvfree(fw_priv->pages); |
420 | @@ -328,10 +337,6 @@ int fw_map_paged_buf(struct fw_priv *fw_priv) |
421 | if (!fw_priv->data) |
422 | return -ENOMEM; |
423 | |
424 | - /* page table is no longer needed after mapping, let's free */ |
425 | - kvfree(fw_priv->pages); |
426 | - fw_priv->pages = NULL; |
427 | - |
428 | return 0; |
429 | } |
430 | #endif |
431 | diff --git a/drivers/clk/davinci/pll.c b/drivers/clk/davinci/pll.c |
432 | index 1ac11b6a47a37..2ec48d030fda7 100644 |
433 | --- a/drivers/clk/davinci/pll.c |
434 | +++ b/drivers/clk/davinci/pll.c |
435 | @@ -491,7 +491,7 @@ struct clk *davinci_pll_clk_register(struct device *dev, |
436 | parent_name = postdiv_name; |
437 | } |
438 | |
439 | - pllen = kzalloc(sizeof(*pllout), GFP_KERNEL); |
440 | + pllen = kzalloc(sizeof(*pllen), GFP_KERNEL); |
441 | if (!pllen) { |
442 | ret = -ENOMEM; |
443 | goto err_unregister_postdiv; |
444 | diff --git a/drivers/clk/rockchip/clk-rk3228.c b/drivers/clk/rockchip/clk-rk3228.c |
445 | index d7243c09cc843..47d6482dda9df 100644 |
446 | --- a/drivers/clk/rockchip/clk-rk3228.c |
447 | +++ b/drivers/clk/rockchip/clk-rk3228.c |
448 | @@ -137,7 +137,7 @@ PNAME(mux_usb480m_p) = { "usb480m_phy", "xin24m" }; |
449 | PNAME(mux_hdmiphy_p) = { "hdmiphy_phy", "xin24m" }; |
450 | PNAME(mux_aclk_cpu_src_p) = { "cpll_aclk_cpu", "gpll_aclk_cpu", "hdmiphy_aclk_cpu" }; |
451 | |
452 | -PNAME(mux_pll_src_4plls_p) = { "cpll", "gpll", "hdmiphy" "usb480m" }; |
453 | +PNAME(mux_pll_src_4plls_p) = { "cpll", "gpll", "hdmiphy", "usb480m" }; |
454 | PNAME(mux_pll_src_3plls_p) = { "cpll", "gpll", "hdmiphy" }; |
455 | PNAME(mux_pll_src_2plls_p) = { "cpll", "gpll" }; |
456 | PNAME(mux_sclk_hdmi_cec_p) = { "cpll", "gpll", "xin24m" }; |
457 | diff --git a/drivers/dax/super.c b/drivers/dax/super.c |
458 | index 26a654dbc69a2..b936852881871 100644 |
459 | --- a/drivers/dax/super.c |
460 | +++ b/drivers/dax/super.c |
461 | @@ -318,11 +318,15 @@ EXPORT_SYMBOL_GPL(dax_direct_access); |
462 | bool dax_supported(struct dax_device *dax_dev, struct block_device *bdev, |
463 | int blocksize, sector_t start, sector_t len) |
464 | { |
465 | + if (!dax_dev) |
466 | + return false; |
467 | + |
468 | if (!dax_alive(dax_dev)) |
469 | return false; |
470 | |
471 | return dax_dev->ops->dax_supported(dax_dev, bdev, blocksize, start, len); |
472 | } |
473 | +EXPORT_SYMBOL_GPL(dax_supported); |
474 | |
475 | size_t dax_copy_from_iter(struct dax_device *dax_dev, pgoff_t pgoff, void *addr, |
476 | size_t bytes, struct iov_iter *i) |
477 | diff --git a/drivers/gpu/drm/i915/i915_sw_fence.c b/drivers/gpu/drm/i915/i915_sw_fence.c |
478 | index 6a88db291252b..b3fd6ff665dae 100644 |
479 | --- a/drivers/gpu/drm/i915/i915_sw_fence.c |
480 | +++ b/drivers/gpu/drm/i915/i915_sw_fence.c |
481 | @@ -158,9 +158,13 @@ static void __i915_sw_fence_wake_up_all(struct i915_sw_fence *fence, |
482 | |
483 | do { |
484 | list_for_each_entry_safe(pos, next, &x->head, entry) { |
485 | - pos->func(pos, |
486 | - TASK_NORMAL, fence->error, |
487 | - &extra); |
488 | + int wake_flags; |
489 | + |
490 | + wake_flags = fence->error; |
491 | + if (pos->func == autoremove_wake_function) |
492 | + wake_flags = 0; |
493 | + |
494 | + pos->func(pos, TASK_NORMAL, wake_flags, &extra); |
495 | } |
496 | |
497 | if (list_empty(&extra)) |
498 | diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c |
499 | index 352b81a7a6702..f98bb2e263723 100644 |
500 | --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c |
501 | +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c |
502 | @@ -594,8 +594,13 @@ err_pm: |
503 | pm_runtime_disable(dev); |
504 | err_node: |
505 | of_node_put(private->mutex_node); |
506 | - for (i = 0; i < DDP_COMPONENT_ID_MAX; i++) |
507 | + for (i = 0; i < DDP_COMPONENT_ID_MAX; i++) { |
508 | of_node_put(private->comp_node[i]); |
509 | + if (private->ddp_comp[i]) { |
510 | + put_device(private->ddp_comp[i]->larb_dev); |
511 | + private->ddp_comp[i] = NULL; |
512 | + } |
513 | + } |
514 | return ret; |
515 | } |
516 | |
517 | diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c |
518 | index ce91b61364eb6..6b22fd63c3f55 100644 |
519 | --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c |
520 | +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c |
521 | @@ -1482,25 +1482,30 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi, |
522 | dev_err(dev, |
523 | "Failed to get system configuration registers: %d\n", |
524 | ret); |
525 | - return ret; |
526 | + goto put_device; |
527 | } |
528 | hdmi->sys_regmap = regmap; |
529 | |
530 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
531 | hdmi->regs = devm_ioremap_resource(dev, mem); |
532 | - if (IS_ERR(hdmi->regs)) |
533 | - return PTR_ERR(hdmi->regs); |
534 | + if (IS_ERR(hdmi->regs)) { |
535 | + ret = PTR_ERR(hdmi->regs); |
536 | + goto put_device; |
537 | + } |
538 | |
539 | remote = of_graph_get_remote_node(np, 1, 0); |
540 | - if (!remote) |
541 | - return -EINVAL; |
542 | + if (!remote) { |
543 | + ret = -EINVAL; |
544 | + goto put_device; |
545 | + } |
546 | |
547 | if (!of_device_is_compatible(remote, "hdmi-connector")) { |
548 | hdmi->next_bridge = of_drm_find_bridge(remote); |
549 | if (!hdmi->next_bridge) { |
550 | dev_err(dev, "Waiting for external bridge\n"); |
551 | of_node_put(remote); |
552 | - return -EPROBE_DEFER; |
553 | + ret = -EPROBE_DEFER; |
554 | + goto put_device; |
555 | } |
556 | } |
557 | |
558 | @@ -1509,7 +1514,8 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi, |
559 | dev_err(dev, "Failed to find ddc-i2c-bus node in %pOF\n", |
560 | remote); |
561 | of_node_put(remote); |
562 | - return -EINVAL; |
563 | + ret = -EINVAL; |
564 | + goto put_device; |
565 | } |
566 | of_node_put(remote); |
567 | |
568 | @@ -1517,10 +1523,14 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi, |
569 | of_node_put(i2c_np); |
570 | if (!hdmi->ddc_adpt) { |
571 | dev_err(dev, "Failed to get ddc i2c adapter by node\n"); |
572 | - return -EINVAL; |
573 | + ret = -EINVAL; |
574 | + goto put_device; |
575 | } |
576 | |
577 | return 0; |
578 | +put_device: |
579 | + put_device(hdmi->cec_dev); |
580 | + return ret; |
581 | } |
582 | |
583 | /* |
584 | diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c |
585 | index 501c43c5851dc..452307c79e4b9 100644 |
586 | --- a/drivers/hv/channel_mgmt.c |
587 | +++ b/drivers/hv/channel_mgmt.c |
588 | @@ -769,7 +769,7 @@ static void vmbus_wait_for_unload(void) |
589 | void *page_addr; |
590 | struct hv_message *msg; |
591 | struct vmbus_channel_message_header *hdr; |
592 | - u32 message_type; |
593 | + u32 message_type, i; |
594 | |
595 | /* |
596 | * CHANNELMSG_UNLOAD_RESPONSE is always delivered to the CPU which was |
597 | @@ -779,8 +779,11 @@ static void vmbus_wait_for_unload(void) |
598 | * functional and vmbus_unload_response() will complete |
599 | * vmbus_connection.unload_event. If not, the last thing we can do is |
600 | * read message pages for all CPUs directly. |
601 | + * |
602 | + * Wait no more than 10 seconds so that the panic path can't get |
603 | + * hung forever in case the response message isn't seen. |
604 | */ |
605 | - while (1) { |
606 | + for (i = 0; i < 1000; i++) { |
607 | if (completion_done(&vmbus_connection.unload_event)) |
608 | break; |
609 | |
610 | diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c |
611 | index 24c38e44ed3bc..2d2568dac2a66 100644 |
612 | --- a/drivers/hv/vmbus_drv.c |
613 | +++ b/drivers/hv/vmbus_drv.c |
614 | @@ -2231,7 +2231,10 @@ static int vmbus_bus_suspend(struct device *dev) |
615 | if (atomic_read(&vmbus_connection.nr_chan_close_on_suspend) > 0) |
616 | wait_for_completion(&vmbus_connection.ready_for_suspend_event); |
617 | |
618 | - WARN_ON(atomic_read(&vmbus_connection.nr_chan_fixup_on_resume) != 0); |
619 | + if (atomic_read(&vmbus_connection.nr_chan_fixup_on_resume) != 0) { |
620 | + pr_err("Can not suspend due to a previous failed resuming\n"); |
621 | + return -EBUSY; |
622 | + } |
623 | |
624 | mutex_lock(&vmbus_connection.channel_mutex); |
625 | |
626 | @@ -2305,7 +2308,9 @@ static int vmbus_bus_resume(struct device *dev) |
627 | |
628 | vmbus_request_offers(); |
629 | |
630 | - wait_for_completion(&vmbus_connection.ready_for_resume_event); |
631 | + if (wait_for_completion_timeout( |
632 | + &vmbus_connection.ready_for_resume_event, 10 * HZ) == 0) |
633 | + pr_err("Some vmbus device is missing after suspending?\n"); |
634 | |
635 | /* Reset the event for the next suspend. */ |
636 | reinit_completion(&vmbus_connection.ready_for_suspend_event); |
637 | diff --git a/drivers/i2c/algos/i2c-algo-pca.c b/drivers/i2c/algos/i2c-algo-pca.c |
638 | index 8ea850eed18f7..1d3691a049b16 100644 |
639 | --- a/drivers/i2c/algos/i2c-algo-pca.c |
640 | +++ b/drivers/i2c/algos/i2c-algo-pca.c |
641 | @@ -41,8 +41,22 @@ static void pca_reset(struct i2c_algo_pca_data *adap) |
642 | pca_outw(adap, I2C_PCA_INDPTR, I2C_PCA_IPRESET); |
643 | pca_outw(adap, I2C_PCA_IND, 0xA5); |
644 | pca_outw(adap, I2C_PCA_IND, 0x5A); |
645 | + |
646 | + /* |
647 | + * After a reset we need to re-apply any configuration |
648 | + * (calculated in pca_init) to get the bus in a working state. |
649 | + */ |
650 | + pca_outw(adap, I2C_PCA_INDPTR, I2C_PCA_IMODE); |
651 | + pca_outw(adap, I2C_PCA_IND, adap->bus_settings.mode); |
652 | + pca_outw(adap, I2C_PCA_INDPTR, I2C_PCA_ISCLL); |
653 | + pca_outw(adap, I2C_PCA_IND, adap->bus_settings.tlow); |
654 | + pca_outw(adap, I2C_PCA_INDPTR, I2C_PCA_ISCLH); |
655 | + pca_outw(adap, I2C_PCA_IND, adap->bus_settings.thi); |
656 | + |
657 | + pca_set_con(adap, I2C_PCA_CON_ENSIO); |
658 | } else { |
659 | adap->reset_chip(adap->data); |
660 | + pca_set_con(adap, I2C_PCA_CON_ENSIO | adap->bus_settings.clock_freq); |
661 | } |
662 | } |
663 | |
664 | @@ -423,13 +437,14 @@ static int pca_init(struct i2c_adapter *adap) |
665 | " Use the nominal frequency.\n", adap->name); |
666 | } |
667 | |
668 | - pca_reset(pca_data); |
669 | - |
670 | clock = pca_clock(pca_data); |
671 | printk(KERN_INFO "%s: Clock frequency is %dkHz\n", |
672 | adap->name, freqs[clock]); |
673 | |
674 | - pca_set_con(pca_data, I2C_PCA_CON_ENSIO | clock); |
675 | + /* Store settings as these will be needed when the PCA chip is reset */ |
676 | + pca_data->bus_settings.clock_freq = clock; |
677 | + |
678 | + pca_reset(pca_data); |
679 | } else { |
680 | int clock; |
681 | int mode; |
682 | @@ -496,19 +511,15 @@ static int pca_init(struct i2c_adapter *adap) |
683 | thi = tlow * min_thi / min_tlow; |
684 | } |
685 | |
686 | + /* Store settings as these will be needed when the PCA chip is reset */ |
687 | + pca_data->bus_settings.mode = mode; |
688 | + pca_data->bus_settings.tlow = tlow; |
689 | + pca_data->bus_settings.thi = thi; |
690 | + |
691 | pca_reset(pca_data); |
692 | |
693 | printk(KERN_INFO |
694 | "%s: Clock frequency is %dHz\n", adap->name, clock * 100); |
695 | - |
696 | - pca_outw(pca_data, I2C_PCA_INDPTR, I2C_PCA_IMODE); |
697 | - pca_outw(pca_data, I2C_PCA_IND, mode); |
698 | - pca_outw(pca_data, I2C_PCA_INDPTR, I2C_PCA_ISCLL); |
699 | - pca_outw(pca_data, I2C_PCA_IND, tlow); |
700 | - pca_outw(pca_data, I2C_PCA_INDPTR, I2C_PCA_ISCLH); |
701 | - pca_outw(pca_data, I2C_PCA_IND, thi); |
702 | - |
703 | - pca_set_con(pca_data, I2C_PCA_CON_ENSIO); |
704 | } |
705 | udelay(500); /* 500 us for oscillator to stabilise */ |
706 | |
707 | diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c |
708 | index 3ff6fbd79b127..9a80c3c7e8af2 100644 |
709 | --- a/drivers/i2c/busses/i2c-i801.c |
710 | +++ b/drivers/i2c/busses/i2c-i801.c |
711 | @@ -1688,6 +1688,16 @@ static inline int i801_acpi_probe(struct i801_priv *priv) { return 0; } |
712 | static inline void i801_acpi_remove(struct i801_priv *priv) { } |
713 | #endif |
714 | |
715 | +static unsigned char i801_setup_hstcfg(struct i801_priv *priv) |
716 | +{ |
717 | + unsigned char hstcfg = priv->original_hstcfg; |
718 | + |
719 | + hstcfg &= ~SMBHSTCFG_I2C_EN; /* SMBus timing */ |
720 | + hstcfg |= SMBHSTCFG_HST_EN; |
721 | + pci_write_config_byte(priv->pci_dev, SMBHSTCFG, hstcfg); |
722 | + return hstcfg; |
723 | +} |
724 | + |
725 | static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id) |
726 | { |
727 | unsigned char temp; |
728 | @@ -1804,14 +1814,10 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id) |
729 | return err; |
730 | } |
731 | |
732 | - pci_read_config_byte(priv->pci_dev, SMBHSTCFG, &temp); |
733 | - priv->original_hstcfg = temp; |
734 | - temp &= ~SMBHSTCFG_I2C_EN; /* SMBus timing */ |
735 | - if (!(temp & SMBHSTCFG_HST_EN)) { |
736 | + pci_read_config_byte(priv->pci_dev, SMBHSTCFG, &priv->original_hstcfg); |
737 | + temp = i801_setup_hstcfg(priv); |
738 | + if (!(priv->original_hstcfg & SMBHSTCFG_HST_EN)) |
739 | dev_info(&dev->dev, "Enabling SMBus device\n"); |
740 | - temp |= SMBHSTCFG_HST_EN; |
741 | - } |
742 | - pci_write_config_byte(priv->pci_dev, SMBHSTCFG, temp); |
743 | |
744 | if (temp & SMBHSTCFG_SMB_SMI_EN) { |
745 | dev_dbg(&dev->dev, "SMBus using interrupt SMI#\n"); |
746 | @@ -1937,6 +1943,7 @@ static int i801_resume(struct device *dev) |
747 | { |
748 | struct i801_priv *priv = dev_get_drvdata(dev); |
749 | |
750 | + i801_setup_hstcfg(priv); |
751 | i801_enable_host_notify(&priv->adapter); |
752 | |
753 | return 0; |
754 | diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c |
755 | index 89224913f578b..081a1169ecea3 100644 |
756 | --- a/drivers/i2c/busses/i2c-mxs.c |
757 | +++ b/drivers/i2c/busses/i2c-mxs.c |
758 | @@ -25,6 +25,7 @@ |
759 | #include <linux/of_device.h> |
760 | #include <linux/dma-mapping.h> |
761 | #include <linux/dmaengine.h> |
762 | +#include <linux/dma/mxs-dma.h> |
763 | |
764 | #define DRIVER_NAME "mxs-i2c" |
765 | |
766 | @@ -200,7 +201,8 @@ static int mxs_i2c_dma_setup_xfer(struct i2c_adapter *adap, |
767 | dma_map_sg(i2c->dev, &i2c->sg_io[0], 1, DMA_TO_DEVICE); |
768 | desc = dmaengine_prep_slave_sg(i2c->dmach, &i2c->sg_io[0], 1, |
769 | DMA_MEM_TO_DEV, |
770 | - DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
771 | + DMA_PREP_INTERRUPT | |
772 | + MXS_DMA_CTRL_WAIT4END); |
773 | if (!desc) { |
774 | dev_err(i2c->dev, |
775 | "Failed to get DMA data write descriptor.\n"); |
776 | @@ -228,7 +230,8 @@ static int mxs_i2c_dma_setup_xfer(struct i2c_adapter *adap, |
777 | dma_map_sg(i2c->dev, &i2c->sg_io[1], 1, DMA_FROM_DEVICE); |
778 | desc = dmaengine_prep_slave_sg(i2c->dmach, &i2c->sg_io[1], 1, |
779 | DMA_DEV_TO_MEM, |
780 | - DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
781 | + DMA_PREP_INTERRUPT | |
782 | + MXS_DMA_CTRL_WAIT4END); |
783 | if (!desc) { |
784 | dev_err(i2c->dev, |
785 | "Failed to get DMA data write descriptor.\n"); |
786 | @@ -260,7 +263,8 @@ static int mxs_i2c_dma_setup_xfer(struct i2c_adapter *adap, |
787 | dma_map_sg(i2c->dev, i2c->sg_io, 2, DMA_TO_DEVICE); |
788 | desc = dmaengine_prep_slave_sg(i2c->dmach, i2c->sg_io, 2, |
789 | DMA_MEM_TO_DEV, |
790 | - DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
791 | + DMA_PREP_INTERRUPT | |
792 | + MXS_DMA_CTRL_WAIT4END); |
793 | if (!desc) { |
794 | dev_err(i2c->dev, |
795 | "Failed to get DMA data write descriptor.\n"); |
796 | diff --git a/drivers/infiniband/hw/bnxt_re/qplib_sp.c b/drivers/infiniband/hw/bnxt_re/qplib_sp.c |
797 | index 40296b97d21e6..079aaaaffec7a 100644 |
798 | --- a/drivers/infiniband/hw/bnxt_re/qplib_sp.c |
799 | +++ b/drivers/infiniband/hw/bnxt_re/qplib_sp.c |
800 | @@ -152,7 +152,7 @@ int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw, |
801 | attr->max_inline_data = le32_to_cpu(sb->max_inline_data); |
802 | attr->l2_db_size = (sb->l2_db_space_size + 1) * |
803 | (0x01 << RCFW_DBR_BASE_PAGE_SHIFT); |
804 | - attr->max_sgid = le32_to_cpu(sb->max_gid); |
805 | + attr->max_sgid = BNXT_QPLIB_NUM_GIDS_SUPPORTED; |
806 | |
807 | bnxt_qplib_query_version(rcfw, attr->fw_ver); |
808 | |
809 | diff --git a/drivers/infiniband/hw/bnxt_re/qplib_sp.h b/drivers/infiniband/hw/bnxt_re/qplib_sp.h |
810 | index 13d9432d5ce22..194f5ef45ca63 100644 |
811 | --- a/drivers/infiniband/hw/bnxt_re/qplib_sp.h |
812 | +++ b/drivers/infiniband/hw/bnxt_re/qplib_sp.h |
813 | @@ -47,6 +47,7 @@ |
814 | struct bnxt_qplib_dev_attr { |
815 | #define FW_VER_ARR_LEN 4 |
816 | u8 fw_ver[FW_VER_ARR_LEN]; |
817 | +#define BNXT_QPLIB_NUM_GIDS_SUPPORTED 256 |
818 | u16 max_sgid; |
819 | u16 max_mrw; |
820 | u32 max_qp; |
821 | diff --git a/drivers/input/mouse/trackpoint.c b/drivers/input/mouse/trackpoint.c |
822 | index 3eefee2ee2a12..854d5e7587241 100644 |
823 | --- a/drivers/input/mouse/trackpoint.c |
824 | +++ b/drivers/input/mouse/trackpoint.c |
825 | @@ -17,10 +17,12 @@ |
826 | #include "trackpoint.h" |
827 | |
828 | static const char * const trackpoint_variants[] = { |
829 | - [TP_VARIANT_IBM] = "IBM", |
830 | - [TP_VARIANT_ALPS] = "ALPS", |
831 | - [TP_VARIANT_ELAN] = "Elan", |
832 | - [TP_VARIANT_NXP] = "NXP", |
833 | + [TP_VARIANT_IBM] = "IBM", |
834 | + [TP_VARIANT_ALPS] = "ALPS", |
835 | + [TP_VARIANT_ELAN] = "Elan", |
836 | + [TP_VARIANT_NXP] = "NXP", |
837 | + [TP_VARIANT_JYT_SYNAPTICS] = "JYT_Synaptics", |
838 | + [TP_VARIANT_SYNAPTICS] = "Synaptics", |
839 | }; |
840 | |
841 | /* |
842 | diff --git a/drivers/input/mouse/trackpoint.h b/drivers/input/mouse/trackpoint.h |
843 | index 5cb93ed260856..eb5412904fe07 100644 |
844 | --- a/drivers/input/mouse/trackpoint.h |
845 | +++ b/drivers/input/mouse/trackpoint.h |
846 | @@ -24,10 +24,12 @@ |
847 | * 0x01 was the original IBM trackpoint, others implement very limited |
848 | * subset of trackpoint features. |
849 | */ |
850 | -#define TP_VARIANT_IBM 0x01 |
851 | -#define TP_VARIANT_ALPS 0x02 |
852 | -#define TP_VARIANT_ELAN 0x03 |
853 | -#define TP_VARIANT_NXP 0x04 |
854 | +#define TP_VARIANT_IBM 0x01 |
855 | +#define TP_VARIANT_ALPS 0x02 |
856 | +#define TP_VARIANT_ELAN 0x03 |
857 | +#define TP_VARIANT_NXP 0x04 |
858 | +#define TP_VARIANT_JYT_SYNAPTICS 0x05 |
859 | +#define TP_VARIANT_SYNAPTICS 0x06 |
860 | |
861 | /* |
862 | * Commands |
863 | diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h |
864 | index 858a263021988..42771b9b10a00 100644 |
865 | --- a/drivers/input/serio/i8042-x86ia64io.h |
866 | +++ b/drivers/input/serio/i8042-x86ia64io.h |
867 | @@ -548,6 +548,14 @@ static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = { |
868 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5738"), |
869 | }, |
870 | }, |
871 | + { |
872 | + /* Entroware Proteus */ |
873 | + .matches = { |
874 | + DMI_MATCH(DMI_SYS_VENDOR, "Entroware"), |
875 | + DMI_MATCH(DMI_PRODUCT_NAME, "Proteus"), |
876 | + DMI_MATCH(DMI_PRODUCT_VERSION, "EL07R4"), |
877 | + }, |
878 | + }, |
879 | { } |
880 | }; |
881 | |
882 | @@ -676,6 +684,14 @@ static const struct dmi_system_id __initconst i8042_dmi_reset_table[] = { |
883 | DMI_MATCH(DMI_PRODUCT_NAME, "33474HU"), |
884 | }, |
885 | }, |
886 | + { |
887 | + /* Entroware Proteus */ |
888 | + .matches = { |
889 | + DMI_MATCH(DMI_SYS_VENDOR, "Entroware"), |
890 | + DMI_MATCH(DMI_PRODUCT_NAME, "Proteus"), |
891 | + DMI_MATCH(DMI_PRODUCT_VERSION, "EL07R4"), |
892 | + }, |
893 | + }, |
894 | { } |
895 | }; |
896 | |
897 | diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c |
898 | index cdafc652d9d1a..fa91d856a43ee 100644 |
899 | --- a/drivers/iommu/amd_iommu.c |
900 | +++ b/drivers/iommu/amd_iommu.c |
901 | @@ -4431,12 +4431,14 @@ int amd_iommu_deactivate_guest_mode(void *data) |
902 | struct amd_ir_data *ir_data = (struct amd_ir_data *)data; |
903 | struct irte_ga *entry = (struct irte_ga *) ir_data->entry; |
904 | struct irq_cfg *cfg = ir_data->cfg; |
905 | - u64 valid = entry->lo.fields_remap.valid; |
906 | + u64 valid; |
907 | |
908 | if (!AMD_IOMMU_GUEST_IR_VAPIC(amd_iommu_guest_ir) || |
909 | !entry || !entry->lo.fields_vapic.guest_mode) |
910 | return 0; |
911 | |
912 | + valid = entry->lo.fields_remap.valid; |
913 | + |
914 | entry->lo.val = 0; |
915 | entry->hi.val = 0; |
916 | |
917 | diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c |
918 | index 52e049554f5cd..edc3660759131 100644 |
919 | --- a/drivers/md/dm-table.c |
920 | +++ b/drivers/md/dm-table.c |
921 | @@ -882,10 +882,14 @@ EXPORT_SYMBOL_GPL(dm_table_set_type); |
922 | int device_supports_dax(struct dm_target *ti, struct dm_dev *dev, |
923 | sector_t start, sector_t len, void *data) |
924 | { |
925 | - int blocksize = *(int *) data; |
926 | + int blocksize = *(int *) data, id; |
927 | + bool rc; |
928 | |
929 | - return generic_fsdax_supported(dev->dax_dev, dev->bdev, blocksize, |
930 | - start, len); |
931 | + id = dax_read_lock(); |
932 | + rc = dax_supported(dev->dax_dev, dev->bdev, blocksize, start, len); |
933 | + dax_read_unlock(id); |
934 | + |
935 | + return rc; |
936 | } |
937 | |
938 | /* Check devices support synchronous DAX */ |
939 | diff --git a/drivers/md/dm.c b/drivers/md/dm.c |
940 | index 67da442cbab12..63d59e2ed1582 100644 |
941 | --- a/drivers/md/dm.c |
942 | +++ b/drivers/md/dm.c |
943 | @@ -1112,15 +1112,16 @@ static bool dm_dax_supported(struct dax_device *dax_dev, struct block_device *bd |
944 | { |
945 | struct mapped_device *md = dax_get_private(dax_dev); |
946 | struct dm_table *map; |
947 | + bool ret = false; |
948 | int srcu_idx; |
949 | - bool ret; |
950 | |
951 | map = dm_get_live_table(md, &srcu_idx); |
952 | if (!map) |
953 | - return false; |
954 | + goto out; |
955 | |
956 | ret = dm_table_supports_dax(map, device_supports_dax, &blocksize); |
957 | |
958 | +out: |
959 | dm_put_live_table(md, srcu_idx); |
960 | |
961 | return ret; |
962 | diff --git a/drivers/net/ethernet/intel/e1000e/hw.h b/drivers/net/ethernet/intel/e1000e/hw.h |
963 | index eff75bd8a8f0b..11fdc27faa82b 100644 |
964 | --- a/drivers/net/ethernet/intel/e1000e/hw.h |
965 | +++ b/drivers/net/ethernet/intel/e1000e/hw.h |
966 | @@ -86,6 +86,12 @@ struct e1000_hw; |
967 | #define E1000_DEV_ID_PCH_ICP_I219_V8 0x15E0 |
968 | #define E1000_DEV_ID_PCH_ICP_I219_LM9 0x15E1 |
969 | #define E1000_DEV_ID_PCH_ICP_I219_V9 0x15E2 |
970 | +#define E1000_DEV_ID_PCH_CMP_I219_LM10 0x0D4E |
971 | +#define E1000_DEV_ID_PCH_CMP_I219_V10 0x0D4F |
972 | +#define E1000_DEV_ID_PCH_CMP_I219_LM11 0x0D4C |
973 | +#define E1000_DEV_ID_PCH_CMP_I219_V11 0x0D4D |
974 | +#define E1000_DEV_ID_PCH_CMP_I219_LM12 0x0D53 |
975 | +#define E1000_DEV_ID_PCH_CMP_I219_V12 0x0D55 |
976 | |
977 | #define E1000_REVISION_4 4 |
978 | |
979 | diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c |
980 | index 1ec33c6144742..4cb05a31e66df 100644 |
981 | --- a/drivers/net/ethernet/intel/e1000e/netdev.c |
982 | +++ b/drivers/net/ethernet/intel/e1000e/netdev.c |
983 | @@ -7568,6 +7568,12 @@ static const struct pci_device_id e1000_pci_tbl[] = { |
984 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ICP_I219_V8), board_pch_cnp }, |
985 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ICP_I219_LM9), board_pch_cnp }, |
986 | { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ICP_I219_V9), board_pch_cnp }, |
987 | + { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CMP_I219_LM10), board_pch_cnp }, |
988 | + { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CMP_I219_V10), board_pch_cnp }, |
989 | + { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CMP_I219_LM11), board_pch_cnp }, |
990 | + { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CMP_I219_V11), board_pch_cnp }, |
991 | + { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CMP_I219_LM12), board_pch_spt }, |
992 | + { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CMP_I219_V12), board_pch_spt }, |
993 | |
994 | { 0, 0, 0, 0, 0, 0, 0 } /* terminate list */ |
995 | }; |
996 | diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c |
997 | index 42eb7a7ecd96b..362b7ca6f3b2a 100644 |
998 | --- a/drivers/net/hyperv/netvsc_drv.c |
999 | +++ b/drivers/net/hyperv/netvsc_drv.c |
1000 | @@ -366,7 +366,7 @@ static u16 netvsc_select_queue(struct net_device *ndev, struct sk_buff *skb, |
1001 | } |
1002 | rcu_read_unlock(); |
1003 | |
1004 | - while (unlikely(txq >= ndev->real_num_tx_queues)) |
1005 | + while (txq >= ndev->real_num_tx_queues) |
1006 | txq -= ndev->real_num_tx_queues; |
1007 | |
1008 | return txq; |
1009 | diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c |
1010 | index dce4d6782ceb1..dae050d1f814d 100644 |
1011 | --- a/drivers/nvme/host/fc.c |
1012 | +++ b/drivers/nvme/host/fc.c |
1013 | @@ -1820,6 +1820,7 @@ nvme_fc_term_aen_ops(struct nvme_fc_ctrl *ctrl) |
1014 | struct nvme_fc_fcp_op *aen_op; |
1015 | int i; |
1016 | |
1017 | + cancel_work_sync(&ctrl->ctrl.async_event_work); |
1018 | aen_op = ctrl->aen_ops; |
1019 | for (i = 0; i < NVME_NR_AEN_COMMANDS; i++, aen_op++) { |
1020 | if (!aen_op->fcp_req.private) |
1021 | diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c |
1022 | index f0847f2bb117b..f9444272f861e 100644 |
1023 | --- a/drivers/nvme/host/rdma.c |
1024 | +++ b/drivers/nvme/host/rdma.c |
1025 | @@ -769,6 +769,7 @@ static void nvme_rdma_destroy_admin_queue(struct nvme_rdma_ctrl *ctrl, |
1026 | blk_mq_free_tag_set(ctrl->ctrl.admin_tagset); |
1027 | } |
1028 | if (ctrl->async_event_sqe.data) { |
1029 | + cancel_work_sync(&ctrl->ctrl.async_event_work); |
1030 | nvme_rdma_free_qe(ctrl->device->dev, &ctrl->async_event_sqe, |
1031 | sizeof(struct nvme_command), DMA_TO_DEVICE); |
1032 | ctrl->async_event_sqe.data = NULL; |
1033 | diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c |
1034 | index 9b81763b44d99..c782005ee99f9 100644 |
1035 | --- a/drivers/nvme/host/tcp.c |
1036 | +++ b/drivers/nvme/host/tcp.c |
1037 | @@ -1507,6 +1507,7 @@ static struct blk_mq_tag_set *nvme_tcp_alloc_tagset(struct nvme_ctrl *nctrl, |
1038 | static void nvme_tcp_free_admin_queue(struct nvme_ctrl *ctrl) |
1039 | { |
1040 | if (to_tcp_ctrl(ctrl)->async_req.pdu) { |
1041 | + cancel_work_sync(&ctrl->async_event_work); |
1042 | nvme_tcp_free_async_req(to_tcp_ctrl(ctrl)); |
1043 | to_tcp_ctrl(ctrl)->async_req.pdu = NULL; |
1044 | } |
1045 | diff --git a/drivers/rapidio/Kconfig b/drivers/rapidio/Kconfig |
1046 | index 677d1aff61b7f..788e7830771be 100644 |
1047 | --- a/drivers/rapidio/Kconfig |
1048 | +++ b/drivers/rapidio/Kconfig |
1049 | @@ -37,7 +37,7 @@ config RAPIDIO_ENABLE_RX_TX_PORTS |
1050 | config RAPIDIO_DMA_ENGINE |
1051 | bool "DMA Engine support for RapidIO" |
1052 | depends on RAPIDIO |
1053 | - select DMADEVICES |
1054 | + depends on DMADEVICES |
1055 | select DMA_ENGINE |
1056 | help |
1057 | Say Y here if you want to use DMA Engine frameork for RapidIO data |
1058 | diff --git a/drivers/regulator/pwm-regulator.c b/drivers/regulator/pwm-regulator.c |
1059 | index e74e11101fc15..0a9d61a91f436 100644 |
1060 | --- a/drivers/regulator/pwm-regulator.c |
1061 | +++ b/drivers/regulator/pwm-regulator.c |
1062 | @@ -279,7 +279,7 @@ static int pwm_regulator_init_table(struct platform_device *pdev, |
1063 | return ret; |
1064 | } |
1065 | |
1066 | - drvdata->state = -EINVAL; |
1067 | + drvdata->state = -ENOTRECOVERABLE; |
1068 | drvdata->duty_cycle_table = duty_cycle_table; |
1069 | drvdata->desc.ops = &pwm_regulator_voltage_table_ops; |
1070 | drvdata->desc.n_voltages = length / sizeof(*duty_cycle_table); |
1071 | diff --git a/drivers/s390/crypto/zcrypt_ccamisc.c b/drivers/s390/crypto/zcrypt_ccamisc.c |
1072 | index 110fe9d0cb910..03999b06affd4 100644 |
1073 | --- a/drivers/s390/crypto/zcrypt_ccamisc.c |
1074 | +++ b/drivers/s390/crypto/zcrypt_ccamisc.c |
1075 | @@ -1684,9 +1684,9 @@ int cca_findcard2(u32 **apqns, u32 *nr_apqns, u16 cardnr, u16 domain, |
1076 | *nr_apqns = 0; |
1077 | |
1078 | /* fetch status of all crypto cards */ |
1079 | - device_status = kmalloc_array(MAX_ZDEV_ENTRIES_EXT, |
1080 | - sizeof(struct zcrypt_device_status_ext), |
1081 | - GFP_KERNEL); |
1082 | + device_status = kvmalloc_array(MAX_ZDEV_ENTRIES_EXT, |
1083 | + sizeof(struct zcrypt_device_status_ext), |
1084 | + GFP_KERNEL); |
1085 | if (!device_status) |
1086 | return -ENOMEM; |
1087 | zcrypt_device_status_mask_ext(device_status); |
1088 | @@ -1754,7 +1754,7 @@ int cca_findcard2(u32 **apqns, u32 *nr_apqns, u16 cardnr, u16 domain, |
1089 | verify = 0; |
1090 | } |
1091 | |
1092 | - kfree(device_status); |
1093 | + kvfree(device_status); |
1094 | return rc; |
1095 | } |
1096 | EXPORT_SYMBOL(cca_findcard2); |
1097 | diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c |
1098 | index e00dc4693fcbd..589ddf003886e 100644 |
1099 | --- a/drivers/scsi/libfc/fc_disc.c |
1100 | +++ b/drivers/scsi/libfc/fc_disc.c |
1101 | @@ -634,8 +634,6 @@ free_fp: |
1102 | fc_frame_free(fp); |
1103 | out: |
1104 | kref_put(&rdata->kref, fc_rport_destroy); |
1105 | - if (!IS_ERR(fp)) |
1106 | - fc_frame_free(fp); |
1107 | } |
1108 | |
1109 | /** |
1110 | diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c |
1111 | index d7302c2052f91..10975f3f7ff65 100644 |
1112 | --- a/drivers/scsi/libsas/sas_discover.c |
1113 | +++ b/drivers/scsi/libsas/sas_discover.c |
1114 | @@ -182,10 +182,11 @@ int sas_notify_lldd_dev_found(struct domain_device *dev) |
1115 | pr_warn("driver on host %s cannot handle device %llx, error:%d\n", |
1116 | dev_name(sas_ha->dev), |
1117 | SAS_ADDR(dev->sas_addr), res); |
1118 | + return res; |
1119 | } |
1120 | set_bit(SAS_DEV_FOUND, &dev->state); |
1121 | kref_get(&dev->kref); |
1122 | - return res; |
1123 | + return 0; |
1124 | } |
1125 | |
1126 | |
1127 | diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c |
1128 | index 94d8f28341009..4e994a693e3f5 100644 |
1129 | --- a/drivers/scsi/lpfc/lpfc_els.c |
1130 | +++ b/drivers/scsi/lpfc/lpfc_els.c |
1131 | @@ -4442,7 +4442,9 @@ lpfc_cmpl_els_rsp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, |
1132 | out: |
1133 | if (ndlp && NLP_CHK_NODE_ACT(ndlp) && shost) { |
1134 | spin_lock_irq(shost->host_lock); |
1135 | - ndlp->nlp_flag &= ~(NLP_ACC_REGLOGIN | NLP_RM_DFLT_RPI); |
1136 | + if (mbox) |
1137 | + ndlp->nlp_flag &= ~NLP_ACC_REGLOGIN; |
1138 | + ndlp->nlp_flag &= ~NLP_RM_DFLT_RPI; |
1139 | spin_unlock_irq(shost->host_lock); |
1140 | |
1141 | /* If the node is not being used by another discovery thread, |
1142 | diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c |
1143 | index 7e48154e11c36..027bf5b2981b9 100644 |
1144 | --- a/drivers/scsi/pm8001/pm8001_sas.c |
1145 | +++ b/drivers/scsi/pm8001/pm8001_sas.c |
1146 | @@ -816,7 +816,7 @@ pm8001_exec_internal_task_abort(struct pm8001_hba_info *pm8001_ha, |
1147 | |
1148 | res = pm8001_tag_alloc(pm8001_ha, &ccb_tag); |
1149 | if (res) |
1150 | - return res; |
1151 | + goto ex_err; |
1152 | ccb = &pm8001_ha->ccb_info[ccb_tag]; |
1153 | ccb->device = pm8001_dev; |
1154 | ccb->ccb_tag = ccb_tag; |
1155 | diff --git a/drivers/spi/spi-loopback-test.c b/drivers/spi/spi-loopback-test.c |
1156 | index 6f18d49527673..51633b2b64371 100644 |
1157 | --- a/drivers/spi/spi-loopback-test.c |
1158 | +++ b/drivers/spi/spi-loopback-test.c |
1159 | @@ -90,7 +90,7 @@ static struct spi_test spi_tests[] = { |
1160 | { |
1161 | .description = "tx/rx-transfer - crossing PAGE_SIZE", |
1162 | .fill_option = FILL_COUNT_8, |
1163 | - .iterate_len = { ITERATE_MAX_LEN }, |
1164 | + .iterate_len = { ITERATE_LEN }, |
1165 | .iterate_tx_align = ITERATE_ALIGN, |
1166 | .iterate_rx_align = ITERATE_ALIGN, |
1167 | .transfer_count = 1, |
1168 | diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c |
1169 | index 6a81b2a33cb4b..982753ac1bf6c 100644 |
1170 | --- a/drivers/spi/spi.c |
1171 | +++ b/drivers/spi/spi.c |
1172 | @@ -1241,8 +1241,6 @@ out: |
1173 | if (msg->status && ctlr->handle_err) |
1174 | ctlr->handle_err(ctlr, msg); |
1175 | |
1176 | - spi_res_release(ctlr, msg); |
1177 | - |
1178 | spi_finalize_current_message(ctlr); |
1179 | |
1180 | return ret; |
1181 | @@ -1525,6 +1523,13 @@ void spi_finalize_current_message(struct spi_controller *ctlr) |
1182 | |
1183 | spi_unmap_msg(ctlr, mesg); |
1184 | |
1185 | + /* In the prepare_messages callback the spi bus has the opportunity to |
1186 | + * split a transfer to smaller chunks. |
1187 | + * Release splited transfers here since spi_map_msg is done on the |
1188 | + * splited transfers. |
1189 | + */ |
1190 | + spi_res_release(ctlr, mesg); |
1191 | + |
1192 | if (ctlr->cur_msg_prepared && ctlr->unprepare_message) { |
1193 | ret = ctlr->unprepare_message(ctlr, mesg); |
1194 | if (ret) { |
1195 | diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c |
1196 | index 7cad66eb39fff..8814ff38aa67b 100644 |
1197 | --- a/drivers/tty/serial/8250/8250_pci.c |
1198 | +++ b/drivers/tty/serial/8250/8250_pci.c |
1199 | @@ -5568,6 +5568,17 @@ static const struct pci_device_id serial_pci_tbl[] = { |
1200 | PCI_ANY_ID, PCI_ANY_ID, |
1201 | 0, 0, pbn_wch384_4 }, |
1202 | |
1203 | + /* |
1204 | + * Realtek RealManage |
1205 | + */ |
1206 | + { PCI_VENDOR_ID_REALTEK, 0x816a, |
1207 | + PCI_ANY_ID, PCI_ANY_ID, |
1208 | + 0, 0, pbn_b0_1_115200 }, |
1209 | + |
1210 | + { PCI_VENDOR_ID_REALTEK, 0x816b, |
1211 | + PCI_ANY_ID, PCI_ANY_ID, |
1212 | + 0, 0, pbn_b0_1_115200 }, |
1213 | + |
1214 | /* Fintek PCI serial cards */ |
1215 | { PCI_DEVICE(0x1c29, 0x1104), .driver_data = pbn_fintek_4 }, |
1216 | { PCI_DEVICE(0x1c29, 0x1108), .driver_data = pbn_fintek_8 }, |
1217 | diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c |
1218 | index 084c48c5848fc..67cbd42421bee 100644 |
1219 | --- a/drivers/usb/class/usblp.c |
1220 | +++ b/drivers/usb/class/usblp.c |
1221 | @@ -827,6 +827,11 @@ static ssize_t usblp_read(struct file *file, char __user *buffer, size_t len, lo |
1222 | if (rv < 0) |
1223 | return rv; |
1224 | |
1225 | + if (!usblp->present) { |
1226 | + count = -ENODEV; |
1227 | + goto done; |
1228 | + } |
1229 | + |
1230 | if ((avail = usblp->rstatus) < 0) { |
1231 | printk(KERN_ERR "usblp%d: error %d reading from printer\n", |
1232 | usblp->minor, (int)avail); |
1233 | diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c |
1234 | index 2f068e525a374..4ee8105310989 100644 |
1235 | --- a/drivers/usb/core/quirks.c |
1236 | +++ b/drivers/usb/core/quirks.c |
1237 | @@ -397,6 +397,10 @@ static const struct usb_device_id usb_quirk_list[] = { |
1238 | /* Generic RTL8153 based ethernet adapters */ |
1239 | { USB_DEVICE(0x0bda, 0x8153), .driver_info = USB_QUIRK_NO_LPM }, |
1240 | |
1241 | + /* SONiX USB DEVICE Touchpad */ |
1242 | + { USB_DEVICE(0x0c45, 0x7056), .driver_info = |
1243 | + USB_QUIRK_IGNORE_REMOTE_WAKEUP }, |
1244 | + |
1245 | /* Action Semiconductor flash disk */ |
1246 | { USB_DEVICE(0x10d6, 0x2200), .driver_info = |
1247 | USB_QUIRK_STRING_FETCH_255 }, |
1248 | diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c |
1249 | index cf2b7ae93b7e9..0e5c56e065591 100644 |
1250 | --- a/drivers/usb/host/ehci-hcd.c |
1251 | +++ b/drivers/usb/host/ehci-hcd.c |
1252 | @@ -22,6 +22,7 @@ |
1253 | #include <linux/interrupt.h> |
1254 | #include <linux/usb.h> |
1255 | #include <linux/usb/hcd.h> |
1256 | +#include <linux/usb/otg.h> |
1257 | #include <linux/moduleparam.h> |
1258 | #include <linux/dma-mapping.h> |
1259 | #include <linux/debugfs.h> |
1260 | diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c |
1261 | index ce0eaf7d7c12a..087402aec5cbe 100644 |
1262 | --- a/drivers/usb/host/ehci-hub.c |
1263 | +++ b/drivers/usb/host/ehci-hub.c |
1264 | @@ -14,7 +14,6 @@ |
1265 | */ |
1266 | |
1267 | /*-------------------------------------------------------------------------*/ |
1268 | -#include <linux/usb/otg.h> |
1269 | |
1270 | #define PORT_WAKE_BITS (PORT_WKOC_E|PORT_WKDISC_E|PORT_WKCONN_E) |
1271 | |
1272 | diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c |
1273 | index 5fcad96e06564..1ec1baa7604ed 100644 |
1274 | --- a/drivers/usb/storage/uas.c |
1275 | +++ b/drivers/usb/storage/uas.c |
1276 | @@ -662,8 +662,7 @@ static int uas_queuecommand_lck(struct scsi_cmnd *cmnd, |
1277 | if (devinfo->resetting) { |
1278 | cmnd->result = DID_ERROR << 16; |
1279 | cmnd->scsi_done(cmnd); |
1280 | - spin_unlock_irqrestore(&devinfo->lock, flags); |
1281 | - return 0; |
1282 | + goto zombie; |
1283 | } |
1284 | |
1285 | /* Find a free uas-tag */ |
1286 | @@ -699,6 +698,16 @@ static int uas_queuecommand_lck(struct scsi_cmnd *cmnd, |
1287 | cmdinfo->state &= ~(SUBMIT_DATA_IN_URB | SUBMIT_DATA_OUT_URB); |
1288 | |
1289 | err = uas_submit_urbs(cmnd, devinfo); |
1290 | + /* |
1291 | + * in case of fatal errors the SCSI layer is peculiar |
1292 | + * a command that has finished is a success for the purpose |
1293 | + * of queueing, no matter how fatal the error |
1294 | + */ |
1295 | + if (err == -ENODEV) { |
1296 | + cmnd->result = DID_ERROR << 16; |
1297 | + cmnd->scsi_done(cmnd); |
1298 | + goto zombie; |
1299 | + } |
1300 | if (err) { |
1301 | /* If we did nothing, give up now */ |
1302 | if (cmdinfo->state & SUBMIT_STATUS_URB) { |
1303 | @@ -709,6 +718,7 @@ static int uas_queuecommand_lck(struct scsi_cmnd *cmnd, |
1304 | } |
1305 | |
1306 | devinfo->cmnd[idx] = cmnd; |
1307 | +zombie: |
1308 | spin_unlock_irqrestore(&devinfo->lock, flags); |
1309 | return 0; |
1310 | } |
1311 | diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c |
1312 | index ba288b964dc84..4d56408ac623d 100644 |
1313 | --- a/drivers/usb/typec/ucsi/ucsi.c |
1314 | +++ b/drivers/usb/typec/ucsi/ucsi.c |
1315 | @@ -246,14 +246,18 @@ void ucsi_altmode_update_active(struct ucsi_connector *con) |
1316 | con->partner_altmode[i] == altmode); |
1317 | } |
1318 | |
1319 | -static u8 ucsi_altmode_next_mode(struct typec_altmode **alt, u16 svid) |
1320 | +static int ucsi_altmode_next_mode(struct typec_altmode **alt, u16 svid) |
1321 | { |
1322 | u8 mode = 1; |
1323 | int i; |
1324 | |
1325 | - for (i = 0; alt[i]; i++) |
1326 | + for (i = 0; alt[i]; i++) { |
1327 | + if (i > MODE_DISCOVERY_MAX) |
1328 | + return -ERANGE; |
1329 | + |
1330 | if (alt[i]->svid == svid) |
1331 | mode++; |
1332 | + } |
1333 | |
1334 | return mode; |
1335 | } |
1336 | @@ -288,8 +292,11 @@ static int ucsi_register_altmode(struct ucsi_connector *con, |
1337 | goto err; |
1338 | } |
1339 | |
1340 | - desc->mode = ucsi_altmode_next_mode(con->port_altmode, |
1341 | - desc->svid); |
1342 | + ret = ucsi_altmode_next_mode(con->port_altmode, desc->svid); |
1343 | + if (ret < 0) |
1344 | + return ret; |
1345 | + |
1346 | + desc->mode = ret; |
1347 | |
1348 | switch (desc->svid) { |
1349 | case USB_TYPEC_DP_SID: |
1350 | @@ -315,8 +322,11 @@ static int ucsi_register_altmode(struct ucsi_connector *con, |
1351 | goto err; |
1352 | } |
1353 | |
1354 | - desc->mode = ucsi_altmode_next_mode(con->partner_altmode, |
1355 | - desc->svid); |
1356 | + ret = ucsi_altmode_next_mode(con->partner_altmode, desc->svid); |
1357 | + if (ret < 0) |
1358 | + return ret; |
1359 | + |
1360 | + desc->mode = ret; |
1361 | |
1362 | alt = typec_partner_register_altmode(con->partner, desc); |
1363 | if (IS_ERR(alt)) { |
1364 | diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c |
1365 | index 8685d28dfdaaf..dc7f5c4f0607e 100644 |
1366 | --- a/drivers/video/fbdev/core/fbcon.c |
1367 | +++ b/drivers/video/fbdev/core/fbcon.c |
1368 | @@ -2012,7 +2012,7 @@ static int fbcon_resize(struct vc_data *vc, unsigned int width, |
1369 | struct fb_var_screeninfo var = info->var; |
1370 | int x_diff, y_diff, virt_w, virt_h, virt_fw, virt_fh; |
1371 | |
1372 | - if (ops->p && ops->p->userfont && FNTSIZE(vc->vc_font.data)) { |
1373 | + if (p->userfont && FNTSIZE(vc->vc_font.data)) { |
1374 | int size; |
1375 | int pitch = PITCH(vc->vc_font.width); |
1376 | |
1377 | diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c |
1378 | index eb2e3db3916f0..17df90b5f57a2 100644 |
1379 | --- a/fs/cifs/inode.c |
1380 | +++ b/fs/cifs/inode.c |
1381 | @@ -898,6 +898,8 @@ cifs_get_inode_info(struct inode **inode, const char *full_path, |
1382 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MODE_FROM_SID) { |
1383 | rc = cifs_acl_to_fattr(cifs_sb, &fattr, *inode, true, |
1384 | full_path, fid); |
1385 | + if (rc == -EREMOTE) |
1386 | + rc = 0; |
1387 | if (rc) { |
1388 | cifs_dbg(FYI, "%s: Get mode from SID failed. rc=%d\n", |
1389 | __func__, rc); |
1390 | @@ -906,6 +908,8 @@ cifs_get_inode_info(struct inode **inode, const char *full_path, |
1391 | } else if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) { |
1392 | rc = cifs_acl_to_fattr(cifs_sb, &fattr, *inode, false, |
1393 | full_path, fid); |
1394 | + if (rc == -EREMOTE) |
1395 | + rc = 0; |
1396 | if (rc) { |
1397 | cifs_dbg(FYI, "%s: Getting ACL failed with error: %d\n", |
1398 | __func__, rc); |
1399 | diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c |
1400 | index ec9a1f9ce2dd6..68be334afc286 100644 |
1401 | --- a/fs/f2fs/data.c |
1402 | +++ b/fs/f2fs/data.c |
1403 | @@ -2753,6 +2753,9 @@ static int check_direct_IO(struct inode *inode, struct iov_iter *iter, |
1404 | unsigned long align = offset | iov_iter_alignment(iter); |
1405 | struct block_device *bdev = inode->i_sb->s_bdev; |
1406 | |
1407 | + if (iov_iter_rw(iter) == READ && offset >= i_size_read(inode)) |
1408 | + return 1; |
1409 | + |
1410 | if (align & blocksize_mask) { |
1411 | if (bdev) |
1412 | blkbits = blksize_bits(bdev_logical_block_size(bdev)); |
1413 | diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c |
1414 | index daeac4268c1ab..8a67b933ccd42 100644 |
1415 | --- a/fs/f2fs/node.c |
1416 | +++ b/fs/f2fs/node.c |
1417 | @@ -2315,6 +2315,9 @@ static int __f2fs_build_free_nids(struct f2fs_sb_info *sbi, |
1418 | if (unlikely(nid >= nm_i->max_nid)) |
1419 | nid = 0; |
1420 | |
1421 | + if (unlikely(nid % NAT_ENTRY_PER_BLOCK)) |
1422 | + nid = NAT_BLOCK_OFFSET(nid) * NAT_ENTRY_PER_BLOCK; |
1423 | + |
1424 | /* Enough entries */ |
1425 | if (nm_i->nid_cnt[FREE_NID] >= NAT_ENTRY_PER_BLOCK) |
1426 | return 0; |
1427 | diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c |
1428 | index 83cf64da474cb..d5b9274662db1 100644 |
1429 | --- a/fs/gfs2/glops.c |
1430 | +++ b/fs/gfs2/glops.c |
1431 | @@ -87,6 +87,8 @@ static void gfs2_ail_empty_gl(struct gfs2_glock *gl) |
1432 | memset(&tr, 0, sizeof(tr)); |
1433 | INIT_LIST_HEAD(&tr.tr_buf); |
1434 | INIT_LIST_HEAD(&tr.tr_databuf); |
1435 | + INIT_LIST_HEAD(&tr.tr_ail1_list); |
1436 | + INIT_LIST_HEAD(&tr.tr_ail2_list); |
1437 | tr.tr_revokes = atomic_read(&gl->gl_ail_count); |
1438 | |
1439 | if (!tr.tr_revokes) { |
1440 | diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c |
1441 | index a4b6a49462a41..00a90fc725977 100644 |
1442 | --- a/fs/gfs2/log.c |
1443 | +++ b/fs/gfs2/log.c |
1444 | @@ -810,8 +810,6 @@ void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl, u32 flags) |
1445 | tr = sdp->sd_log_tr; |
1446 | if (tr) { |
1447 | sdp->sd_log_tr = NULL; |
1448 | - INIT_LIST_HEAD(&tr->tr_ail1_list); |
1449 | - INIT_LIST_HEAD(&tr->tr_ail2_list); |
1450 | tr->tr_first = sdp->sd_log_flush_head; |
1451 | if (unlikely (state == SFS_FROZEN)) |
1452 | gfs2_assert_withdraw(sdp, !tr->tr_num_buf_new && !tr->tr_num_databuf_new); |
1453 | diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c |
1454 | index 9d4227330de47..2a12d30ae0de4 100644 |
1455 | --- a/fs/gfs2/trans.c |
1456 | +++ b/fs/gfs2/trans.c |
1457 | @@ -53,6 +53,8 @@ int gfs2_trans_begin(struct gfs2_sbd *sdp, unsigned int blocks, |
1458 | sizeof(u64)); |
1459 | INIT_LIST_HEAD(&tr->tr_databuf); |
1460 | INIT_LIST_HEAD(&tr->tr_buf); |
1461 | + INIT_LIST_HEAD(&tr->tr_ail1_list); |
1462 | + INIT_LIST_HEAD(&tr->tr_ail2_list); |
1463 | |
1464 | sb_start_intwrite(sdp->sd_vfs); |
1465 | |
1466 | diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c |
1467 | index d0cb827b72cfa..00435556db0ce 100644 |
1468 | --- a/fs/nfs/nfs4proc.c |
1469 | +++ b/fs/nfs/nfs4proc.c |
1470 | @@ -3257,8 +3257,10 @@ static int _nfs4_do_setattr(struct inode *inode, |
1471 | |
1472 | /* Servers should only apply open mode checks for file size changes */ |
1473 | truncate = (arg->iap->ia_valid & ATTR_SIZE) ? true : false; |
1474 | - if (!truncate) |
1475 | + if (!truncate) { |
1476 | + nfs4_inode_make_writeable(inode); |
1477 | goto zero_stateid; |
1478 | + } |
1479 | |
1480 | if (nfs4_copy_delegation_stateid(inode, FMODE_WRITE, &arg->stateid, &delegation_cred)) { |
1481 | /* Use that stateid */ |
1482 | @@ -7232,7 +7234,12 @@ int nfs4_lock_delegation_recall(struct file_lock *fl, struct nfs4_state *state, |
1483 | err = nfs4_set_lock_state(state, fl); |
1484 | if (err != 0) |
1485 | return err; |
1486 | - err = _nfs4_do_setlk(state, F_SETLK, fl, NFS_LOCK_NEW); |
1487 | + do { |
1488 | + err = _nfs4_do_setlk(state, F_SETLK, fl, NFS_LOCK_NEW); |
1489 | + if (err != -NFS4ERR_DELAY) |
1490 | + break; |
1491 | + ssleep(1); |
1492 | + } while (err == -NFS4ERR_DELAY); |
1493 | return nfs4_handle_delegation_recall_error(server, state, stateid, fl, err); |
1494 | } |
1495 | |
1496 | diff --git a/include/linux/dax.h b/include/linux/dax.h |
1497 | index 9bd8528bd305f..72a7f03a59f4c 100644 |
1498 | --- a/include/linux/dax.h |
1499 | +++ b/include/linux/dax.h |
1500 | @@ -56,6 +56,8 @@ static inline void set_dax_synchronous(struct dax_device *dax_dev) |
1501 | { |
1502 | __set_dax_synchronous(dax_dev); |
1503 | } |
1504 | +bool dax_supported(struct dax_device *dax_dev, struct block_device *bdev, |
1505 | + int blocksize, sector_t start, sector_t len); |
1506 | /* |
1507 | * Check if given mapping is supported by the file / underlying device. |
1508 | */ |
1509 | @@ -102,6 +104,12 @@ static inline bool dax_synchronous(struct dax_device *dax_dev) |
1510 | static inline void set_dax_synchronous(struct dax_device *dax_dev) |
1511 | { |
1512 | } |
1513 | +static inline bool dax_supported(struct dax_device *dax_dev, |
1514 | + struct block_device *bdev, int blocksize, sector_t start, |
1515 | + sector_t len) |
1516 | +{ |
1517 | + return false; |
1518 | +} |
1519 | static inline bool daxdev_mapping_supported(struct vm_area_struct *vma, |
1520 | struct dax_device *dax_dev) |
1521 | { |
1522 | @@ -197,14 +205,23 @@ static inline void dax_unlock_page(struct page *page, dax_entry_t cookie) |
1523 | } |
1524 | #endif |
1525 | |
1526 | +#if IS_ENABLED(CONFIG_DAX) |
1527 | int dax_read_lock(void); |
1528 | void dax_read_unlock(int id); |
1529 | +#else |
1530 | +static inline int dax_read_lock(void) |
1531 | +{ |
1532 | + return 0; |
1533 | +} |
1534 | + |
1535 | +static inline void dax_read_unlock(int id) |
1536 | +{ |
1537 | +} |
1538 | +#endif /* CONFIG_DAX */ |
1539 | bool dax_alive(struct dax_device *dax_dev); |
1540 | void *dax_get_private(struct dax_device *dax_dev); |
1541 | long dax_direct_access(struct dax_device *dax_dev, pgoff_t pgoff, long nr_pages, |
1542 | void **kaddr, pfn_t *pfn); |
1543 | -bool dax_supported(struct dax_device *dax_dev, struct block_device *bdev, |
1544 | - int blocksize, sector_t start, sector_t len); |
1545 | size_t dax_copy_from_iter(struct dax_device *dax_dev, pgoff_t pgoff, void *addr, |
1546 | size_t bytes, struct iov_iter *i); |
1547 | size_t dax_copy_to_iter(struct dax_device *dax_dev, pgoff_t pgoff, void *addr, |
1548 | diff --git a/include/linux/i2c-algo-pca.h b/include/linux/i2c-algo-pca.h |
1549 | index d03071732db4a..7c522fdd9ea73 100644 |
1550 | --- a/include/linux/i2c-algo-pca.h |
1551 | +++ b/include/linux/i2c-algo-pca.h |
1552 | @@ -53,6 +53,20 @@ |
1553 | #define I2C_PCA_CON_SI 0x08 /* Serial Interrupt */ |
1554 | #define I2C_PCA_CON_CR 0x07 /* Clock Rate (MASK) */ |
1555 | |
1556 | +/** |
1557 | + * struct pca_i2c_bus_settings - The configured PCA i2c bus settings |
1558 | + * @mode: Configured i2c bus mode |
1559 | + * @tlow: Configured SCL LOW period |
1560 | + * @thi: Configured SCL HIGH period |
1561 | + * @clock_freq: The configured clock frequency |
1562 | + */ |
1563 | +struct pca_i2c_bus_settings { |
1564 | + int mode; |
1565 | + int tlow; |
1566 | + int thi; |
1567 | + int clock_freq; |
1568 | +}; |
1569 | + |
1570 | struct i2c_algo_pca_data { |
1571 | void *data; /* private low level data */ |
1572 | void (*write_byte) (void *data, int reg, int val); |
1573 | @@ -64,6 +78,7 @@ struct i2c_algo_pca_data { |
1574 | * For PCA9665, use the frequency you want here. */ |
1575 | unsigned int i2c_clock; |
1576 | unsigned int chip; |
1577 | + struct pca_i2c_bus_settings bus_settings; |
1578 | }; |
1579 | |
1580 | int i2c_pca_add_bus(struct i2c_adapter *); |
1581 | diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h |
1582 | index e735bc4075dc7..1b6b8e05868dd 100644 |
1583 | --- a/include/uapi/linux/kvm.h |
1584 | +++ b/include/uapi/linux/kvm.h |
1585 | @@ -768,9 +768,10 @@ struct kvm_ppc_resize_hpt { |
1586 | #define KVM_VM_PPC_HV 1 |
1587 | #define KVM_VM_PPC_PR 2 |
1588 | |
1589 | -/* on MIPS, 0 forces trap & emulate, 1 forces VZ ASE */ |
1590 | -#define KVM_VM_MIPS_TE 0 |
1591 | +/* on MIPS, 0 indicates auto, 1 forces VZ ASE, 2 forces trap & emulate */ |
1592 | +#define KVM_VM_MIPS_AUTO 0 |
1593 | #define KVM_VM_MIPS_VZ 1 |
1594 | +#define KVM_VM_MIPS_TE 2 |
1595 | |
1596 | #define KVM_S390_SIE_PAGE_OFFSET 1 |
1597 | |
1598 | diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c |
1599 | index 3128d95847125..3eb0b311b4a12 100644 |
1600 | --- a/mm/memory_hotplug.c |
1601 | +++ b/mm/memory_hotplug.c |
1602 | @@ -1566,6 +1566,20 @@ static int __ref __offline_pages(unsigned long start_pfn, |
1603 | /* check again */ |
1604 | ret = walk_system_ram_range(start_pfn, end_pfn - start_pfn, |
1605 | NULL, check_pages_isolated_cb); |
1606 | + /* |
1607 | + * per-cpu pages are drained in start_isolate_page_range, but if |
1608 | + * there are still pages that are not free, make sure that we |
1609 | + * drain again, because when we isolated range we might |
1610 | + * have raced with another thread that was adding pages to pcp |
1611 | + * list. |
1612 | + * |
1613 | + * Forward progress should be still guaranteed because |
1614 | + * pages on the pcp list can only belong to MOVABLE_ZONE |
1615 | + * because has_unmovable_pages explicitly checks for |
1616 | + * PageBuddy on freed pages on other zones. |
1617 | + */ |
1618 | + if (ret) |
1619 | + drain_all_pages(zone); |
1620 | } while (ret); |
1621 | |
1622 | /* Ok, all of our target is isolated. |
1623 | diff --git a/mm/page_isolation.c b/mm/page_isolation.c |
1624 | index 89c19c0feadb9..da0f6e1ae01e2 100644 |
1625 | --- a/mm/page_isolation.c |
1626 | +++ b/mm/page_isolation.c |
1627 | @@ -187,6 +187,14 @@ __first_valid_page(unsigned long pfn, unsigned long nr_pages) |
1628 | * pageblocks we may have modified and return -EBUSY to caller. This |
1629 | * prevents two threads from simultaneously working on overlapping ranges. |
1630 | * |
1631 | + * Please note that there is no strong synchronization with the page allocator |
1632 | + * either. Pages might be freed while their page blocks are marked ISOLATED. |
1633 | + * In some cases pages might still end up on pcp lists and that would allow |
1634 | + * for their allocation even when they are in fact isolated already. Depending |
1635 | + * on how strong of a guarantee the caller needs drain_all_pages might be needed |
1636 | + * (e.g. __offline_pages will need to call it after check for isolated range for |
1637 | + * a next retry). |
1638 | + * |
1639 | * Return: the number of isolated pageblocks on success and -EBUSY if any part |
1640 | * of range cannot be isolated. |
1641 | */ |
1642 | diff --git a/mm/percpu.c b/mm/percpu.c |
1643 | index 7e06a1e587209..806bc16f88eb8 100644 |
1644 | --- a/mm/percpu.c |
1645 | +++ b/mm/percpu.c |
1646 | @@ -1328,7 +1328,7 @@ static struct pcpu_chunk * __init pcpu_alloc_first_chunk(unsigned long tmp_addr, |
1647 | |
1648 | /* allocate chunk */ |
1649 | alloc_size = sizeof(struct pcpu_chunk) + |
1650 | - BITS_TO_LONGS(region_size >> PAGE_SHIFT); |
1651 | + BITS_TO_LONGS(region_size >> PAGE_SHIFT) * sizeof(unsigned long); |
1652 | chunk = memblock_alloc(alloc_size, SMP_CACHE_BYTES); |
1653 | if (!chunk) |
1654 | panic("%s: Failed to allocate %zu bytes\n", __func__, |
1655 | diff --git a/net/core/skbuff.c b/net/core/skbuff.c |
1656 | index f80b6999ca1cb..08d9915d50c0f 100644 |
1657 | --- a/net/core/skbuff.c |
1658 | +++ b/net/core/skbuff.c |
1659 | @@ -5882,9 +5882,13 @@ static int pskb_carve_inside_nonlinear(struct sk_buff *skb, const u32 off, |
1660 | if (skb_has_frag_list(skb)) |
1661 | skb_clone_fraglist(skb); |
1662 | |
1663 | - if (k == 0) { |
1664 | - /* split line is in frag list */ |
1665 | - pskb_carve_frag_list(skb, shinfo, off - pos, gfp_mask); |
1666 | + /* split line is in frag list */ |
1667 | + if (k == 0 && pskb_carve_frag_list(skb, shinfo, off - pos, gfp_mask)) { |
1668 | + /* skb_frag_unref() is not needed here as shinfo->nr_frags = 0. */ |
1669 | + if (skb_has_frag_list(skb)) |
1670 | + kfree_skb_list(skb_shinfo(skb)->frag_list); |
1671 | + kfree(data); |
1672 | + return -ENOMEM; |
1673 | } |
1674 | skb_release_data(skb); |
1675 | |
1676 | diff --git a/net/dsa/tag_edsa.c b/net/dsa/tag_edsa.c |
1677 | index e8eaa804ccb9e..d6200ff982007 100644 |
1678 | --- a/net/dsa/tag_edsa.c |
1679 | +++ b/net/dsa/tag_edsa.c |
1680 | @@ -13,6 +13,16 @@ |
1681 | #define DSA_HLEN 4 |
1682 | #define EDSA_HLEN 8 |
1683 | |
1684 | +#define FRAME_TYPE_TO_CPU 0x00 |
1685 | +#define FRAME_TYPE_FORWARD 0x03 |
1686 | + |
1687 | +#define TO_CPU_CODE_MGMT_TRAP 0x00 |
1688 | +#define TO_CPU_CODE_FRAME2REG 0x01 |
1689 | +#define TO_CPU_CODE_IGMP_MLD_TRAP 0x02 |
1690 | +#define TO_CPU_CODE_POLICY_TRAP 0x03 |
1691 | +#define TO_CPU_CODE_ARP_MIRROR 0x04 |
1692 | +#define TO_CPU_CODE_POLICY_MIRROR 0x05 |
1693 | + |
1694 | static struct sk_buff *edsa_xmit(struct sk_buff *skb, struct net_device *dev) |
1695 | { |
1696 | struct dsa_port *dp = dsa_slave_to_port(dev); |
1697 | @@ -77,6 +87,8 @@ static struct sk_buff *edsa_rcv(struct sk_buff *skb, struct net_device *dev, |
1698 | struct packet_type *pt) |
1699 | { |
1700 | u8 *edsa_header; |
1701 | + int frame_type; |
1702 | + int code; |
1703 | int source_device; |
1704 | int source_port; |
1705 | |
1706 | @@ -91,8 +103,29 @@ static struct sk_buff *edsa_rcv(struct sk_buff *skb, struct net_device *dev, |
1707 | /* |
1708 | * Check that frame type is either TO_CPU or FORWARD. |
1709 | */ |
1710 | - if ((edsa_header[0] & 0xc0) != 0x00 && (edsa_header[0] & 0xc0) != 0xc0) |
1711 | + frame_type = edsa_header[0] >> 6; |
1712 | + |
1713 | + switch (frame_type) { |
1714 | + case FRAME_TYPE_TO_CPU: |
1715 | + code = (edsa_header[1] & 0x6) | ((edsa_header[2] >> 4) & 1); |
1716 | + |
1717 | + /* |
1718 | + * Mark the frame to never egress on any port of the same switch |
1719 | + * unless it's a trapped IGMP/MLD packet, in which case the |
1720 | + * bridge might want to forward it. |
1721 | + */ |
1722 | + if (code != TO_CPU_CODE_IGMP_MLD_TRAP) |
1723 | + skb->offload_fwd_mark = 1; |
1724 | + |
1725 | + break; |
1726 | + |
1727 | + case FRAME_TYPE_FORWARD: |
1728 | + skb->offload_fwd_mark = 1; |
1729 | + break; |
1730 | + |
1731 | + default: |
1732 | return NULL; |
1733 | + } |
1734 | |
1735 | /* |
1736 | * Determine source device and port. |
1737 | @@ -156,8 +189,6 @@ static struct sk_buff *edsa_rcv(struct sk_buff *skb, struct net_device *dev, |
1738 | 2 * ETH_ALEN); |
1739 | } |
1740 | |
1741 | - skb->offload_fwd_mark = 1; |
1742 | - |
1743 | return skb; |
1744 | } |
1745 | |
1746 | diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c |
1747 | index 4a020b6888608..1db9f62e466d9 100644 |
1748 | --- a/net/sunrpc/rpcb_clnt.c |
1749 | +++ b/net/sunrpc/rpcb_clnt.c |
1750 | @@ -988,8 +988,8 @@ static int rpcb_dec_getaddr(struct rpc_rqst *req, struct xdr_stream *xdr, |
1751 | p = xdr_inline_decode(xdr, len); |
1752 | if (unlikely(p == NULL)) |
1753 | goto out_fail; |
1754 | - dprintk("RPC: %5u RPCB_%s reply: %s\n", req->rq_task->tk_pid, |
1755 | - req->rq_task->tk_msg.rpc_proc->p_name, (char *)p); |
1756 | + dprintk("RPC: %5u RPCB_%s reply: %*pE\n", req->rq_task->tk_pid, |
1757 | + req->rq_task->tk_msg.rpc_proc->p_name, len, (char *)p); |
1758 | |
1759 | if (rpc_uaddr2sockaddr(req->rq_xprt->xprt_net, (char *)p, len, |
1760 | sap, sizeof(address)) == 0) |
1761 | diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c |
1762 | index d614090dae49d..54346ae47d112 100644 |
1763 | --- a/sound/pci/hda/patch_realtek.c |
1764 | +++ b/sound/pci/hda/patch_realtek.c |
1765 | @@ -2466,7 +2466,6 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = { |
1766 | SND_PCI_QUIRK(0x1462, 0x1276, "MSI-GL73", ALC1220_FIXUP_CLEVO_P950), |
1767 | SND_PCI_QUIRK(0x1462, 0x1293, "MSI-GP65", ALC1220_FIXUP_CLEVO_P950), |
1768 | SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD), |
1769 | - SND_PCI_QUIRK(0x1462, 0x9c37, "MSI X570-A PRO", ALC1220_FIXUP_CLEVO_P950), |
1770 | SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS), |
1771 | SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3), |
1772 | SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX), |
1773 | @@ -5975,6 +5974,40 @@ static void alc_fixup_disable_mic_vref(struct hda_codec *codec, |
1774 | snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ); |
1775 | } |
1776 | |
1777 | + |
1778 | +static void alc294_gx502_toggle_output(struct hda_codec *codec, |
1779 | + struct hda_jack_callback *cb) |
1780 | +{ |
1781 | + /* The Windows driver sets the codec up in a very different way where |
1782 | + * it appears to leave 0x10 = 0x8a20 set. For Linux we need to toggle it |
1783 | + */ |
1784 | + if (snd_hda_jack_detect_state(codec, 0x21) == HDA_JACK_PRESENT) |
1785 | + alc_write_coef_idx(codec, 0x10, 0x8a20); |
1786 | + else |
1787 | + alc_write_coef_idx(codec, 0x10, 0x0a20); |
1788 | +} |
1789 | + |
1790 | +static void alc294_fixup_gx502_hp(struct hda_codec *codec, |
1791 | + const struct hda_fixup *fix, int action) |
1792 | +{ |
1793 | + /* Pin 0x21: headphones/headset mic */ |
1794 | + if (!is_jack_detectable(codec, 0x21)) |
1795 | + return; |
1796 | + |
1797 | + switch (action) { |
1798 | + case HDA_FIXUP_ACT_PRE_PROBE: |
1799 | + snd_hda_jack_detect_enable_callback(codec, 0x21, |
1800 | + alc294_gx502_toggle_output); |
1801 | + break; |
1802 | + case HDA_FIXUP_ACT_INIT: |
1803 | + /* Make sure to start in a correct state, i.e. if |
1804 | + * headphones have been plugged in before powering up the system |
1805 | + */ |
1806 | + alc294_gx502_toggle_output(codec, NULL); |
1807 | + break; |
1808 | + } |
1809 | +} |
1810 | + |
1811 | static void alc285_fixup_hp_gpio_amp_init(struct hda_codec *codec, |
1812 | const struct hda_fixup *fix, int action) |
1813 | { |
1814 | @@ -6155,6 +6188,9 @@ enum { |
1815 | ALC285_FIXUP_THINKPAD_HEADSET_JACK, |
1816 | ALC294_FIXUP_ASUS_HPE, |
1817 | ALC294_FIXUP_ASUS_COEF_1B, |
1818 | + ALC294_FIXUP_ASUS_GX502_HP, |
1819 | + ALC294_FIXUP_ASUS_GX502_PINS, |
1820 | + ALC294_FIXUP_ASUS_GX502_VERBS, |
1821 | ALC285_FIXUP_HP_GPIO_LED, |
1822 | ALC285_FIXUP_HP_MUTE_LED, |
1823 | ALC236_FIXUP_HP_MUTE_LED, |
1824 | @@ -6173,6 +6209,7 @@ enum { |
1825 | ALC269_FIXUP_LEMOTE_A1802, |
1826 | ALC269_FIXUP_LEMOTE_A190X, |
1827 | ALC256_FIXUP_INTEL_NUC8_RUGGED, |
1828 | + ALC255_FIXUP_XIAOMI_HEADSET_MIC, |
1829 | }; |
1830 | |
1831 | static const struct hda_fixup alc269_fixups[] = { |
1832 | @@ -7320,6 +7357,33 @@ static const struct hda_fixup alc269_fixups[] = { |
1833 | .chained = true, |
1834 | .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC |
1835 | }, |
1836 | + [ALC294_FIXUP_ASUS_GX502_PINS] = { |
1837 | + .type = HDA_FIXUP_PINS, |
1838 | + .v.pins = (const struct hda_pintbl[]) { |
1839 | + { 0x19, 0x03a11050 }, /* front HP mic */ |
1840 | + { 0x1a, 0x01a11830 }, /* rear external mic */ |
1841 | + { 0x21, 0x03211020 }, /* front HP out */ |
1842 | + { } |
1843 | + }, |
1844 | + .chained = true, |
1845 | + .chain_id = ALC294_FIXUP_ASUS_GX502_VERBS |
1846 | + }, |
1847 | + [ALC294_FIXUP_ASUS_GX502_VERBS] = { |
1848 | + .type = HDA_FIXUP_VERBS, |
1849 | + .v.verbs = (const struct hda_verb[]) { |
1850 | + /* set 0x15 to HP-OUT ctrl */ |
1851 | + { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 }, |
1852 | + /* unmute the 0x15 amp */ |
1853 | + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000 }, |
1854 | + { } |
1855 | + }, |
1856 | + .chained = true, |
1857 | + .chain_id = ALC294_FIXUP_ASUS_GX502_HP |
1858 | + }, |
1859 | + [ALC294_FIXUP_ASUS_GX502_HP] = { |
1860 | + .type = HDA_FIXUP_FUNC, |
1861 | + .v.func = alc294_fixup_gx502_hp, |
1862 | + }, |
1863 | [ALC294_FIXUP_ASUS_COEF_1B] = { |
1864 | .type = HDA_FIXUP_VERBS, |
1865 | .v.verbs = (const struct hda_verb[]) { |
1866 | @@ -7509,6 +7573,16 @@ static const struct hda_fixup alc269_fixups[] = { |
1867 | .chained = true, |
1868 | .chain_id = ALC269_FIXUP_HEADSET_MODE |
1869 | }, |
1870 | + [ALC255_FIXUP_XIAOMI_HEADSET_MIC] = { |
1871 | + .type = HDA_FIXUP_VERBS, |
1872 | + .v.verbs = (const struct hda_verb[]) { |
1873 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 }, |
1874 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 }, |
1875 | + { } |
1876 | + }, |
1877 | + .chained = true, |
1878 | + .chain_id = ALC289_FIXUP_ASUS_GA401 |
1879 | + }, |
1880 | }; |
1881 | |
1882 | static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
1883 | @@ -7693,6 +7767,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
1884 | SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC), |
1885 | SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502), |
1886 | SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401), |
1887 | + SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS), |
1888 | SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2), |
1889 | SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC), |
1890 | SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC), |
1891 | @@ -7805,6 +7880,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
1892 | SND_PCI_QUIRK(0x1b35, 0x1236, "CZC TMI", ALC269_FIXUP_CZC_TMI), |
1893 | SND_PCI_QUIRK(0x1b35, 0x1237, "CZC L101", ALC269_FIXUP_CZC_L101), |
1894 | SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */ |
1895 | + SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC), |
1896 | SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC), |
1897 | SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE), |
1898 | SND_PCI_QUIRK(0x1c06, 0x2013, "Lemote A1802", ALC269_FIXUP_LEMOTE_A1802), |
1899 | @@ -7982,6 +8058,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = { |
1900 | {.id = ALC298_FIXUP_HUAWEI_MBX_STEREO, .name = "huawei-mbx-stereo"}, |
1901 | {.id = ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, .name = "alc256-medion-headset"}, |
1902 | {.id = ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, .name = "alc298-samsung-headphone"}, |
1903 | + {.id = ALC255_FIXUP_XIAOMI_HEADSET_MIC, .name = "alc255-xiaomi-headset"}, |
1904 | {} |
1905 | }; |
1906 | #define ALC225_STANDARD_PINS \ |
1907 | diff --git a/sound/soc/meson/axg-toddr.c b/sound/soc/meson/axg-toddr.c |
1908 | index ecf41c7549a65..32b9fd59353a4 100644 |
1909 | --- a/sound/soc/meson/axg-toddr.c |
1910 | +++ b/sound/soc/meson/axg-toddr.c |
1911 | @@ -18,6 +18,7 @@ |
1912 | #define CTRL0_TODDR_SEL_RESAMPLE BIT(30) |
1913 | #define CTRL0_TODDR_EXT_SIGNED BIT(29) |
1914 | #define CTRL0_TODDR_PP_MODE BIT(28) |
1915 | +#define CTRL0_TODDR_SYNC_CH BIT(27) |
1916 | #define CTRL0_TODDR_TYPE_MASK GENMASK(15, 13) |
1917 | #define CTRL0_TODDR_TYPE(x) ((x) << 13) |
1918 | #define CTRL0_TODDR_MSB_POS_MASK GENMASK(12, 8) |
1919 | @@ -184,10 +185,31 @@ static const struct axg_fifo_match_data axg_toddr_match_data = { |
1920 | .dai_drv = &axg_toddr_dai_drv |
1921 | }; |
1922 | |
1923 | +static int g12a_toddr_dai_startup(struct snd_pcm_substream *substream, |
1924 | + struct snd_soc_dai *dai) |
1925 | +{ |
1926 | + struct axg_fifo *fifo = snd_soc_dai_get_drvdata(dai); |
1927 | + int ret; |
1928 | + |
1929 | + ret = axg_toddr_dai_startup(substream, dai); |
1930 | + if (ret) |
1931 | + return ret; |
1932 | + |
1933 | + /* |
1934 | + * Make sure the first channel ends up in the at beginning of the output |
1935 | + * As weird as it looks, without this the first channel may be misplaced |
1936 | + * in memory, with a random shift of 2 channels. |
1937 | + */ |
1938 | + regmap_update_bits(fifo->map, FIFO_CTRL0, CTRL0_TODDR_SYNC_CH, |
1939 | + CTRL0_TODDR_SYNC_CH); |
1940 | + |
1941 | + return 0; |
1942 | +} |
1943 | + |
1944 | static const struct snd_soc_dai_ops g12a_toddr_ops = { |
1945 | .prepare = g12a_toddr_dai_prepare, |
1946 | .hw_params = axg_toddr_dai_hw_params, |
1947 | - .startup = axg_toddr_dai_startup, |
1948 | + .startup = g12a_toddr_dai_startup, |
1949 | .shutdown = axg_toddr_dai_shutdown, |
1950 | }; |
1951 | |
1952 | diff --git a/sound/soc/qcom/apq8016_sbc.c b/sound/soc/qcom/apq8016_sbc.c |
1953 | index ac75838bbfabe..15a88020dfab2 100644 |
1954 | --- a/sound/soc/qcom/apq8016_sbc.c |
1955 | +++ b/sound/soc/qcom/apq8016_sbc.c |
1956 | @@ -235,6 +235,7 @@ static int apq8016_sbc_platform_probe(struct platform_device *pdev) |
1957 | return -ENOMEM; |
1958 | |
1959 | card->dev = dev; |
1960 | + card->owner = THIS_MODULE; |
1961 | card->dapm_widgets = apq8016_sbc_dapm_widgets; |
1962 | card->num_dapm_widgets = ARRAY_SIZE(apq8016_sbc_dapm_widgets); |
1963 | data = apq8016_sbc_parse_of(card); |
1964 | diff --git a/sound/soc/qcom/apq8096.c b/sound/soc/qcom/apq8096.c |
1965 | index 94363fd6846ab..c10c5f2ec29b7 100644 |
1966 | --- a/sound/soc/qcom/apq8096.c |
1967 | +++ b/sound/soc/qcom/apq8096.c |
1968 | @@ -114,6 +114,7 @@ static int apq8096_platform_probe(struct platform_device *pdev) |
1969 | return -ENOMEM; |
1970 | |
1971 | card->dev = dev; |
1972 | + card->owner = THIS_MODULE; |
1973 | dev_set_drvdata(dev, card); |
1974 | ret = qcom_snd_parse_of(card); |
1975 | if (ret) { |
1976 | diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c |
1977 | index 8ada4ecba8472..10322690c0eaa 100644 |
1978 | --- a/sound/soc/qcom/common.c |
1979 | +++ b/sound/soc/qcom/common.c |
1980 | @@ -45,8 +45,10 @@ int qcom_snd_parse_of(struct snd_soc_card *card) |
1981 | |
1982 | for_each_child_of_node(dev->of_node, np) { |
1983 | dlc = devm_kzalloc(dev, 2 * sizeof(*dlc), GFP_KERNEL); |
1984 | - if (!dlc) |
1985 | - return -ENOMEM; |
1986 | + if (!dlc) { |
1987 | + ret = -ENOMEM; |
1988 | + goto err; |
1989 | + } |
1990 | |
1991 | link->cpus = &dlc[0]; |
1992 | link->platforms = &dlc[1]; |
1993 | diff --git a/sound/soc/qcom/sdm845.c b/sound/soc/qcom/sdm845.c |
1994 | index 28f3cef696e61..7e6c41e63d8e1 100644 |
1995 | --- a/sound/soc/qcom/sdm845.c |
1996 | +++ b/sound/soc/qcom/sdm845.c |
1997 | @@ -410,6 +410,7 @@ static int sdm845_snd_platform_probe(struct platform_device *pdev) |
1998 | card->dapm_widgets = sdm845_snd_widgets; |
1999 | card->num_dapm_widgets = ARRAY_SIZE(sdm845_snd_widgets); |
2000 | card->dev = dev; |
2001 | + card->owner = THIS_MODULE; |
2002 | dev_set_drvdata(dev, card); |
2003 | ret = qcom_snd_parse_of(card); |
2004 | if (ret) { |
2005 | diff --git a/sound/soc/qcom/storm.c b/sound/soc/qcom/storm.c |
2006 | index e6666e597265a..236759179100a 100644 |
2007 | --- a/sound/soc/qcom/storm.c |
2008 | +++ b/sound/soc/qcom/storm.c |
2009 | @@ -96,6 +96,7 @@ static int storm_platform_probe(struct platform_device *pdev) |
2010 | return -ENOMEM; |
2011 | |
2012 | card->dev = &pdev->dev; |
2013 | + card->owner = THIS_MODULE; |
2014 | |
2015 | ret = snd_soc_of_parse_card_name(card, "qcom,model"); |
2016 | if (ret) { |
2017 | diff --git a/tools/perf/tests/bp_signal.c b/tools/perf/tests/bp_signal.c |
2018 | index 166f411568a50..b5cdedd13cbc7 100644 |
2019 | --- a/tools/perf/tests/bp_signal.c |
2020 | +++ b/tools/perf/tests/bp_signal.c |
2021 | @@ -45,10 +45,13 @@ volatile long the_var; |
2022 | #if defined (__x86_64__) |
2023 | extern void __test_function(volatile long *ptr); |
2024 | asm ( |
2025 | + ".pushsection .text;" |
2026 | ".globl __test_function\n" |
2027 | + ".type __test_function, @function;" |
2028 | "__test_function:\n" |
2029 | "incq (%rdi)\n" |
2030 | - "ret\n"); |
2031 | + "ret\n" |
2032 | + ".popsection\n"); |
2033 | #else |
2034 | static void __test_function(volatile long *ptr) |
2035 | { |
2036 | diff --git a/tools/perf/tests/pmu.c b/tools/perf/tests/pmu.c |
2037 | index 74379ff1f7fa0..46cd1db85bd06 100644 |
2038 | --- a/tools/perf/tests/pmu.c |
2039 | +++ b/tools/perf/tests/pmu.c |
2040 | @@ -173,6 +173,7 @@ int test__pmu(struct test *test __maybe_unused, int subtest __maybe_unused) |
2041 | ret = 0; |
2042 | } while (0); |
2043 | |
2044 | + perf_pmu__del_formats(&formats); |
2045 | test_format_dir_put(format); |
2046 | return ret; |
2047 | } |
2048 | diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c |
2049 | index de79c735e4411..505b890ac85cc 100644 |
2050 | --- a/tools/perf/util/evlist.c |
2051 | +++ b/tools/perf/util/evlist.c |
2052 | @@ -976,6 +976,10 @@ int perf_evlist__create_maps(struct evlist *evlist, struct target *target) |
2053 | |
2054 | perf_evlist__set_maps(&evlist->core, cpus, threads); |
2055 | |
2056 | + /* as evlist now has references, put count here */ |
2057 | + perf_cpu_map__put(cpus); |
2058 | + perf_thread_map__put(threads); |
2059 | + |
2060 | return 0; |
2061 | |
2062 | out_delete_threads: |
2063 | @@ -1230,11 +1234,12 @@ static int perf_evlist__create_syswide_maps(struct evlist *evlist) |
2064 | goto out_put; |
2065 | |
2066 | perf_evlist__set_maps(&evlist->core, cpus, threads); |
2067 | -out: |
2068 | - return err; |
2069 | + |
2070 | + perf_thread_map__put(threads); |
2071 | out_put: |
2072 | perf_cpu_map__put(cpus); |
2073 | - goto out; |
2074 | +out: |
2075 | + return err; |
2076 | } |
2077 | |
2078 | int evlist__open(struct evlist *evlist) |
2079 | diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c |
2080 | index 422ad1888e74f..759a99f723fc3 100644 |
2081 | --- a/tools/perf/util/parse-events.c |
2082 | +++ b/tools/perf/util/parse-events.c |
2083 | @@ -370,7 +370,7 @@ static int add_event_tool(struct list_head *list, int *idx, |
2084 | return -ENOMEM; |
2085 | evsel->tool_event = tool_event; |
2086 | if (tool_event == PERF_TOOL_DURATION_TIME) |
2087 | - evsel->unit = strdup("ns"); |
2088 | + evsel->unit = "ns"; |
2089 | return 0; |
2090 | } |
2091 | |
2092 | diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c |
2093 | index 5608da82ad239..628a6d5a5b384 100644 |
2094 | --- a/tools/perf/util/pmu.c |
2095 | +++ b/tools/perf/util/pmu.c |
2096 | @@ -1294,6 +1294,17 @@ void perf_pmu__set_format(unsigned long *bits, long from, long to) |
2097 | set_bit(b, bits); |
2098 | } |
2099 | |
2100 | +void perf_pmu__del_formats(struct list_head *formats) |
2101 | +{ |
2102 | + struct perf_pmu_format *fmt, *tmp; |
2103 | + |
2104 | + list_for_each_entry_safe(fmt, tmp, formats, list) { |
2105 | + list_del(&fmt->list); |
2106 | + free(fmt->name); |
2107 | + free(fmt); |
2108 | + } |
2109 | +} |
2110 | + |
2111 | static int sub_non_neg(int a, int b) |
2112 | { |
2113 | if (b > a) |
2114 | diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h |
2115 | index f36ade6df76d1..9570d9b26250f 100644 |
2116 | --- a/tools/perf/util/pmu.h |
2117 | +++ b/tools/perf/util/pmu.h |
2118 | @@ -81,6 +81,7 @@ int perf_pmu__new_format(struct list_head *list, char *name, |
2119 | int config, unsigned long *bits); |
2120 | void perf_pmu__set_format(unsigned long *bits, long from, long to); |
2121 | int perf_pmu__format_parse(char *dir, struct list_head *head); |
2122 | +void perf_pmu__del_formats(struct list_head *formats); |
2123 | |
2124 | struct perf_pmu *perf_pmu__scan(struct perf_pmu *pmu); |
2125 | |
2126 | diff --git a/tools/testing/selftests/vm/map_hugetlb.c b/tools/testing/selftests/vm/map_hugetlb.c |
2127 | index 6af951900aa39..312889edb84ab 100644 |
2128 | --- a/tools/testing/selftests/vm/map_hugetlb.c |
2129 | +++ b/tools/testing/selftests/vm/map_hugetlb.c |
2130 | @@ -83,7 +83,7 @@ int main(int argc, char **argv) |
2131 | } |
2132 | |
2133 | if (shift) |
2134 | - printf("%u kB hugepages\n", 1 << shift); |
2135 | + printf("%u kB hugepages\n", 1 << (shift - 10)); |
2136 | else |
2137 | printf("Default size hugepages\n"); |
2138 | printf("Mapping %lu Mbytes\n", (unsigned long)length >> 20); |