1 |
commit: 9c16e6b001749e8de8bac1a8c050e9cd6b68da3b |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 11 14:42:58 2021 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 11 14:42:58 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=9c16e6b0 |
7 |
|
8 |
Linux patch 5.10.49 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1048_linux-5.10.49.patch | 516 +++++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 520 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index aefbc8e..534b76a 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -235,6 +235,10 @@ Patch: 1047_linux-5.10.48.patch |
21 |
From: http://www.kernel.org |
22 |
Desc: Linux 5.10.48 |
23 |
|
24 |
+Patch: 1048_linux-5.10.49.patch |
25 |
+From: http://www.kernel.org |
26 |
+Desc: Linux 5.10.49 |
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/1048_linux-5.10.49.patch b/1048_linux-5.10.49.patch |
33 |
new file mode 100644 |
34 |
index 0000000..481f258 |
35 |
--- /dev/null |
36 |
+++ b/1048_linux-5.10.49.patch |
37 |
@@ -0,0 +1,516 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index 52dcfe3371c4c..c51b73455ea33 100644 |
40 |
+--- a/Makefile |
41 |
++++ b/Makefile |
42 |
+@@ -1,7 +1,7 @@ |
43 |
+ # SPDX-License-Identifier: GPL-2.0 |
44 |
+ VERSION = 5 |
45 |
+ PATCHLEVEL = 10 |
46 |
+-SUBLEVEL = 48 |
47 |
++SUBLEVEL = 49 |
48 |
+ EXTRAVERSION = |
49 |
+ NAME = Dare mighty things |
50 |
+ |
51 |
+diff --git a/arch/hexagon/Makefile b/arch/hexagon/Makefile |
52 |
+index c168c6980d050..74b644ea8a00a 100644 |
53 |
+--- a/arch/hexagon/Makefile |
54 |
++++ b/arch/hexagon/Makefile |
55 |
+@@ -10,6 +10,9 @@ LDFLAGS_vmlinux += -G0 |
56 |
+ # Do not use single-byte enums; these will overflow. |
57 |
+ KBUILD_CFLAGS += -fno-short-enums |
58 |
+ |
59 |
++# We must use long-calls: |
60 |
++KBUILD_CFLAGS += -mlong-calls |
61 |
++ |
62 |
+ # Modules must use either long-calls, or use pic/plt. |
63 |
+ # Use long-calls for now, it's easier. And faster. |
64 |
+ # KBUILD_CFLAGS_MODULE += -fPIC |
65 |
+@@ -30,9 +33,6 @@ TIR_NAME := r19 |
66 |
+ KBUILD_CFLAGS += -ffixed-$(TIR_NAME) -DTHREADINFO_REG=$(TIR_NAME) -D__linux__ |
67 |
+ KBUILD_AFLAGS += -DTHREADINFO_REG=$(TIR_NAME) |
68 |
+ |
69 |
+-LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name 2>/dev/null) |
70 |
+-libs-y += $(LIBGCC) |
71 |
+- |
72 |
+ head-y := arch/hexagon/kernel/head.o |
73 |
+ |
74 |
+ core-y += arch/hexagon/kernel/ \ |
75 |
+diff --git a/arch/hexagon/include/asm/futex.h b/arch/hexagon/include/asm/futex.h |
76 |
+index 6b9c554aee78e..9fb00a0ae89f7 100644 |
77 |
+--- a/arch/hexagon/include/asm/futex.h |
78 |
++++ b/arch/hexagon/include/asm/futex.h |
79 |
+@@ -21,7 +21,7 @@ |
80 |
+ "3:\n" \ |
81 |
+ ".section .fixup,\"ax\"\n" \ |
82 |
+ "4: %1 = #%5;\n" \ |
83 |
+- " jump 3b\n" \ |
84 |
++ " jump ##3b\n" \ |
85 |
+ ".previous\n" \ |
86 |
+ ".section __ex_table,\"a\"\n" \ |
87 |
+ ".long 1b,4b,2b,4b\n" \ |
88 |
+@@ -90,7 +90,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, u32 oldval, |
89 |
+ "3:\n" |
90 |
+ ".section .fixup,\"ax\"\n" |
91 |
+ "4: %0 = #%6\n" |
92 |
+- " jump 3b\n" |
93 |
++ " jump ##3b\n" |
94 |
+ ".previous\n" |
95 |
+ ".section __ex_table,\"a\"\n" |
96 |
+ ".long 1b,4b,2b,4b\n" |
97 |
+diff --git a/arch/hexagon/include/asm/timex.h b/arch/hexagon/include/asm/timex.h |
98 |
+index 78338d8ada83f..8d4ec76fceb45 100644 |
99 |
+--- a/arch/hexagon/include/asm/timex.h |
100 |
++++ b/arch/hexagon/include/asm/timex.h |
101 |
+@@ -8,6 +8,7 @@ |
102 |
+ |
103 |
+ #include <asm-generic/timex.h> |
104 |
+ #include <asm/timer-regs.h> |
105 |
++#include <asm/hexagon_vm.h> |
106 |
+ |
107 |
+ /* Using TCX0 as our clock. CLOCK_TICK_RATE scheduled to be removed. */ |
108 |
+ #define CLOCK_TICK_RATE TCX0_CLK_RATE |
109 |
+@@ -16,7 +17,7 @@ |
110 |
+ |
111 |
+ static inline int read_current_timer(unsigned long *timer_val) |
112 |
+ { |
113 |
+- *timer_val = (unsigned long) __vmgettime(); |
114 |
++ *timer_val = __vmgettime(); |
115 |
+ return 0; |
116 |
+ } |
117 |
+ |
118 |
+diff --git a/arch/hexagon/kernel/hexagon_ksyms.c b/arch/hexagon/kernel/hexagon_ksyms.c |
119 |
+index 6fb1aaab1c298..35545a7386a06 100644 |
120 |
+--- a/arch/hexagon/kernel/hexagon_ksyms.c |
121 |
++++ b/arch/hexagon/kernel/hexagon_ksyms.c |
122 |
+@@ -35,8 +35,8 @@ EXPORT_SYMBOL(_dflt_cache_att); |
123 |
+ DECLARE_EXPORT(__hexagon_memcpy_likely_aligned_min32bytes_mult8bytes); |
124 |
+ |
125 |
+ /* Additional functions */ |
126 |
+-DECLARE_EXPORT(__divsi3); |
127 |
+-DECLARE_EXPORT(__modsi3); |
128 |
+-DECLARE_EXPORT(__udivsi3); |
129 |
+-DECLARE_EXPORT(__umodsi3); |
130 |
++DECLARE_EXPORT(__hexagon_divsi3); |
131 |
++DECLARE_EXPORT(__hexagon_modsi3); |
132 |
++DECLARE_EXPORT(__hexagon_udivsi3); |
133 |
++DECLARE_EXPORT(__hexagon_umodsi3); |
134 |
+ DECLARE_EXPORT(csum_tcpudp_magic); |
135 |
+diff --git a/arch/hexagon/kernel/ptrace.c b/arch/hexagon/kernel/ptrace.c |
136 |
+index a5a89e944257c..8975f9b4cedf0 100644 |
137 |
+--- a/arch/hexagon/kernel/ptrace.c |
138 |
++++ b/arch/hexagon/kernel/ptrace.c |
139 |
+@@ -35,7 +35,7 @@ void user_disable_single_step(struct task_struct *child) |
140 |
+ |
141 |
+ static int genregs_get(struct task_struct *target, |
142 |
+ const struct user_regset *regset, |
143 |
+- srtuct membuf to) |
144 |
++ struct membuf to) |
145 |
+ { |
146 |
+ struct pt_regs *regs = task_pt_regs(target); |
147 |
+ |
148 |
+@@ -54,7 +54,7 @@ static int genregs_get(struct task_struct *target, |
149 |
+ membuf_store(&to, regs->m0); |
150 |
+ membuf_store(&to, regs->m1); |
151 |
+ membuf_store(&to, regs->usr); |
152 |
+- membuf_store(&to, regs->p3_0); |
153 |
++ membuf_store(&to, regs->preds); |
154 |
+ membuf_store(&to, regs->gp); |
155 |
+ membuf_store(&to, regs->ugp); |
156 |
+ membuf_store(&to, pt_elr(regs)); // pc |
157 |
+diff --git a/arch/hexagon/lib/Makefile b/arch/hexagon/lib/Makefile |
158 |
+index 54be529d17a25..a64641e89d5fe 100644 |
159 |
+--- a/arch/hexagon/lib/Makefile |
160 |
++++ b/arch/hexagon/lib/Makefile |
161 |
+@@ -2,4 +2,5 @@ |
162 |
+ # |
163 |
+ # Makefile for hexagon-specific library files. |
164 |
+ # |
165 |
+-obj-y = checksum.o io.o memcpy.o memset.o |
166 |
++obj-y = checksum.o io.o memcpy.o memset.o memcpy_likely_aligned.o \ |
167 |
++ divsi3.o modsi3.o udivsi3.o umodsi3.o |
168 |
+diff --git a/arch/hexagon/lib/divsi3.S b/arch/hexagon/lib/divsi3.S |
169 |
+new file mode 100644 |
170 |
+index 0000000000000..783e09424c2c8 |
171 |
+--- /dev/null |
172 |
++++ b/arch/hexagon/lib/divsi3.S |
173 |
+@@ -0,0 +1,67 @@ |
174 |
++/* SPDX-License-Identifier: GPL-2.0-only */ |
175 |
++/* |
176 |
++ * Copyright (c) 2021, The Linux Foundation. All rights reserved. |
177 |
++ */ |
178 |
++ |
179 |
++#include <linux/linkage.h> |
180 |
++ |
181 |
++SYM_FUNC_START(__hexagon_divsi3) |
182 |
++ { |
183 |
++ p0 = cmp.gt(r0,#-1) |
184 |
++ p1 = cmp.gt(r1,#-1) |
185 |
++ r3:2 = vabsw(r1:0) |
186 |
++ } |
187 |
++ { |
188 |
++ p3 = xor(p0,p1) |
189 |
++ r4 = sub(r2,r3) |
190 |
++ r6 = cl0(r2) |
191 |
++ p0 = cmp.gtu(r3,r2) |
192 |
++ } |
193 |
++ { |
194 |
++ r0 = mux(p3,#-1,#1) |
195 |
++ r7 = cl0(r3) |
196 |
++ p1 = cmp.gtu(r3,r4) |
197 |
++ } |
198 |
++ { |
199 |
++ r0 = mux(p0,#0,r0) |
200 |
++ p0 = or(p0,p1) |
201 |
++ if (p0.new) jumpr:nt r31 |
202 |
++ r6 = sub(r7,r6) |
203 |
++ } |
204 |
++ { |
205 |
++ r7 = r6 |
206 |
++ r5:4 = combine(#1,r3) |
207 |
++ r6 = add(#1,lsr(r6,#1)) |
208 |
++ p0 = cmp.gtu(r6,#4) |
209 |
++ } |
210 |
++ { |
211 |
++ r5:4 = vaslw(r5:4,r7) |
212 |
++ if (!p0) r6 = #3 |
213 |
++ } |
214 |
++ { |
215 |
++ loop0(1f,r6) |
216 |
++ r7:6 = vlsrw(r5:4,#1) |
217 |
++ r1:0 = #0 |
218 |
++ } |
219 |
++ .falign |
220 |
++1: |
221 |
++ { |
222 |
++ r5:4 = vlsrw(r5:4,#2) |
223 |
++ if (!p0.new) r0 = add(r0,r5) |
224 |
++ if (!p0.new) r2 = sub(r2,r4) |
225 |
++ p0 = cmp.gtu(r4,r2) |
226 |
++ } |
227 |
++ { |
228 |
++ r7:6 = vlsrw(r7:6,#2) |
229 |
++ if (!p0.new) r0 = add(r0,r7) |
230 |
++ if (!p0.new) r2 = sub(r2,r6) |
231 |
++ p0 = cmp.gtu(r6,r2) |
232 |
++ }:endloop0 |
233 |
++ { |
234 |
++ if (!p0) r0 = add(r0,r7) |
235 |
++ } |
236 |
++ { |
237 |
++ if (p3) r0 = sub(r1,r0) |
238 |
++ jumpr r31 |
239 |
++ } |
240 |
++SYM_FUNC_END(__hexagon_divsi3) |
241 |
+diff --git a/arch/hexagon/lib/memcpy_likely_aligned.S b/arch/hexagon/lib/memcpy_likely_aligned.S |
242 |
+new file mode 100644 |
243 |
+index 0000000000000..6a541fb90a540 |
244 |
+--- /dev/null |
245 |
++++ b/arch/hexagon/lib/memcpy_likely_aligned.S |
246 |
+@@ -0,0 +1,56 @@ |
247 |
++/* SPDX-License-Identifier: GPL-2.0-only */ |
248 |
++/* |
249 |
++ * Copyright (c) 2021, The Linux Foundation. All rights reserved. |
250 |
++ */ |
251 |
++ |
252 |
++#include <linux/linkage.h> |
253 |
++ |
254 |
++SYM_FUNC_START(__hexagon_memcpy_likely_aligned_min32bytes_mult8bytes) |
255 |
++ { |
256 |
++ p0 = bitsclr(r1,#7) |
257 |
++ p0 = bitsclr(r0,#7) |
258 |
++ if (p0.new) r5:4 = memd(r1) |
259 |
++ if (p0.new) r7:6 = memd(r1+#8) |
260 |
++ } |
261 |
++ { |
262 |
++ if (!p0) jump:nt .Lmemcpy_call |
263 |
++ if (p0) r9:8 = memd(r1+#16) |
264 |
++ if (p0) r11:10 = memd(r1+#24) |
265 |
++ p0 = cmp.gtu(r2,#64) |
266 |
++ } |
267 |
++ { |
268 |
++ if (p0) jump:nt .Lmemcpy_call |
269 |
++ if (!p0) memd(r0) = r5:4 |
270 |
++ if (!p0) memd(r0+#8) = r7:6 |
271 |
++ p0 = cmp.gtu(r2,#32) |
272 |
++ } |
273 |
++ { |
274 |
++ p1 = cmp.gtu(r2,#40) |
275 |
++ p2 = cmp.gtu(r2,#48) |
276 |
++ if (p0) r13:12 = memd(r1+#32) |
277 |
++ if (p1.new) r15:14 = memd(r1+#40) |
278 |
++ } |
279 |
++ { |
280 |
++ memd(r0+#16) = r9:8 |
281 |
++ memd(r0+#24) = r11:10 |
282 |
++ } |
283 |
++ { |
284 |
++ if (p0) memd(r0+#32) = r13:12 |
285 |
++ if (p1) memd(r0+#40) = r15:14 |
286 |
++ if (!p2) jumpr:t r31 |
287 |
++ } |
288 |
++ { |
289 |
++ p0 = cmp.gtu(r2,#56) |
290 |
++ r5:4 = memd(r1+#48) |
291 |
++ if (p0.new) r7:6 = memd(r1+#56) |
292 |
++ } |
293 |
++ { |
294 |
++ memd(r0+#48) = r5:4 |
295 |
++ if (p0) memd(r0+#56) = r7:6 |
296 |
++ jumpr r31 |
297 |
++ } |
298 |
++ |
299 |
++.Lmemcpy_call: |
300 |
++ jump memcpy |
301 |
++ |
302 |
++SYM_FUNC_END(__hexagon_memcpy_likely_aligned_min32bytes_mult8bytes) |
303 |
+diff --git a/arch/hexagon/lib/modsi3.S b/arch/hexagon/lib/modsi3.S |
304 |
+new file mode 100644 |
305 |
+index 0000000000000..9ea1c86efac2b |
306 |
+--- /dev/null |
307 |
++++ b/arch/hexagon/lib/modsi3.S |
308 |
+@@ -0,0 +1,46 @@ |
309 |
++/* SPDX-License-Identifier: GPL-2.0-only */ |
310 |
++/* |
311 |
++ * Copyright (c) 2021, The Linux Foundation. All rights reserved. |
312 |
++ */ |
313 |
++ |
314 |
++#include <linux/linkage.h> |
315 |
++ |
316 |
++SYM_FUNC_START(__hexagon_modsi3) |
317 |
++ { |
318 |
++ p2 = cmp.ge(r0,#0) |
319 |
++ r2 = abs(r0) |
320 |
++ r1 = abs(r1) |
321 |
++ } |
322 |
++ { |
323 |
++ r3 = cl0(r2) |
324 |
++ r4 = cl0(r1) |
325 |
++ p0 = cmp.gtu(r1,r2) |
326 |
++ } |
327 |
++ { |
328 |
++ r3 = sub(r4,r3) |
329 |
++ if (p0) jumpr r31 |
330 |
++ } |
331 |
++ { |
332 |
++ p1 = cmp.eq(r3,#0) |
333 |
++ loop0(1f,r3) |
334 |
++ r0 = r2 |
335 |
++ r2 = lsl(r1,r3) |
336 |
++ } |
337 |
++ .falign |
338 |
++1: |
339 |
++ { |
340 |
++ p0 = cmp.gtu(r2,r0) |
341 |
++ if (!p0.new) r0 = sub(r0,r2) |
342 |
++ r2 = lsr(r2,#1) |
343 |
++ if (p1) r1 = #0 |
344 |
++ }:endloop0 |
345 |
++ { |
346 |
++ p0 = cmp.gtu(r2,r0) |
347 |
++ if (!p0.new) r0 = sub(r0,r1) |
348 |
++ if (p2) jumpr r31 |
349 |
++ } |
350 |
++ { |
351 |
++ r0 = neg(r0) |
352 |
++ jumpr r31 |
353 |
++ } |
354 |
++SYM_FUNC_END(__hexagon_modsi3) |
355 |
+diff --git a/arch/hexagon/lib/udivsi3.S b/arch/hexagon/lib/udivsi3.S |
356 |
+new file mode 100644 |
357 |
+index 0000000000000..477f27b9311cd |
358 |
+--- /dev/null |
359 |
++++ b/arch/hexagon/lib/udivsi3.S |
360 |
+@@ -0,0 +1,38 @@ |
361 |
++/* SPDX-License-Identifier: GPL-2.0-only */ |
362 |
++/* |
363 |
++ * Copyright (c) 2021, The Linux Foundation. All rights reserved. |
364 |
++ */ |
365 |
++ |
366 |
++#include <linux/linkage.h> |
367 |
++ |
368 |
++SYM_FUNC_START(__hexagon_udivsi3) |
369 |
++ { |
370 |
++ r2 = cl0(r0) |
371 |
++ r3 = cl0(r1) |
372 |
++ r5:4 = combine(#1,#0) |
373 |
++ p0 = cmp.gtu(r1,r0) |
374 |
++ } |
375 |
++ { |
376 |
++ r6 = sub(r3,r2) |
377 |
++ r4 = r1 |
378 |
++ r1:0 = combine(r0,r4) |
379 |
++ if (p0) jumpr r31 |
380 |
++ } |
381 |
++ { |
382 |
++ r3:2 = vlslw(r5:4,r6) |
383 |
++ loop0(1f,r6) |
384 |
++ } |
385 |
++ .falign |
386 |
++1: |
387 |
++ { |
388 |
++ p0 = cmp.gtu(r2,r1) |
389 |
++ if (!p0.new) r1 = sub(r1,r2) |
390 |
++ if (!p0.new) r0 = add(r0,r3) |
391 |
++ r3:2 = vlsrw(r3:2,#1) |
392 |
++ }:endloop0 |
393 |
++ { |
394 |
++ p0 = cmp.gtu(r2,r1) |
395 |
++ if (!p0.new) r0 = add(r0,r3) |
396 |
++ jumpr r31 |
397 |
++ } |
398 |
++SYM_FUNC_END(__hexagon_udivsi3) |
399 |
+diff --git a/arch/hexagon/lib/umodsi3.S b/arch/hexagon/lib/umodsi3.S |
400 |
+new file mode 100644 |
401 |
+index 0000000000000..280bf06a55e7d |
402 |
+--- /dev/null |
403 |
++++ b/arch/hexagon/lib/umodsi3.S |
404 |
+@@ -0,0 +1,36 @@ |
405 |
++/* SPDX-License-Identifier: GPL-2.0-only */ |
406 |
++/* |
407 |
++ * Copyright (c) 2021, The Linux Foundation. All rights reserved. |
408 |
++ */ |
409 |
++ |
410 |
++#include <linux/linkage.h> |
411 |
++ |
412 |
++SYM_FUNC_START(__hexagon_umodsi3) |
413 |
++ { |
414 |
++ r2 = cl0(r0) |
415 |
++ r3 = cl0(r1) |
416 |
++ p0 = cmp.gtu(r1,r0) |
417 |
++ } |
418 |
++ { |
419 |
++ r2 = sub(r3,r2) |
420 |
++ if (p0) jumpr r31 |
421 |
++ } |
422 |
++ { |
423 |
++ loop0(1f,r2) |
424 |
++ p1 = cmp.eq(r2,#0) |
425 |
++ r2 = lsl(r1,r2) |
426 |
++ } |
427 |
++ .falign |
428 |
++1: |
429 |
++ { |
430 |
++ p0 = cmp.gtu(r2,r0) |
431 |
++ if (!p0.new) r0 = sub(r0,r2) |
432 |
++ r2 = lsr(r2,#1) |
433 |
++ if (p1) r1 = #0 |
434 |
++ }:endloop0 |
435 |
++ { |
436 |
++ p0 = cmp.gtu(r2,r0) |
437 |
++ if (!p0.new) r0 = sub(r0,r1) |
438 |
++ jumpr r31 |
439 |
++ } |
440 |
++SYM_FUNC_END(__hexagon_umodsi3) |
441 |
+diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c |
442 |
+index 280f7992ae993..965b702208d85 100644 |
443 |
+--- a/arch/powerpc/kvm/book3s_hv.c |
444 |
++++ b/arch/powerpc/kvm/book3s_hv.c |
445 |
+@@ -3583,6 +3583,7 @@ static int kvmhv_p9_guest_entry(struct kvm_vcpu *vcpu, u64 time_limit, |
446 |
+ unsigned long host_tidr = mfspr(SPRN_TIDR); |
447 |
+ unsigned long host_iamr = mfspr(SPRN_IAMR); |
448 |
+ unsigned long host_amr = mfspr(SPRN_AMR); |
449 |
++ unsigned long host_fscr = mfspr(SPRN_FSCR); |
450 |
+ s64 dec; |
451 |
+ u64 tb; |
452 |
+ int trap, save_pmu; |
453 |
+@@ -3726,6 +3727,9 @@ static int kvmhv_p9_guest_entry(struct kvm_vcpu *vcpu, u64 time_limit, |
454 |
+ if (host_amr != vcpu->arch.amr) |
455 |
+ mtspr(SPRN_AMR, host_amr); |
456 |
+ |
457 |
++ if (host_fscr != vcpu->arch.fscr) |
458 |
++ mtspr(SPRN_FSCR, host_fscr); |
459 |
++ |
460 |
+ msr_check_and_set(MSR_FP | MSR_VEC | MSR_VSX); |
461 |
+ store_fp_state(&vcpu->arch.fp); |
462 |
+ #ifdef CONFIG_ALTIVEC |
463 |
+diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c |
464 |
+index 5ad5282641350..282f3d2388cc2 100644 |
465 |
+--- a/drivers/media/usb/uvc/uvc_driver.c |
466 |
++++ b/drivers/media/usb/uvc/uvc_driver.c |
467 |
+@@ -1588,6 +1588,31 @@ static int uvc_scan_chain_forward(struct uvc_video_chain *chain, |
468 |
+ return -EINVAL; |
469 |
+ } |
470 |
+ |
471 |
++ /* |
472 |
++ * Some devices reference an output terminal as the |
473 |
++ * source of extension units. This is incorrect, as |
474 |
++ * output terminals only have an input pin, and thus |
475 |
++ * can't be connected to any entity in the forward |
476 |
++ * direction. The resulting topology would cause issues |
477 |
++ * when registering the media controller graph. To |
478 |
++ * avoid this problem, connect the extension unit to |
479 |
++ * the source of the output terminal instead. |
480 |
++ */ |
481 |
++ if (UVC_ENTITY_IS_OTERM(entity)) { |
482 |
++ struct uvc_entity *source; |
483 |
++ |
484 |
++ source = uvc_entity_by_id(chain->dev, |
485 |
++ entity->baSourceID[0]); |
486 |
++ if (!source) { |
487 |
++ uvc_trace(UVC_TRACE_DESCR, |
488 |
++ "Can't connect extension unit %u in chain\n", |
489 |
++ forward->id); |
490 |
++ break; |
491 |
++ } |
492 |
++ |
493 |
++ forward->baSourceID[0] = source->id; |
494 |
++ } |
495 |
++ |
496 |
+ list_add_tail(&forward->chain, &chain->entities); |
497 |
+ if (uvc_trace_param & UVC_TRACE_PROBE) { |
498 |
+ if (!found) |
499 |
+@@ -1608,6 +1633,13 @@ static int uvc_scan_chain_forward(struct uvc_video_chain *chain, |
500 |
+ return -EINVAL; |
501 |
+ } |
502 |
+ |
503 |
++ if (UVC_ENTITY_IS_OTERM(entity)) { |
504 |
++ uvc_trace(UVC_TRACE_DESCR, |
505 |
++ "Unsupported connection between output terminals %u and %u\n", |
506 |
++ entity->id, forward->id); |
507 |
++ break; |
508 |
++ } |
509 |
++ |
510 |
+ list_add_tail(&forward->chain, &chain->entities); |
511 |
+ if (uvc_trace_param & UVC_TRACE_PROBE) { |
512 |
+ if (!found) |
513 |
+diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c |
514 |
+index 29bec07205142..af0f6ad32522c 100644 |
515 |
+--- a/drivers/xen/events/events_base.c |
516 |
++++ b/drivers/xen/events/events_base.c |
517 |
+@@ -583,6 +583,9 @@ static void xen_irq_lateeoi_locked(struct irq_info *info, bool spurious) |
518 |
+ } |
519 |
+ |
520 |
+ info->eoi_time = 0; |
521 |
++ |
522 |
++ /* is_active hasn't been reset yet, do it now. */ |
523 |
++ smp_store_release(&info->is_active, 0); |
524 |
+ do_unmask(info, EVT_MASK_REASON_EOI_PENDING); |
525 |
+ } |
526 |
+ |
527 |
+@@ -1807,10 +1810,22 @@ static void lateeoi_ack_dynirq(struct irq_data *data) |
528 |
+ struct irq_info *info = info_for_irq(data->irq); |
529 |
+ evtchn_port_t evtchn = info ? info->evtchn : 0; |
530 |
+ |
531 |
+- if (VALID_EVTCHN(evtchn)) { |
532 |
+- do_mask(info, EVT_MASK_REASON_EOI_PENDING); |
533 |
+- ack_dynirq(data); |
534 |
+- } |
535 |
++ if (!VALID_EVTCHN(evtchn)) |
536 |
++ return; |
537 |
++ |
538 |
++ do_mask(info, EVT_MASK_REASON_EOI_PENDING); |
539 |
++ |
540 |
++ if (unlikely(irqd_is_setaffinity_pending(data)) && |
541 |
++ likely(!irqd_irq_disabled(data))) { |
542 |
++ do_mask(info, EVT_MASK_REASON_TEMPORARY); |
543 |
++ |
544 |
++ clear_evtchn(evtchn); |
545 |
++ |
546 |
++ irq_move_masked_irq(data); |
547 |
++ |
548 |
++ do_unmask(info, EVT_MASK_REASON_TEMPORARY); |
549 |
++ } else |
550 |
++ clear_evtchn(evtchn); |
551 |
+ } |
552 |
+ |
553 |
+ static void lateeoi_mask_ack_dynirq(struct irq_data *data) |