1 |
commit: b4205fc874c8fda736c920edbb6ec18d708ecb78 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 16 12:26:54 2019 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 16 12:26:54 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=b4205fc8 |
7 |
|
8 |
Linux patch 5.2.15 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1014_linux-5.2.15.patch | 1595 +++++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 1599 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index 6458e28..e8d3287 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -99,6 +99,10 @@ Patch: 1013_linux-5.2.14.patch |
21 |
From: https://www.kernel.org |
22 |
Desc: Linux 5.2.14 |
23 |
|
24 |
+Patch: 1014_linux-5.2.15.patch |
25 |
+From: https://www.kernel.org |
26 |
+Desc: Linux 5.2.15 |
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/1014_linux-5.2.15.patch b/1014_linux-5.2.15.patch |
33 |
new file mode 100644 |
34 |
index 0000000..19f9e8e |
35 |
--- /dev/null |
36 |
+++ b/1014_linux-5.2.15.patch |
37 |
@@ -0,0 +1,1595 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index d019994462ba..3c977aa66650 100644 |
40 |
+--- a/Makefile |
41 |
++++ b/Makefile |
42 |
+@@ -1,7 +1,7 @@ |
43 |
+ # SPDX-License-Identifier: GPL-2.0 |
44 |
+ VERSION = 5 |
45 |
+ PATCHLEVEL = 2 |
46 |
+-SUBLEVEL = 14 |
47 |
++SUBLEVEL = 15 |
48 |
+ EXTRAVERSION = |
49 |
+ NAME = Bobtail Squid |
50 |
+ |
51 |
+diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c |
52 |
+index f0fbbf6a6a1f..4f9bfe9fd960 100644 |
53 |
+--- a/arch/powerpc/kernel/process.c |
54 |
++++ b/arch/powerpc/kernel/process.c |
55 |
+@@ -101,21 +101,8 @@ static void check_if_tm_restore_required(struct task_struct *tsk) |
56 |
+ } |
57 |
+ } |
58 |
+ |
59 |
+-static bool tm_active_with_fp(struct task_struct *tsk) |
60 |
+-{ |
61 |
+- return MSR_TM_ACTIVE(tsk->thread.regs->msr) && |
62 |
+- (tsk->thread.ckpt_regs.msr & MSR_FP); |
63 |
+-} |
64 |
+- |
65 |
+-static bool tm_active_with_altivec(struct task_struct *tsk) |
66 |
+-{ |
67 |
+- return MSR_TM_ACTIVE(tsk->thread.regs->msr) && |
68 |
+- (tsk->thread.ckpt_regs.msr & MSR_VEC); |
69 |
+-} |
70 |
+ #else |
71 |
+ static inline void check_if_tm_restore_required(struct task_struct *tsk) { } |
72 |
+-static inline bool tm_active_with_fp(struct task_struct *tsk) { return false; } |
73 |
+-static inline bool tm_active_with_altivec(struct task_struct *tsk) { return false; } |
74 |
+ #endif /* CONFIG_PPC_TRANSACTIONAL_MEM */ |
75 |
+ |
76 |
+ bool strict_msr_control; |
77 |
+@@ -252,7 +239,7 @@ EXPORT_SYMBOL(enable_kernel_fp); |
78 |
+ |
79 |
+ static int restore_fp(struct task_struct *tsk) |
80 |
+ { |
81 |
+- if (tsk->thread.load_fp || tm_active_with_fp(tsk)) { |
82 |
++ if (tsk->thread.load_fp) { |
83 |
+ load_fp_state(¤t->thread.fp_state); |
84 |
+ current->thread.load_fp++; |
85 |
+ return 1; |
86 |
+@@ -334,8 +321,7 @@ EXPORT_SYMBOL_GPL(flush_altivec_to_thread); |
87 |
+ |
88 |
+ static int restore_altivec(struct task_struct *tsk) |
89 |
+ { |
90 |
+- if (cpu_has_feature(CPU_FTR_ALTIVEC) && |
91 |
+- (tsk->thread.load_vec || tm_active_with_altivec(tsk))) { |
92 |
++ if (cpu_has_feature(CPU_FTR_ALTIVEC) && (tsk->thread.load_vec)) { |
93 |
+ load_vr_state(&tsk->thread.vr_state); |
94 |
+ tsk->thread.used_vr = 1; |
95 |
+ tsk->thread.load_vec++; |
96 |
+@@ -497,13 +483,14 @@ void giveup_all(struct task_struct *tsk) |
97 |
+ if (!tsk->thread.regs) |
98 |
+ return; |
99 |
+ |
100 |
++ check_if_tm_restore_required(tsk); |
101 |
++ |
102 |
+ usermsr = tsk->thread.regs->msr; |
103 |
+ |
104 |
+ if ((usermsr & msr_all_available) == 0) |
105 |
+ return; |
106 |
+ |
107 |
+ msr_check_and_set(msr_all_available); |
108 |
+- check_if_tm_restore_required(tsk); |
109 |
+ |
110 |
+ WARN_ON((usermsr & MSR_VSX) && !((usermsr & MSR_FP) && (usermsr & MSR_VEC))); |
111 |
+ |
112 |
+diff --git a/arch/powerpc/mm/nohash/tlb.c b/arch/powerpc/mm/nohash/tlb.c |
113 |
+index d4acf6fa0596..bf60983a58c7 100644 |
114 |
+--- a/arch/powerpc/mm/nohash/tlb.c |
115 |
++++ b/arch/powerpc/mm/nohash/tlb.c |
116 |
+@@ -630,7 +630,6 @@ static void early_init_this_mmu(void) |
117 |
+ #ifdef CONFIG_PPC_FSL_BOOK3E |
118 |
+ if (mmu_has_feature(MMU_FTR_TYPE_FSL_E)) { |
119 |
+ unsigned int num_cams; |
120 |
+- int __maybe_unused cpu = smp_processor_id(); |
121 |
+ bool map = true; |
122 |
+ |
123 |
+ /* use a quarter of the TLBCAM for bolted linear map */ |
124 |
+diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c |
125 |
+index cfe827cefad8..96d42f571a18 100644 |
126 |
+--- a/drivers/gpio/gpio-pca953x.c |
127 |
++++ b/drivers/gpio/gpio-pca953x.c |
128 |
+@@ -604,10 +604,9 @@ static void pca953x_irq_bus_sync_unlock(struct irq_data *d) |
129 |
+ u8 new_irqs; |
130 |
+ int level, i; |
131 |
+ u8 invert_irq_mask[MAX_BANK]; |
132 |
+- int reg_direction[MAX_BANK]; |
133 |
++ u8 reg_direction[MAX_BANK]; |
134 |
+ |
135 |
+- regmap_bulk_read(chip->regmap, chip->regs->direction, reg_direction, |
136 |
+- NBANK(chip)); |
137 |
++ pca953x_read_regs(chip, chip->regs->direction, reg_direction); |
138 |
+ |
139 |
+ if (chip->driver_data & PCA_PCAL) { |
140 |
+ /* Enable latch on interrupt-enabled inputs */ |
141 |
+@@ -679,7 +678,7 @@ static bool pca953x_irq_pending(struct pca953x_chip *chip, u8 *pending) |
142 |
+ bool pending_seen = false; |
143 |
+ bool trigger_seen = false; |
144 |
+ u8 trigger[MAX_BANK]; |
145 |
+- int reg_direction[MAX_BANK]; |
146 |
++ u8 reg_direction[MAX_BANK]; |
147 |
+ int ret, i; |
148 |
+ |
149 |
+ if (chip->driver_data & PCA_PCAL) { |
150 |
+@@ -710,8 +709,7 @@ static bool pca953x_irq_pending(struct pca953x_chip *chip, u8 *pending) |
151 |
+ return false; |
152 |
+ |
153 |
+ /* Remove output pins from the equation */ |
154 |
+- regmap_bulk_read(chip->regmap, chip->regs->direction, reg_direction, |
155 |
+- NBANK(chip)); |
156 |
++ pca953x_read_regs(chip, chip->regs->direction, reg_direction); |
157 |
+ for (i = 0; i < NBANK(chip); i++) |
158 |
+ cur_stat[i] &= reg_direction[i]; |
159 |
+ |
160 |
+@@ -768,7 +766,7 @@ static int pca953x_irq_setup(struct pca953x_chip *chip, |
161 |
+ { |
162 |
+ struct i2c_client *client = chip->client; |
163 |
+ struct irq_chip *irq_chip = &chip->irq_chip; |
164 |
+- int reg_direction[MAX_BANK]; |
165 |
++ u8 reg_direction[MAX_BANK]; |
166 |
+ int ret, i; |
167 |
+ |
168 |
+ if (!client->irq) |
169 |
+@@ -789,8 +787,7 @@ static int pca953x_irq_setup(struct pca953x_chip *chip, |
170 |
+ * interrupt. We have to rely on the previous read for |
171 |
+ * this purpose. |
172 |
+ */ |
173 |
+- regmap_bulk_read(chip->regmap, chip->regs->direction, reg_direction, |
174 |
+- NBANK(chip)); |
175 |
++ pca953x_read_regs(chip, chip->regs->direction, reg_direction); |
176 |
+ for (i = 0; i < NBANK(chip); i++) |
177 |
+ chip->irq_stat[i] &= reg_direction[i]; |
178 |
+ mutex_init(&chip->irq_lock); |
179 |
+diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h |
180 |
+index 13d6bd4e17b2..cf748b80e640 100644 |
181 |
+--- a/drivers/gpu/drm/i915/i915_reg.h |
182 |
++++ b/drivers/gpu/drm/i915/i915_reg.h |
183 |
+@@ -2510,6 +2510,13 @@ enum i915_power_well_id { |
184 |
+ #define RING_WAIT_SEMAPHORE (1 << 10) /* gen6+ */ |
185 |
+ |
186 |
+ #define RING_FORCE_TO_NONPRIV(base, i) _MMIO(((base) + 0x4D0) + (i) * 4) |
187 |
++#define RING_FORCE_TO_NONPRIV_RW (0 << 28) /* CFL+ & Gen11+ */ |
188 |
++#define RING_FORCE_TO_NONPRIV_RD (1 << 28) |
189 |
++#define RING_FORCE_TO_NONPRIV_WR (2 << 28) |
190 |
++#define RING_FORCE_TO_NONPRIV_RANGE_1 (0 << 0) /* CFL+ & Gen11+ */ |
191 |
++#define RING_FORCE_TO_NONPRIV_RANGE_4 (1 << 0) |
192 |
++#define RING_FORCE_TO_NONPRIV_RANGE_16 (2 << 0) |
193 |
++#define RING_FORCE_TO_NONPRIV_RANGE_64 (3 << 0) |
194 |
+ #define RING_MAX_NONPRIV_SLOTS 12 |
195 |
+ |
196 |
+ #define GEN7_TLB_RD_ADDR _MMIO(0x4700) |
197 |
+diff --git a/drivers/gpu/drm/i915/intel_cdclk.c b/drivers/gpu/drm/i915/intel_cdclk.c |
198 |
+index ae40a8679314..fd5236da039f 100644 |
199 |
+--- a/drivers/gpu/drm/i915/intel_cdclk.c |
200 |
++++ b/drivers/gpu/drm/i915/intel_cdclk.c |
201 |
+@@ -2269,6 +2269,17 @@ int intel_crtc_compute_min_cdclk(const struct intel_crtc_state *crtc_state) |
202 |
+ if (crtc_state->has_audio && INTEL_GEN(dev_priv) >= 9) |
203 |
+ min_cdclk = max(2 * 96000, min_cdclk); |
204 |
+ |
205 |
++ /* |
206 |
++ * "For DP audio configuration, cdclk frequency shall be set to |
207 |
++ * meet the following requirements: |
208 |
++ * DP Link Frequency(MHz) | Cdclk frequency(MHz) |
209 |
++ * 270 | 320 or higher |
210 |
++ * 162 | 200 or higher" |
211 |
++ */ |
212 |
++ if ((IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) && |
213 |
++ intel_crtc_has_dp_encoder(crtc_state) && crtc_state->has_audio) |
214 |
++ min_cdclk = max(crtc_state->port_clock, min_cdclk); |
215 |
++ |
216 |
+ /* |
217 |
+ * On Valleyview some DSI panels lose (v|h)sync when the clock is lower |
218 |
+ * than 320000KHz. |
219 |
+diff --git a/drivers/gpu/drm/i915/intel_workarounds.c b/drivers/gpu/drm/i915/intel_workarounds.c |
220 |
+index 841b8e515f4d..edd57a5e0495 100644 |
221 |
+--- a/drivers/gpu/drm/i915/intel_workarounds.c |
222 |
++++ b/drivers/gpu/drm/i915/intel_workarounds.c |
223 |
+@@ -981,7 +981,7 @@ bool intel_gt_verify_workarounds(struct drm_i915_private *i915, |
224 |
+ } |
225 |
+ |
226 |
+ static void |
227 |
+-whitelist_reg(struct i915_wa_list *wal, i915_reg_t reg) |
228 |
++whitelist_reg_ext(struct i915_wa_list *wal, i915_reg_t reg, u32 flags) |
229 |
+ { |
230 |
+ struct i915_wa wa = { |
231 |
+ .reg = reg |
232 |
+@@ -990,9 +990,16 @@ whitelist_reg(struct i915_wa_list *wal, i915_reg_t reg) |
233 |
+ if (GEM_DEBUG_WARN_ON(wal->count >= RING_MAX_NONPRIV_SLOTS)) |
234 |
+ return; |
235 |
+ |
236 |
++ wa.reg.reg |= flags; |
237 |
+ _wa_add(wal, &wa); |
238 |
+ } |
239 |
+ |
240 |
++static void |
241 |
++whitelist_reg(struct i915_wa_list *wal, i915_reg_t reg) |
242 |
++{ |
243 |
++ whitelist_reg_ext(wal, reg, RING_FORCE_TO_NONPRIV_RW); |
244 |
++} |
245 |
++ |
246 |
+ static void gen9_whitelist_build(struct i915_wa_list *w) |
247 |
+ { |
248 |
+ /* WaVFEStateAfterPipeControlwithMediaStateClear:skl,bxt,glk,cfl */ |
249 |
+@@ -1005,56 +1012,131 @@ static void gen9_whitelist_build(struct i915_wa_list *w) |
250 |
+ whitelist_reg(w, GEN8_HDC_CHICKEN1); |
251 |
+ } |
252 |
+ |
253 |
+-static void skl_whitelist_build(struct i915_wa_list *w) |
254 |
++static void skl_whitelist_build(struct intel_engine_cs *engine) |
255 |
+ { |
256 |
++ struct i915_wa_list *w = &engine->whitelist; |
257 |
++ |
258 |
++ if (engine->class != RENDER_CLASS) |
259 |
++ return; |
260 |
++ |
261 |
+ gen9_whitelist_build(w); |
262 |
+ |
263 |
+ /* WaDisableLSQCROPERFforOCL:skl */ |
264 |
+ whitelist_reg(w, GEN8_L3SQCREG4); |
265 |
+ } |
266 |
+ |
267 |
+-static void bxt_whitelist_build(struct i915_wa_list *w) |
268 |
++static void bxt_whitelist_build(struct intel_engine_cs *engine) |
269 |
+ { |
270 |
+- gen9_whitelist_build(w); |
271 |
++ if (engine->class != RENDER_CLASS) |
272 |
++ return; |
273 |
++ |
274 |
++ gen9_whitelist_build(&engine->whitelist); |
275 |
+ } |
276 |
+ |
277 |
+-static void kbl_whitelist_build(struct i915_wa_list *w) |
278 |
++static void kbl_whitelist_build(struct intel_engine_cs *engine) |
279 |
+ { |
280 |
++ struct i915_wa_list *w = &engine->whitelist; |
281 |
++ |
282 |
++ if (engine->class != RENDER_CLASS) |
283 |
++ return; |
284 |
++ |
285 |
+ gen9_whitelist_build(w); |
286 |
+ |
287 |
+ /* WaDisableLSQCROPERFforOCL:kbl */ |
288 |
+ whitelist_reg(w, GEN8_L3SQCREG4); |
289 |
+ } |
290 |
+ |
291 |
+-static void glk_whitelist_build(struct i915_wa_list *w) |
292 |
++static void glk_whitelist_build(struct intel_engine_cs *engine) |
293 |
+ { |
294 |
++ struct i915_wa_list *w = &engine->whitelist; |
295 |
++ |
296 |
++ if (engine->class != RENDER_CLASS) |
297 |
++ return; |
298 |
++ |
299 |
+ gen9_whitelist_build(w); |
300 |
+ |
301 |
+ /* WA #0862: Userspace has to set "Barrier Mode" to avoid hangs. */ |
302 |
+ whitelist_reg(w, GEN9_SLICE_COMMON_ECO_CHICKEN1); |
303 |
+ } |
304 |
+ |
305 |
+-static void cfl_whitelist_build(struct i915_wa_list *w) |
306 |
++static void cfl_whitelist_build(struct intel_engine_cs *engine) |
307 |
+ { |
308 |
++ struct i915_wa_list *w = &engine->whitelist; |
309 |
++ |
310 |
++ if (engine->class != RENDER_CLASS) |
311 |
++ return; |
312 |
++ |
313 |
+ gen9_whitelist_build(w); |
314 |
++ |
315 |
++ /* |
316 |
++ * WaAllowPMDepthAndInvocationCountAccessFromUMD:cfl,whl,cml,aml |
317 |
++ * |
318 |
++ * This covers 4 register which are next to one another : |
319 |
++ * - PS_INVOCATION_COUNT |
320 |
++ * - PS_INVOCATION_COUNT_UDW |
321 |
++ * - PS_DEPTH_COUNT |
322 |
++ * - PS_DEPTH_COUNT_UDW |
323 |
++ */ |
324 |
++ whitelist_reg_ext(w, PS_INVOCATION_COUNT, |
325 |
++ RING_FORCE_TO_NONPRIV_RD | |
326 |
++ RING_FORCE_TO_NONPRIV_RANGE_4); |
327 |
+ } |
328 |
+ |
329 |
+-static void cnl_whitelist_build(struct i915_wa_list *w) |
330 |
++static void cnl_whitelist_build(struct intel_engine_cs *engine) |
331 |
+ { |
332 |
++ struct i915_wa_list *w = &engine->whitelist; |
333 |
++ |
334 |
++ if (engine->class != RENDER_CLASS) |
335 |
++ return; |
336 |
++ |
337 |
+ /* WaEnablePreemptionGranularityControlByUMD:cnl */ |
338 |
+ whitelist_reg(w, GEN8_CS_CHICKEN1); |
339 |
+ } |
340 |
+ |
341 |
+-static void icl_whitelist_build(struct i915_wa_list *w) |
342 |
++static void icl_whitelist_build(struct intel_engine_cs *engine) |
343 |
+ { |
344 |
+- /* WaAllowUMDToModifyHalfSliceChicken7:icl */ |
345 |
+- whitelist_reg(w, GEN9_HALF_SLICE_CHICKEN7); |
346 |
++ struct i915_wa_list *w = &engine->whitelist; |
347 |
+ |
348 |
+- /* WaAllowUMDToModifySamplerMode:icl */ |
349 |
+- whitelist_reg(w, GEN10_SAMPLER_MODE); |
350 |
++ switch (engine->class) { |
351 |
++ case RENDER_CLASS: |
352 |
++ /* WaAllowUMDToModifyHalfSliceChicken7:icl */ |
353 |
++ whitelist_reg(w, GEN9_HALF_SLICE_CHICKEN7); |
354 |
+ |
355 |
+- /* WaEnableStateCacheRedirectToCS:icl */ |
356 |
+- whitelist_reg(w, GEN9_SLICE_COMMON_ECO_CHICKEN1); |
357 |
++ /* WaAllowUMDToModifySamplerMode:icl */ |
358 |
++ whitelist_reg(w, GEN10_SAMPLER_MODE); |
359 |
++ |
360 |
++ /* WaEnableStateCacheRedirectToCS:icl */ |
361 |
++ whitelist_reg(w, GEN9_SLICE_COMMON_ECO_CHICKEN1); |
362 |
++ |
363 |
++ /* |
364 |
++ * WaAllowPMDepthAndInvocationCountAccessFromUMD:icl |
365 |
++ * |
366 |
++ * This covers 4 register which are next to one another : |
367 |
++ * - PS_INVOCATION_COUNT |
368 |
++ * - PS_INVOCATION_COUNT_UDW |
369 |
++ * - PS_DEPTH_COUNT |
370 |
++ * - PS_DEPTH_COUNT_UDW |
371 |
++ */ |
372 |
++ whitelist_reg_ext(w, PS_INVOCATION_COUNT, |
373 |
++ RING_FORCE_TO_NONPRIV_RD | |
374 |
++ RING_FORCE_TO_NONPRIV_RANGE_4); |
375 |
++ break; |
376 |
++ |
377 |
++ case VIDEO_DECODE_CLASS: |
378 |
++ /* hucStatusRegOffset */ |
379 |
++ whitelist_reg_ext(w, _MMIO(0x2000 + engine->mmio_base), |
380 |
++ RING_FORCE_TO_NONPRIV_RD); |
381 |
++ /* hucUKernelHdrInfoRegOffset */ |
382 |
++ whitelist_reg_ext(w, _MMIO(0x2014 + engine->mmio_base), |
383 |
++ RING_FORCE_TO_NONPRIV_RD); |
384 |
++ /* hucStatus2RegOffset */ |
385 |
++ whitelist_reg_ext(w, _MMIO(0x23B0 + engine->mmio_base), |
386 |
++ RING_FORCE_TO_NONPRIV_RD); |
387 |
++ break; |
388 |
++ |
389 |
++ default: |
390 |
++ break; |
391 |
++ } |
392 |
+ } |
393 |
+ |
394 |
+ void intel_engine_init_whitelist(struct intel_engine_cs *engine) |
395 |
+@@ -1062,24 +1144,22 @@ void intel_engine_init_whitelist(struct intel_engine_cs *engine) |
396 |
+ struct drm_i915_private *i915 = engine->i915; |
397 |
+ struct i915_wa_list *w = &engine->whitelist; |
398 |
+ |
399 |
+- GEM_BUG_ON(engine->id != RCS0); |
400 |
+- |
401 |
+ wa_init_start(w, "whitelist"); |
402 |
+ |
403 |
+ if (IS_GEN(i915, 11)) |
404 |
+- icl_whitelist_build(w); |
405 |
++ icl_whitelist_build(engine); |
406 |
+ else if (IS_CANNONLAKE(i915)) |
407 |
+- cnl_whitelist_build(w); |
408 |
++ cnl_whitelist_build(engine); |
409 |
+ else if (IS_COFFEELAKE(i915)) |
410 |
+- cfl_whitelist_build(w); |
411 |
++ cfl_whitelist_build(engine); |
412 |
+ else if (IS_GEMINILAKE(i915)) |
413 |
+- glk_whitelist_build(w); |
414 |
++ glk_whitelist_build(engine); |
415 |
+ else if (IS_KABYLAKE(i915)) |
416 |
+- kbl_whitelist_build(w); |
417 |
++ kbl_whitelist_build(engine); |
418 |
+ else if (IS_BROXTON(i915)) |
419 |
+- bxt_whitelist_build(w); |
420 |
++ bxt_whitelist_build(engine); |
421 |
+ else if (IS_SKYLAKE(i915)) |
422 |
+- skl_whitelist_build(w); |
423 |
++ skl_whitelist_build(engine); |
424 |
+ else if (INTEL_GEN(i915) <= 8) |
425 |
+ return; |
426 |
+ else |
427 |
+@@ -1167,8 +1247,12 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal) |
428 |
+ if (IS_ICL_REVID(i915, ICL_REVID_A0, ICL_REVID_B0)) |
429 |
+ wa_write_or(wal, |
430 |
+ GEN7_SARCHKMD, |
431 |
+- GEN7_DISABLE_DEMAND_PREFETCH | |
432 |
+- GEN7_DISABLE_SAMPLER_PREFETCH); |
433 |
++ GEN7_DISABLE_DEMAND_PREFETCH); |
434 |
++ |
435 |
++ /* Wa_1606682166:icl */ |
436 |
++ wa_write_or(wal, |
437 |
++ GEN7_SARCHKMD, |
438 |
++ GEN7_DISABLE_SAMPLER_PREFETCH); |
439 |
+ } |
440 |
+ |
441 |
+ if (IS_GEN_RANGE(i915, 9, 11)) { |
442 |
+diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gp102.c b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gp102.c |
443 |
+index 84a2f243ed9b..4695f1c8e33f 100644 |
444 |
+--- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gp102.c |
445 |
++++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gp102.c |
446 |
+@@ -190,6 +190,9 @@ MODULE_FIRMWARE("nvidia/gp102/nvdec/scrubber.bin"); |
447 |
+ MODULE_FIRMWARE("nvidia/gp102/sec2/desc.bin"); |
448 |
+ MODULE_FIRMWARE("nvidia/gp102/sec2/image.bin"); |
449 |
+ MODULE_FIRMWARE("nvidia/gp102/sec2/sig.bin"); |
450 |
++MODULE_FIRMWARE("nvidia/gp102/sec2/desc-1.bin"); |
451 |
++MODULE_FIRMWARE("nvidia/gp102/sec2/image-1.bin"); |
452 |
++MODULE_FIRMWARE("nvidia/gp102/sec2/sig-1.bin"); |
453 |
+ MODULE_FIRMWARE("nvidia/gp104/acr/bl.bin"); |
454 |
+ MODULE_FIRMWARE("nvidia/gp104/acr/unload_bl.bin"); |
455 |
+ MODULE_FIRMWARE("nvidia/gp104/acr/ucode_load.bin"); |
456 |
+@@ -210,6 +213,9 @@ MODULE_FIRMWARE("nvidia/gp104/nvdec/scrubber.bin"); |
457 |
+ MODULE_FIRMWARE("nvidia/gp104/sec2/desc.bin"); |
458 |
+ MODULE_FIRMWARE("nvidia/gp104/sec2/image.bin"); |
459 |
+ MODULE_FIRMWARE("nvidia/gp104/sec2/sig.bin"); |
460 |
++MODULE_FIRMWARE("nvidia/gp104/sec2/desc-1.bin"); |
461 |
++MODULE_FIRMWARE("nvidia/gp104/sec2/image-1.bin"); |
462 |
++MODULE_FIRMWARE("nvidia/gp104/sec2/sig-1.bin"); |
463 |
+ MODULE_FIRMWARE("nvidia/gp106/acr/bl.bin"); |
464 |
+ MODULE_FIRMWARE("nvidia/gp106/acr/unload_bl.bin"); |
465 |
+ MODULE_FIRMWARE("nvidia/gp106/acr/ucode_load.bin"); |
466 |
+@@ -230,6 +236,9 @@ MODULE_FIRMWARE("nvidia/gp106/nvdec/scrubber.bin"); |
467 |
+ MODULE_FIRMWARE("nvidia/gp106/sec2/desc.bin"); |
468 |
+ MODULE_FIRMWARE("nvidia/gp106/sec2/image.bin"); |
469 |
+ MODULE_FIRMWARE("nvidia/gp106/sec2/sig.bin"); |
470 |
++MODULE_FIRMWARE("nvidia/gp106/sec2/desc-1.bin"); |
471 |
++MODULE_FIRMWARE("nvidia/gp106/sec2/image-1.bin"); |
472 |
++MODULE_FIRMWARE("nvidia/gp106/sec2/sig-1.bin"); |
473 |
+ MODULE_FIRMWARE("nvidia/gp107/acr/bl.bin"); |
474 |
+ MODULE_FIRMWARE("nvidia/gp107/acr/unload_bl.bin"); |
475 |
+ MODULE_FIRMWARE("nvidia/gp107/acr/ucode_load.bin"); |
476 |
+@@ -250,3 +259,6 @@ MODULE_FIRMWARE("nvidia/gp107/nvdec/scrubber.bin"); |
477 |
+ MODULE_FIRMWARE("nvidia/gp107/sec2/desc.bin"); |
478 |
+ MODULE_FIRMWARE("nvidia/gp107/sec2/image.bin"); |
479 |
+ MODULE_FIRMWARE("nvidia/gp107/sec2/sig.bin"); |
480 |
++MODULE_FIRMWARE("nvidia/gp107/sec2/desc-1.bin"); |
481 |
++MODULE_FIRMWARE("nvidia/gp107/sec2/image-1.bin"); |
482 |
++MODULE_FIRMWARE("nvidia/gp107/sec2/sig-1.bin"); |
483 |
+diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c b/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c |
484 |
+index 59e9d05ab928..0af048d1a815 100644 |
485 |
+--- a/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c |
486 |
++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c |
487 |
+@@ -353,7 +353,7 @@ static int vmw_recv_msg(struct rpc_channel *channel, void **msg, |
488 |
+ !!(HIGH_WORD(ecx) & MESSAGE_STATUS_HB)); |
489 |
+ if ((HIGH_WORD(ebx) & MESSAGE_STATUS_SUCCESS) == 0) { |
490 |
+ kfree(reply); |
491 |
+- |
492 |
++ reply = NULL; |
493 |
+ if ((HIGH_WORD(ebx) & MESSAGE_STATUS_CPT) != 0) { |
494 |
+ /* A checkpoint occurred. Retry. */ |
495 |
+ continue; |
496 |
+@@ -377,7 +377,7 @@ static int vmw_recv_msg(struct rpc_channel *channel, void **msg, |
497 |
+ |
498 |
+ if ((HIGH_WORD(ecx) & MESSAGE_STATUS_SUCCESS) == 0) { |
499 |
+ kfree(reply); |
500 |
+- |
501 |
++ reply = NULL; |
502 |
+ if ((HIGH_WORD(ecx) & MESSAGE_STATUS_CPT) != 0) { |
503 |
+ /* A checkpoint occurred. Retry. */ |
504 |
+ continue; |
505 |
+@@ -389,10 +389,8 @@ static int vmw_recv_msg(struct rpc_channel *channel, void **msg, |
506 |
+ break; |
507 |
+ } |
508 |
+ |
509 |
+- if (retries == RETRIES) { |
510 |
+- kfree(reply); |
511 |
++ if (!reply) |
512 |
+ return -EINVAL; |
513 |
+- } |
514 |
+ |
515 |
+ *msg_len = reply_len; |
516 |
+ *msg = reply; |
517 |
+diff --git a/drivers/infiniband/hw/hfi1/rc.c b/drivers/infiniband/hw/hfi1/rc.c |
518 |
+index 7c8cfb149da0..5c0d90418e8c 100644 |
519 |
+--- a/drivers/infiniband/hw/hfi1/rc.c |
520 |
++++ b/drivers/infiniband/hw/hfi1/rc.c |
521 |
+@@ -1830,23 +1830,13 @@ void hfi1_rc_send_complete(struct rvt_qp *qp, struct hfi1_opa_header *opah) |
522 |
+ } |
523 |
+ |
524 |
+ while (qp->s_last != qp->s_acked) { |
525 |
+- u32 s_last; |
526 |
+- |
527 |
+ wqe = rvt_get_swqe_ptr(qp, qp->s_last); |
528 |
+ if (cmp_psn(wqe->lpsn, qp->s_sending_psn) >= 0 && |
529 |
+ cmp_psn(qp->s_sending_psn, qp->s_sending_hpsn) <= 0) |
530 |
+ break; |
531 |
+ trdma_clean_swqe(qp, wqe); |
532 |
+- rvt_qp_wqe_unreserve(qp, wqe); |
533 |
+- s_last = qp->s_last; |
534 |
+- trace_hfi1_qp_send_completion(qp, wqe, s_last); |
535 |
+- if (++s_last >= qp->s_size) |
536 |
+- s_last = 0; |
537 |
+- qp->s_last = s_last; |
538 |
+- /* see post_send() */ |
539 |
+- barrier(); |
540 |
+- rvt_put_qp_swqe(qp, wqe); |
541 |
+- rvt_qp_swqe_complete(qp, |
542 |
++ trace_hfi1_qp_send_completion(qp, wqe, qp->s_last); |
543 |
++ rvt_qp_complete_swqe(qp, |
544 |
+ wqe, |
545 |
+ ib_hfi1_wc_opcode[wqe->wr.opcode], |
546 |
+ IB_WC_SUCCESS); |
547 |
+@@ -1890,19 +1880,9 @@ struct rvt_swqe *do_rc_completion(struct rvt_qp *qp, |
548 |
+ trace_hfi1_rc_completion(qp, wqe->lpsn); |
549 |
+ if (cmp_psn(wqe->lpsn, qp->s_sending_psn) < 0 || |
550 |
+ cmp_psn(qp->s_sending_psn, qp->s_sending_hpsn) > 0) { |
551 |
+- u32 s_last; |
552 |
+- |
553 |
+ trdma_clean_swqe(qp, wqe); |
554 |
+- rvt_put_qp_swqe(qp, wqe); |
555 |
+- rvt_qp_wqe_unreserve(qp, wqe); |
556 |
+- s_last = qp->s_last; |
557 |
+- trace_hfi1_qp_send_completion(qp, wqe, s_last); |
558 |
+- if (++s_last >= qp->s_size) |
559 |
+- s_last = 0; |
560 |
+- qp->s_last = s_last; |
561 |
+- /* see post_send() */ |
562 |
+- barrier(); |
563 |
+- rvt_qp_swqe_complete(qp, |
564 |
++ trace_hfi1_qp_send_completion(qp, wqe, qp->s_last); |
565 |
++ rvt_qp_complete_swqe(qp, |
566 |
+ wqe, |
567 |
+ ib_hfi1_wc_opcode[wqe->wr.opcode], |
568 |
+ IB_WC_SUCCESS); |
569 |
+diff --git a/drivers/infiniband/hw/qib/qib_rc.c b/drivers/infiniband/hw/qib/qib_rc.c |
570 |
+index 2ac4c67f5ba1..8d9a94d6f685 100644 |
571 |
+--- a/drivers/infiniband/hw/qib/qib_rc.c |
572 |
++++ b/drivers/infiniband/hw/qib/qib_rc.c |
573 |
+@@ -921,20 +921,11 @@ void qib_rc_send_complete(struct rvt_qp *qp, struct ib_header *hdr) |
574 |
+ rvt_add_retry_timer(qp); |
575 |
+ |
576 |
+ while (qp->s_last != qp->s_acked) { |
577 |
+- u32 s_last; |
578 |
+- |
579 |
+ wqe = rvt_get_swqe_ptr(qp, qp->s_last); |
580 |
+ if (qib_cmp24(wqe->lpsn, qp->s_sending_psn) >= 0 && |
581 |
+ qib_cmp24(qp->s_sending_psn, qp->s_sending_hpsn) <= 0) |
582 |
+ break; |
583 |
+- s_last = qp->s_last; |
584 |
+- if (++s_last >= qp->s_size) |
585 |
+- s_last = 0; |
586 |
+- qp->s_last = s_last; |
587 |
+- /* see post_send() */ |
588 |
+- barrier(); |
589 |
+- rvt_put_qp_swqe(qp, wqe); |
590 |
+- rvt_qp_swqe_complete(qp, |
591 |
++ rvt_qp_complete_swqe(qp, |
592 |
+ wqe, |
593 |
+ ib_qib_wc_opcode[wqe->wr.opcode], |
594 |
+ IB_WC_SUCCESS); |
595 |
+@@ -972,21 +963,12 @@ static struct rvt_swqe *do_rc_completion(struct rvt_qp *qp, |
596 |
+ * is finished. |
597 |
+ */ |
598 |
+ if (qib_cmp24(wqe->lpsn, qp->s_sending_psn) < 0 || |
599 |
+- qib_cmp24(qp->s_sending_psn, qp->s_sending_hpsn) > 0) { |
600 |
+- u32 s_last; |
601 |
+- |
602 |
+- rvt_put_qp_swqe(qp, wqe); |
603 |
+- s_last = qp->s_last; |
604 |
+- if (++s_last >= qp->s_size) |
605 |
+- s_last = 0; |
606 |
+- qp->s_last = s_last; |
607 |
+- /* see post_send() */ |
608 |
+- barrier(); |
609 |
+- rvt_qp_swqe_complete(qp, |
610 |
++ qib_cmp24(qp->s_sending_psn, qp->s_sending_hpsn) > 0) |
611 |
++ rvt_qp_complete_swqe(qp, |
612 |
+ wqe, |
613 |
+ ib_qib_wc_opcode[wqe->wr.opcode], |
614 |
+ IB_WC_SUCCESS); |
615 |
+- } else |
616 |
++ else |
617 |
+ this_cpu_inc(*ibp->rvp.rc_delayed_comp); |
618 |
+ |
619 |
+ qp->s_retry = qp->s_retry_cnt; |
620 |
+diff --git a/drivers/infiniband/sw/rdmavt/qp.c b/drivers/infiniband/sw/rdmavt/qp.c |
621 |
+index c5a50614a6c6..cb9e171d7e7b 100644 |
622 |
+--- a/drivers/infiniband/sw/rdmavt/qp.c |
623 |
++++ b/drivers/infiniband/sw/rdmavt/qp.c |
624 |
+@@ -1856,10 +1856,9 @@ static inline int rvt_qp_is_avail( |
625 |
+ |
626 |
+ /* see rvt_qp_wqe_unreserve() */ |
627 |
+ smp_mb__before_atomic(); |
628 |
+- reserved_used = atomic_read(&qp->s_reserved_used); |
629 |
+ if (unlikely(reserved_op)) { |
630 |
+ /* see rvt_qp_wqe_unreserve() */ |
631 |
+- smp_mb__before_atomic(); |
632 |
++ reserved_used = atomic_read(&qp->s_reserved_used); |
633 |
+ if (reserved_used >= rdi->dparms.reserved_operations) |
634 |
+ return -ENOMEM; |
635 |
+ return 0; |
636 |
+@@ -1867,14 +1866,13 @@ static inline int rvt_qp_is_avail( |
637 |
+ /* non-reserved operations */ |
638 |
+ if (likely(qp->s_avail)) |
639 |
+ return 0; |
640 |
+- slast = READ_ONCE(qp->s_last); |
641 |
++ /* See rvt_qp_complete_swqe() */ |
642 |
++ slast = smp_load_acquire(&qp->s_last); |
643 |
+ if (qp->s_head >= slast) |
644 |
+ avail = qp->s_size - (qp->s_head - slast); |
645 |
+ else |
646 |
+ avail = slast - qp->s_head; |
647 |
+ |
648 |
+- /* see rvt_qp_wqe_unreserve() */ |
649 |
+- smp_mb__before_atomic(); |
650 |
+ reserved_used = atomic_read(&qp->s_reserved_used); |
651 |
+ avail = avail - 1 - |
652 |
+ (rdi->dparms.reserved_operations - reserved_used); |
653 |
+@@ -2667,27 +2665,16 @@ void rvt_send_complete(struct rvt_qp *qp, struct rvt_swqe *wqe, |
654 |
+ enum ib_wc_status status) |
655 |
+ { |
656 |
+ u32 old_last, last; |
657 |
+- struct rvt_dev_info *rdi = ib_to_rvt(qp->ibqp.device); |
658 |
++ struct rvt_dev_info *rdi; |
659 |
+ |
660 |
+ if (!(ib_rvt_state_ops[qp->state] & RVT_PROCESS_OR_FLUSH_SEND)) |
661 |
+ return; |
662 |
++ rdi = ib_to_rvt(qp->ibqp.device); |
663 |
+ |
664 |
+- last = qp->s_last; |
665 |
+- old_last = last; |
666 |
+- trace_rvt_qp_send_completion(qp, wqe, last); |
667 |
+- if (++last >= qp->s_size) |
668 |
+- last = 0; |
669 |
+- trace_rvt_qp_send_completion(qp, wqe, last); |
670 |
+- qp->s_last = last; |
671 |
+- /* See post_send() */ |
672 |
+- barrier(); |
673 |
+- rvt_put_qp_swqe(qp, wqe); |
674 |
+- |
675 |
+- rvt_qp_swqe_complete(qp, |
676 |
+- wqe, |
677 |
+- rdi->wc_opcode[wqe->wr.opcode], |
678 |
+- status); |
679 |
+- |
680 |
++ old_last = qp->s_last; |
681 |
++ trace_rvt_qp_send_completion(qp, wqe, old_last); |
682 |
++ last = rvt_qp_complete_swqe(qp, wqe, rdi->wc_opcode[wqe->wr.opcode], |
683 |
++ status); |
684 |
+ if (qp->s_acked == old_last) |
685 |
+ qp->s_acked = last; |
686 |
+ if (qp->s_cur == old_last) |
687 |
+diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c |
688 |
+index 773f5fdad25f..5cf3247e8afb 100644 |
689 |
+--- a/drivers/md/bcache/btree.c |
690 |
++++ b/drivers/md/bcache/btree.c |
691 |
+@@ -35,7 +35,7 @@ |
692 |
+ #include <linux/rcupdate.h> |
693 |
+ #include <linux/sched/clock.h> |
694 |
+ #include <linux/rculist.h> |
695 |
+- |
696 |
++#include <linux/delay.h> |
697 |
+ #include <trace/events/bcache.h> |
698 |
+ |
699 |
+ /* |
700 |
+@@ -655,7 +655,25 @@ static int mca_reap(struct btree *b, unsigned int min_order, bool flush) |
701 |
+ up(&b->io_mutex); |
702 |
+ } |
703 |
+ |
704 |
++retry: |
705 |
++ /* |
706 |
++ * BTREE_NODE_dirty might be cleared in btree_flush_btree() by |
707 |
++ * __bch_btree_node_write(). To avoid an extra flush, acquire |
708 |
++ * b->write_lock before checking BTREE_NODE_dirty bit. |
709 |
++ */ |
710 |
+ mutex_lock(&b->write_lock); |
711 |
++ /* |
712 |
++ * If this btree node is selected in btree_flush_write() by journal |
713 |
++ * code, delay and retry until the node is flushed by journal code |
714 |
++ * and BTREE_NODE_journal_flush bit cleared by btree_flush_write(). |
715 |
++ */ |
716 |
++ if (btree_node_journal_flush(b)) { |
717 |
++ pr_debug("bnode %p is flushing by journal, retry", b); |
718 |
++ mutex_unlock(&b->write_lock); |
719 |
++ udelay(1); |
720 |
++ goto retry; |
721 |
++ } |
722 |
++ |
723 |
+ if (btree_node_dirty(b)) |
724 |
+ __bch_btree_node_write(b, &cl); |
725 |
+ mutex_unlock(&b->write_lock); |
726 |
+@@ -778,10 +796,15 @@ void bch_btree_cache_free(struct cache_set *c) |
727 |
+ while (!list_empty(&c->btree_cache)) { |
728 |
+ b = list_first_entry(&c->btree_cache, struct btree, list); |
729 |
+ |
730 |
+- if (btree_node_dirty(b)) |
731 |
++ /* |
732 |
++ * This function is called by cache_set_free(), no I/O |
733 |
++ * request on cache now, it is unnecessary to acquire |
734 |
++ * b->write_lock before clearing BTREE_NODE_dirty anymore. |
735 |
++ */ |
736 |
++ if (btree_node_dirty(b)) { |
737 |
+ btree_complete_write(b, btree_current_write(b)); |
738 |
+- clear_bit(BTREE_NODE_dirty, &b->flags); |
739 |
+- |
740 |
++ clear_bit(BTREE_NODE_dirty, &b->flags); |
741 |
++ } |
742 |
+ mca_data_free(b); |
743 |
+ } |
744 |
+ |
745 |
+@@ -1067,11 +1090,25 @@ static void btree_node_free(struct btree *b) |
746 |
+ |
747 |
+ BUG_ON(b == b->c->root); |
748 |
+ |
749 |
++retry: |
750 |
+ mutex_lock(&b->write_lock); |
751 |
++ /* |
752 |
++ * If the btree node is selected and flushing in btree_flush_write(), |
753 |
++ * delay and retry until the BTREE_NODE_journal_flush bit cleared, |
754 |
++ * then it is safe to free the btree node here. Otherwise this btree |
755 |
++ * node will be in race condition. |
756 |
++ */ |
757 |
++ if (btree_node_journal_flush(b)) { |
758 |
++ mutex_unlock(&b->write_lock); |
759 |
++ pr_debug("bnode %p journal_flush set, retry", b); |
760 |
++ udelay(1); |
761 |
++ goto retry; |
762 |
++ } |
763 |
+ |
764 |
+- if (btree_node_dirty(b)) |
765 |
++ if (btree_node_dirty(b)) { |
766 |
+ btree_complete_write(b, btree_current_write(b)); |
767 |
+- clear_bit(BTREE_NODE_dirty, &b->flags); |
768 |
++ clear_bit(BTREE_NODE_dirty, &b->flags); |
769 |
++ } |
770 |
+ |
771 |
+ mutex_unlock(&b->write_lock); |
772 |
+ |
773 |
+diff --git a/drivers/md/bcache/btree.h b/drivers/md/bcache/btree.h |
774 |
+index d1c72ef64edf..76cfd121a486 100644 |
775 |
+--- a/drivers/md/bcache/btree.h |
776 |
++++ b/drivers/md/bcache/btree.h |
777 |
+@@ -158,11 +158,13 @@ enum btree_flags { |
778 |
+ BTREE_NODE_io_error, |
779 |
+ BTREE_NODE_dirty, |
780 |
+ BTREE_NODE_write_idx, |
781 |
++ BTREE_NODE_journal_flush, |
782 |
+ }; |
783 |
+ |
784 |
+ BTREE_FLAG(io_error); |
785 |
+ BTREE_FLAG(dirty); |
786 |
+ BTREE_FLAG(write_idx); |
787 |
++BTREE_FLAG(journal_flush); |
788 |
+ |
789 |
+ static inline struct btree_write *btree_current_write(struct btree *b) |
790 |
+ { |
791 |
+diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c |
792 |
+index cae2aff5e27a..33556acdcf9c 100644 |
793 |
+--- a/drivers/md/bcache/journal.c |
794 |
++++ b/drivers/md/bcache/journal.c |
795 |
+@@ -405,6 +405,7 @@ static void btree_flush_write(struct cache_set *c) |
796 |
+ retry: |
797 |
+ best = NULL; |
798 |
+ |
799 |
++ mutex_lock(&c->bucket_lock); |
800 |
+ for_each_cached_btree(b, c, i) |
801 |
+ if (btree_current_write(b)->journal) { |
802 |
+ if (!best) |
803 |
+@@ -417,9 +418,14 @@ retry: |
804 |
+ } |
805 |
+ |
806 |
+ b = best; |
807 |
++ if (b) |
808 |
++ set_btree_node_journal_flush(b); |
809 |
++ mutex_unlock(&c->bucket_lock); |
810 |
++ |
811 |
+ if (b) { |
812 |
+ mutex_lock(&b->write_lock); |
813 |
+ if (!btree_current_write(b)->journal) { |
814 |
++ clear_bit(BTREE_NODE_journal_flush, &b->flags); |
815 |
+ mutex_unlock(&b->write_lock); |
816 |
+ /* We raced */ |
817 |
+ atomic_long_inc(&c->retry_flush_write); |
818 |
+@@ -427,6 +433,7 @@ retry: |
819 |
+ } |
820 |
+ |
821 |
+ __bch_btree_node_write(b, NULL); |
822 |
++ clear_bit(BTREE_NODE_journal_flush, &b->flags); |
823 |
+ mutex_unlock(&b->write_lock); |
824 |
+ } |
825 |
+ } |
826 |
+diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c |
827 |
+index b3a130a9ee23..1604f512c7bd 100644 |
828 |
+--- a/drivers/mmc/host/sdhci-acpi.c |
829 |
++++ b/drivers/mmc/host/sdhci-acpi.c |
830 |
+@@ -883,7 +883,7 @@ static int sdhci_acpi_runtime_resume(struct device *dev) |
831 |
+ |
832 |
+ sdhci_acpi_byt_setting(&c->pdev->dev); |
833 |
+ |
834 |
+- return sdhci_runtime_resume_host(c->host); |
835 |
++ return sdhci_runtime_resume_host(c->host, 0); |
836 |
+ } |
837 |
+ |
838 |
+ #endif |
839 |
+diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c |
840 |
+index c391510e9ef4..776a94216248 100644 |
841 |
+--- a/drivers/mmc/host/sdhci-esdhc-imx.c |
842 |
++++ b/drivers/mmc/host/sdhci-esdhc-imx.c |
843 |
+@@ -1705,7 +1705,7 @@ static int sdhci_esdhc_runtime_resume(struct device *dev) |
844 |
+ esdhc_pltfm_set_clock(host, imx_data->actual_clock); |
845 |
+ } |
846 |
+ |
847 |
+- err = sdhci_runtime_resume_host(host); |
848 |
++ err = sdhci_runtime_resume_host(host, 0); |
849 |
+ if (err) |
850 |
+ goto disable_ipg_clk; |
851 |
+ |
852 |
+diff --git a/drivers/mmc/host/sdhci-of-at91.c b/drivers/mmc/host/sdhci-of-at91.c |
853 |
+index d4993582f0f6..e7d1920729fb 100644 |
854 |
+--- a/drivers/mmc/host/sdhci-of-at91.c |
855 |
++++ b/drivers/mmc/host/sdhci-of-at91.c |
856 |
+@@ -289,7 +289,7 @@ static int sdhci_at91_runtime_resume(struct device *dev) |
857 |
+ } |
858 |
+ |
859 |
+ out: |
860 |
+- return sdhci_runtime_resume_host(host); |
861 |
++ return sdhci_runtime_resume_host(host, 0); |
862 |
+ } |
863 |
+ #endif /* CONFIG_PM */ |
864 |
+ |
865 |
+diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c |
866 |
+index 4154ee11b47d..267b90374fa4 100644 |
867 |
+--- a/drivers/mmc/host/sdhci-pci-core.c |
868 |
++++ b/drivers/mmc/host/sdhci-pci-core.c |
869 |
+@@ -167,7 +167,7 @@ static int sdhci_pci_runtime_suspend_host(struct sdhci_pci_chip *chip) |
870 |
+ |
871 |
+ err_pci_runtime_suspend: |
872 |
+ while (--i >= 0) |
873 |
+- sdhci_runtime_resume_host(chip->slots[i]->host); |
874 |
++ sdhci_runtime_resume_host(chip->slots[i]->host, 0); |
875 |
+ return ret; |
876 |
+ } |
877 |
+ |
878 |
+@@ -181,7 +181,7 @@ static int sdhci_pci_runtime_resume_host(struct sdhci_pci_chip *chip) |
879 |
+ if (!slot) |
880 |
+ continue; |
881 |
+ |
882 |
+- ret = sdhci_runtime_resume_host(slot->host); |
883 |
++ ret = sdhci_runtime_resume_host(slot->host, 0); |
884 |
+ if (ret) |
885 |
+ return ret; |
886 |
+ } |
887 |
+diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c |
888 |
+index 3ddecf479295..e55037ceda73 100644 |
889 |
+--- a/drivers/mmc/host/sdhci-pxav3.c |
890 |
++++ b/drivers/mmc/host/sdhci-pxav3.c |
891 |
+@@ -554,7 +554,7 @@ static int sdhci_pxav3_runtime_resume(struct device *dev) |
892 |
+ if (!IS_ERR(pxa->clk_core)) |
893 |
+ clk_prepare_enable(pxa->clk_core); |
894 |
+ |
895 |
+- return sdhci_runtime_resume_host(host); |
896 |
++ return sdhci_runtime_resume_host(host, 0); |
897 |
+ } |
898 |
+ #endif |
899 |
+ |
900 |
+diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c |
901 |
+index 8e4a8ba33f05..f5753aef7151 100644 |
902 |
+--- a/drivers/mmc/host/sdhci-s3c.c |
903 |
++++ b/drivers/mmc/host/sdhci-s3c.c |
904 |
+@@ -745,7 +745,7 @@ static int sdhci_s3c_runtime_resume(struct device *dev) |
905 |
+ clk_prepare_enable(busclk); |
906 |
+ if (ourhost->cur_clk >= 0) |
907 |
+ clk_prepare_enable(ourhost->clk_bus[ourhost->cur_clk]); |
908 |
+- ret = sdhci_runtime_resume_host(host); |
909 |
++ ret = sdhci_runtime_resume_host(host, 0); |
910 |
+ return ret; |
911 |
+ } |
912 |
+ #endif |
913 |
+diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c |
914 |
+index fc892a8d882f..53f3af53b3fb 100644 |
915 |
+--- a/drivers/mmc/host/sdhci-sprd.c |
916 |
++++ b/drivers/mmc/host/sdhci-sprd.c |
917 |
+@@ -497,7 +497,7 @@ static int sdhci_sprd_runtime_resume(struct device *dev) |
918 |
+ return ret; |
919 |
+ } |
920 |
+ |
921 |
+- sdhci_runtime_resume_host(host); |
922 |
++ sdhci_runtime_resume_host(host, 1); |
923 |
+ |
924 |
+ return 0; |
925 |
+ } |
926 |
+diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c |
927 |
+index 8a18f14cf842..1dea1ba66f7b 100644 |
928 |
+--- a/drivers/mmc/host/sdhci-xenon.c |
929 |
++++ b/drivers/mmc/host/sdhci-xenon.c |
930 |
+@@ -638,7 +638,7 @@ static int xenon_runtime_resume(struct device *dev) |
931 |
+ priv->restore_needed = false; |
932 |
+ } |
933 |
+ |
934 |
+- ret = sdhci_runtime_resume_host(host); |
935 |
++ ret = sdhci_runtime_resume_host(host, 0); |
936 |
+ if (ret) |
937 |
+ goto out; |
938 |
+ return 0; |
939 |
+diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c |
940 |
+index 59acf8e3331e..a5dc5aae973e 100644 |
941 |
+--- a/drivers/mmc/host/sdhci.c |
942 |
++++ b/drivers/mmc/host/sdhci.c |
943 |
+@@ -3320,7 +3320,7 @@ int sdhci_runtime_suspend_host(struct sdhci_host *host) |
944 |
+ } |
945 |
+ EXPORT_SYMBOL_GPL(sdhci_runtime_suspend_host); |
946 |
+ |
947 |
+-int sdhci_runtime_resume_host(struct sdhci_host *host) |
948 |
++int sdhci_runtime_resume_host(struct sdhci_host *host, int soft_reset) |
949 |
+ { |
950 |
+ struct mmc_host *mmc = host->mmc; |
951 |
+ unsigned long flags; |
952 |
+@@ -3331,7 +3331,7 @@ int sdhci_runtime_resume_host(struct sdhci_host *host) |
953 |
+ host->ops->enable_dma(host); |
954 |
+ } |
955 |
+ |
956 |
+- sdhci_init(host, 0); |
957 |
++ sdhci_init(host, soft_reset); |
958 |
+ |
959 |
+ if (mmc->ios.power_mode != MMC_POWER_UNDEFINED && |
960 |
+ mmc->ios.power_mode != MMC_POWER_OFF) { |
961 |
+diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h |
962 |
+index 199712e7adbb..d2c7c9c436c9 100644 |
963 |
+--- a/drivers/mmc/host/sdhci.h |
964 |
++++ b/drivers/mmc/host/sdhci.h |
965 |
+@@ -781,7 +781,7 @@ void sdhci_adma_write_desc(struct sdhci_host *host, void **desc, |
966 |
+ int sdhci_suspend_host(struct sdhci_host *host); |
967 |
+ int sdhci_resume_host(struct sdhci_host *host); |
968 |
+ int sdhci_runtime_suspend_host(struct sdhci_host *host); |
969 |
+-int sdhci_runtime_resume_host(struct sdhci_host *host); |
970 |
++int sdhci_runtime_resume_host(struct sdhci_host *host, int soft_reset); |
971 |
+ #endif |
972 |
+ |
973 |
+ void sdhci_cqe_enable(struct mmc_host *mmc); |
974 |
+diff --git a/drivers/s390/virtio/virtio_ccw.c b/drivers/s390/virtio/virtio_ccw.c |
975 |
+index 6a3076881321..8d47ad61bac3 100644 |
976 |
+--- a/drivers/s390/virtio/virtio_ccw.c |
977 |
++++ b/drivers/s390/virtio/virtio_ccw.c |
978 |
+@@ -132,6 +132,7 @@ struct airq_info { |
979 |
+ struct airq_iv *aiv; |
980 |
+ }; |
981 |
+ static struct airq_info *airq_areas[MAX_AIRQ_AREAS]; |
982 |
++static DEFINE_MUTEX(airq_areas_lock); |
983 |
+ |
984 |
+ #define CCW_CMD_SET_VQ 0x13 |
985 |
+ #define CCW_CMD_VDEV_RESET 0x33 |
986 |
+@@ -244,9 +245,11 @@ static unsigned long get_airq_indicator(struct virtqueue *vqs[], int nvqs, |
987 |
+ unsigned long bit, flags; |
988 |
+ |
989 |
+ for (i = 0; i < MAX_AIRQ_AREAS && !indicator_addr; i++) { |
990 |
++ mutex_lock(&airq_areas_lock); |
991 |
+ if (!airq_areas[i]) |
992 |
+ airq_areas[i] = new_airq_info(); |
993 |
+ info = airq_areas[i]; |
994 |
++ mutex_unlock(&airq_areas_lock); |
995 |
+ if (!info) |
996 |
+ return 0; |
997 |
+ write_lock_irqsave(&info->lock, flags); |
998 |
+diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c |
999 |
+index ceec8d5985d4..5faae96735e6 100644 |
1000 |
+--- a/drivers/usb/chipidea/ci_hdrc_imx.c |
1001 |
++++ b/drivers/usb/chipidea/ci_hdrc_imx.c |
1002 |
+@@ -13,6 +13,7 @@ |
1003 |
+ #include <linux/usb/of.h> |
1004 |
+ #include <linux/clk.h> |
1005 |
+ #include <linux/pinctrl/consumer.h> |
1006 |
++#include <linux/pm_qos.h> |
1007 |
+ |
1008 |
+ #include "ci.h" |
1009 |
+ #include "ci_hdrc_imx.h" |
1010 |
+@@ -63,6 +64,11 @@ static const struct ci_hdrc_imx_platform_flag imx7d_usb_data = { |
1011 |
+ .flags = CI_HDRC_SUPPORTS_RUNTIME_PM, |
1012 |
+ }; |
1013 |
+ |
1014 |
++static const struct ci_hdrc_imx_platform_flag imx7ulp_usb_data = { |
1015 |
++ .flags = CI_HDRC_SUPPORTS_RUNTIME_PM | |
1016 |
++ CI_HDRC_PMQOS, |
1017 |
++}; |
1018 |
++ |
1019 |
+ static const struct of_device_id ci_hdrc_imx_dt_ids[] = { |
1020 |
+ { .compatible = "fsl,imx23-usb", .data = &imx23_usb_data}, |
1021 |
+ { .compatible = "fsl,imx28-usb", .data = &imx28_usb_data}, |
1022 |
+@@ -72,6 +78,7 @@ static const struct of_device_id ci_hdrc_imx_dt_ids[] = { |
1023 |
+ { .compatible = "fsl,imx6sx-usb", .data = &imx6sx_usb_data}, |
1024 |
+ { .compatible = "fsl,imx6ul-usb", .data = &imx6ul_usb_data}, |
1025 |
+ { .compatible = "fsl,imx7d-usb", .data = &imx7d_usb_data}, |
1026 |
++ { .compatible = "fsl,imx7ulp-usb", .data = &imx7ulp_usb_data}, |
1027 |
+ { /* sentinel */ } |
1028 |
+ }; |
1029 |
+ MODULE_DEVICE_TABLE(of, ci_hdrc_imx_dt_ids); |
1030 |
+@@ -93,6 +100,8 @@ struct ci_hdrc_imx_data { |
1031 |
+ struct clk *clk_ahb; |
1032 |
+ struct clk *clk_per; |
1033 |
+ /* --------------------------------- */ |
1034 |
++ struct pm_qos_request pm_qos_req; |
1035 |
++ const struct ci_hdrc_imx_platform_flag *plat_data; |
1036 |
+ }; |
1037 |
+ |
1038 |
+ /* Common functions shared by usbmisc drivers */ |
1039 |
+@@ -309,6 +318,8 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev) |
1040 |
+ if (!data) |
1041 |
+ return -ENOMEM; |
1042 |
+ |
1043 |
++ data->plat_data = imx_platform_flag; |
1044 |
++ pdata.flags |= imx_platform_flag->flags; |
1045 |
+ platform_set_drvdata(pdev, data); |
1046 |
+ data->usbmisc_data = usbmisc_get_init_data(dev); |
1047 |
+ if (IS_ERR(data->usbmisc_data)) |
1048 |
+@@ -369,6 +380,11 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev) |
1049 |
+ } |
1050 |
+ } |
1051 |
+ } |
1052 |
++ |
1053 |
++ if (pdata.flags & CI_HDRC_PMQOS) |
1054 |
++ pm_qos_add_request(&data->pm_qos_req, |
1055 |
++ PM_QOS_CPU_DMA_LATENCY, 0); |
1056 |
++ |
1057 |
+ ret = imx_get_clks(dev); |
1058 |
+ if (ret) |
1059 |
+ goto disable_hsic_regulator; |
1060 |
+@@ -396,7 +412,6 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev) |
1061 |
+ usb_phy_init(pdata.usb_phy); |
1062 |
+ } |
1063 |
+ |
1064 |
+- pdata.flags |= imx_platform_flag->flags; |
1065 |
+ if (pdata.flags & CI_HDRC_SUPPORTS_RUNTIME_PM) |
1066 |
+ data->supports_runtime_pm = true; |
1067 |
+ |
1068 |
+@@ -438,7 +453,11 @@ err_clk: |
1069 |
+ imx_disable_unprepare_clks(dev); |
1070 |
+ disable_hsic_regulator: |
1071 |
+ if (data->hsic_pad_regulator) |
1072 |
+- ret = regulator_disable(data->hsic_pad_regulator); |
1073 |
++ /* don't overwrite original ret (cf. EPROBE_DEFER) */ |
1074 |
++ regulator_disable(data->hsic_pad_regulator); |
1075 |
++ if (pdata.flags & CI_HDRC_PMQOS) |
1076 |
++ pm_qos_remove_request(&data->pm_qos_req); |
1077 |
++ data->ci_pdev = NULL; |
1078 |
+ return ret; |
1079 |
+ } |
1080 |
+ |
1081 |
+@@ -451,12 +470,17 @@ static int ci_hdrc_imx_remove(struct platform_device *pdev) |
1082 |
+ pm_runtime_disable(&pdev->dev); |
1083 |
+ pm_runtime_put_noidle(&pdev->dev); |
1084 |
+ } |
1085 |
+- ci_hdrc_remove_device(data->ci_pdev); |
1086 |
++ if (data->ci_pdev) |
1087 |
++ ci_hdrc_remove_device(data->ci_pdev); |
1088 |
+ if (data->override_phy_control) |
1089 |
+ usb_phy_shutdown(data->phy); |
1090 |
+- imx_disable_unprepare_clks(&pdev->dev); |
1091 |
+- if (data->hsic_pad_regulator) |
1092 |
+- regulator_disable(data->hsic_pad_regulator); |
1093 |
++ if (data->ci_pdev) { |
1094 |
++ imx_disable_unprepare_clks(&pdev->dev); |
1095 |
++ if (data->plat_data->flags & CI_HDRC_PMQOS) |
1096 |
++ pm_qos_remove_request(&data->pm_qos_req); |
1097 |
++ if (data->hsic_pad_regulator) |
1098 |
++ regulator_disable(data->hsic_pad_regulator); |
1099 |
++ } |
1100 |
+ |
1101 |
+ return 0; |
1102 |
+ } |
1103 |
+@@ -480,6 +504,9 @@ static int __maybe_unused imx_controller_suspend(struct device *dev) |
1104 |
+ } |
1105 |
+ |
1106 |
+ imx_disable_unprepare_clks(dev); |
1107 |
++ if (data->plat_data->flags & CI_HDRC_PMQOS) |
1108 |
++ pm_qos_remove_request(&data->pm_qos_req); |
1109 |
++ |
1110 |
+ data->in_lpm = true; |
1111 |
+ |
1112 |
+ return 0; |
1113 |
+@@ -497,6 +524,10 @@ static int __maybe_unused imx_controller_resume(struct device *dev) |
1114 |
+ return 0; |
1115 |
+ } |
1116 |
+ |
1117 |
++ if (data->plat_data->flags & CI_HDRC_PMQOS) |
1118 |
++ pm_qos_add_request(&data->pm_qos_req, |
1119 |
++ PM_QOS_CPU_DMA_LATENCY, 0); |
1120 |
++ |
1121 |
+ ret = imx_prepare_enable_clks(dev); |
1122 |
+ if (ret) |
1123 |
+ return ret; |
1124 |
+diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c |
1125 |
+index d8b67e150b12..b7a5727d0c8a 100644 |
1126 |
+--- a/drivers/usb/chipidea/usbmisc_imx.c |
1127 |
++++ b/drivers/usb/chipidea/usbmisc_imx.c |
1128 |
+@@ -763,6 +763,10 @@ static const struct of_device_id usbmisc_imx_dt_ids[] = { |
1129 |
+ .compatible = "fsl,imx7d-usbmisc", |
1130 |
+ .data = &imx7d_usbmisc_ops, |
1131 |
+ }, |
1132 |
++ { |
1133 |
++ .compatible = "fsl,imx7ulp-usbmisc", |
1134 |
++ .data = &imx7d_usbmisc_ops, |
1135 |
++ }, |
1136 |
+ { /* sentinel */ } |
1137 |
+ }; |
1138 |
+ MODULE_DEVICE_TABLE(of, usbmisc_imx_dt_ids); |
1139 |
+diff --git a/drivers/vhost/test.c b/drivers/vhost/test.c |
1140 |
+index 9e90e969af55..7804869c6a31 100644 |
1141 |
+--- a/drivers/vhost/test.c |
1142 |
++++ b/drivers/vhost/test.c |
1143 |
+@@ -22,6 +22,12 @@ |
1144 |
+ * Using this limit prevents one virtqueue from starving others. */ |
1145 |
+ #define VHOST_TEST_WEIGHT 0x80000 |
1146 |
+ |
1147 |
++/* Max number of packets transferred before requeueing the job. |
1148 |
++ * Using this limit prevents one virtqueue from starving others with |
1149 |
++ * pkts. |
1150 |
++ */ |
1151 |
++#define VHOST_TEST_PKT_WEIGHT 256 |
1152 |
++ |
1153 |
+ enum { |
1154 |
+ VHOST_TEST_VQ = 0, |
1155 |
+ VHOST_TEST_VQ_MAX = 1, |
1156 |
+@@ -80,10 +86,8 @@ static void handle_vq(struct vhost_test *n) |
1157 |
+ } |
1158 |
+ vhost_add_used_and_signal(&n->dev, vq, head, 0); |
1159 |
+ total_len += len; |
1160 |
+- if (unlikely(total_len >= VHOST_TEST_WEIGHT)) { |
1161 |
+- vhost_poll_queue(&vq->poll); |
1162 |
++ if (unlikely(vhost_exceeds_weight(vq, 0, total_len))) |
1163 |
+ break; |
1164 |
+- } |
1165 |
+ } |
1166 |
+ |
1167 |
+ mutex_unlock(&vq->mutex); |
1168 |
+@@ -115,7 +119,8 @@ static int vhost_test_open(struct inode *inode, struct file *f) |
1169 |
+ dev = &n->dev; |
1170 |
+ vqs[VHOST_TEST_VQ] = &n->vqs[VHOST_TEST_VQ]; |
1171 |
+ n->vqs[VHOST_TEST_VQ].handle_kick = handle_vq_kick; |
1172 |
+- vhost_dev_init(dev, vqs, VHOST_TEST_VQ_MAX); |
1173 |
++ vhost_dev_init(dev, vqs, VHOST_TEST_VQ_MAX, UIO_MAXIOV, |
1174 |
++ VHOST_TEST_PKT_WEIGHT, VHOST_TEST_WEIGHT); |
1175 |
+ |
1176 |
+ f->private_data = n; |
1177 |
+ |
1178 |
+diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c |
1179 |
+index e995c12d8e24..fcd8bf2846fc 100644 |
1180 |
+--- a/drivers/vhost/vhost.c |
1181 |
++++ b/drivers/vhost/vhost.c |
1182 |
+@@ -2072,7 +2072,7 @@ static int get_indirect(struct vhost_virtqueue *vq, |
1183 |
+ /* If this is an input descriptor, increment that count. */ |
1184 |
+ if (access == VHOST_ACCESS_WO) { |
1185 |
+ *in_num += ret; |
1186 |
+- if (unlikely(log)) { |
1187 |
++ if (unlikely(log && ret)) { |
1188 |
+ log[*log_num].addr = vhost64_to_cpu(vq, desc.addr); |
1189 |
+ log[*log_num].len = vhost32_to_cpu(vq, desc.len); |
1190 |
+ ++*log_num; |
1191 |
+@@ -2215,7 +2215,7 @@ int vhost_get_vq_desc(struct vhost_virtqueue *vq, |
1192 |
+ /* If this is an input descriptor, |
1193 |
+ * increment that count. */ |
1194 |
+ *in_num += ret; |
1195 |
+- if (unlikely(log)) { |
1196 |
++ if (unlikely(log && ret)) { |
1197 |
+ log[*log_num].addr = vhost64_to_cpu(vq, desc.addr); |
1198 |
+ log[*log_num].len = vhost32_to_cpu(vq, desc.len); |
1199 |
+ ++*log_num; |
1200 |
+diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c |
1201 |
+index db337e53aab3..93900ff87df7 100644 |
1202 |
+--- a/fs/btrfs/extent_io.c |
1203 |
++++ b/fs/btrfs/extent_io.c |
1204 |
+@@ -3591,6 +3591,13 @@ void wait_on_extent_buffer_writeback(struct extent_buffer *eb) |
1205 |
+ TASK_UNINTERRUPTIBLE); |
1206 |
+ } |
1207 |
+ |
1208 |
++static void end_extent_buffer_writeback(struct extent_buffer *eb) |
1209 |
++{ |
1210 |
++ clear_bit(EXTENT_BUFFER_WRITEBACK, &eb->bflags); |
1211 |
++ smp_mb__after_atomic(); |
1212 |
++ wake_up_bit(&eb->bflags, EXTENT_BUFFER_WRITEBACK); |
1213 |
++} |
1214 |
++ |
1215 |
+ /* |
1216 |
+ * Lock eb pages and flush the bio if we can't the locks |
1217 |
+ * |
1218 |
+@@ -3662,8 +3669,11 @@ static noinline_for_stack int lock_extent_buffer_for_io(struct extent_buffer *eb |
1219 |
+ |
1220 |
+ if (!trylock_page(p)) { |
1221 |
+ if (!flush) { |
1222 |
+- ret = flush_write_bio(epd); |
1223 |
+- if (ret < 0) { |
1224 |
++ int err; |
1225 |
++ |
1226 |
++ err = flush_write_bio(epd); |
1227 |
++ if (err < 0) { |
1228 |
++ ret = err; |
1229 |
+ failed_page_nr = i; |
1230 |
+ goto err_unlock; |
1231 |
+ } |
1232 |
+@@ -3678,16 +3688,23 @@ err_unlock: |
1233 |
+ /* Unlock already locked pages */ |
1234 |
+ for (i = 0; i < failed_page_nr; i++) |
1235 |
+ unlock_page(eb->pages[i]); |
1236 |
++ /* |
1237 |
++ * Clear EXTENT_BUFFER_WRITEBACK and wake up anyone waiting on it. |
1238 |
++ * Also set back EXTENT_BUFFER_DIRTY so future attempts to this eb can |
1239 |
++ * be made and undo everything done before. |
1240 |
++ */ |
1241 |
++ btrfs_tree_lock(eb); |
1242 |
++ spin_lock(&eb->refs_lock); |
1243 |
++ set_bit(EXTENT_BUFFER_DIRTY, &eb->bflags); |
1244 |
++ end_extent_buffer_writeback(eb); |
1245 |
++ spin_unlock(&eb->refs_lock); |
1246 |
++ percpu_counter_add_batch(&fs_info->dirty_metadata_bytes, eb->len, |
1247 |
++ fs_info->dirty_metadata_batch); |
1248 |
++ btrfs_clear_header_flag(eb, BTRFS_HEADER_FLAG_WRITTEN); |
1249 |
++ btrfs_tree_unlock(eb); |
1250 |
+ return ret; |
1251 |
+ } |
1252 |
+ |
1253 |
+-static void end_extent_buffer_writeback(struct extent_buffer *eb) |
1254 |
+-{ |
1255 |
+- clear_bit(EXTENT_BUFFER_WRITEBACK, &eb->bflags); |
1256 |
+- smp_mb__after_atomic(); |
1257 |
+- wake_up_bit(&eb->bflags, EXTENT_BUFFER_WRITEBACK); |
1258 |
+-} |
1259 |
+- |
1260 |
+ static void set_btree_ioerr(struct page *page) |
1261 |
+ { |
1262 |
+ struct extent_buffer *eb = (struct extent_buffer *)page->private; |
1263 |
+diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h |
1264 |
+index 911e05af671e..edd89b7c8f18 100644 |
1265 |
+--- a/include/linux/usb/chipidea.h |
1266 |
++++ b/include/linux/usb/chipidea.h |
1267 |
+@@ -61,6 +61,7 @@ struct ci_hdrc_platform_data { |
1268 |
+ #define CI_HDRC_OVERRIDE_PHY_CONTROL BIT(12) /* Glue layer manages phy */ |
1269 |
+ #define CI_HDRC_REQUIRES_ALIGNED_DMA BIT(13) |
1270 |
+ #define CI_HDRC_IMX_IS_HSIC BIT(14) |
1271 |
++#define CI_HDRC_PMQOS BIT(15) |
1272 |
+ enum usb_dr_mode dr_mode; |
1273 |
+ #define CI_HDRC_CONTROLLER_RESET_EVENT 0 |
1274 |
+ #define CI_HDRC_CONTROLLER_STOPPED_EVENT 1 |
1275 |
+diff --git a/include/rdma/rdmavt_qp.h b/include/rdma/rdmavt_qp.h |
1276 |
+index 68e38c20afc0..85544777587d 100644 |
1277 |
+--- a/include/rdma/rdmavt_qp.h |
1278 |
++++ b/include/rdma/rdmavt_qp.h |
1279 |
+@@ -540,7 +540,7 @@ static inline void rvt_qp_wqe_reserve( |
1280 |
+ /** |
1281 |
+ * rvt_qp_wqe_unreserve - clean reserved operation |
1282 |
+ * @qp - the rvt qp |
1283 |
+- * @wqe - the send wqe |
1284 |
++ * @flags - send wqe flags |
1285 |
+ * |
1286 |
+ * This decrements the reserve use count. |
1287 |
+ * |
1288 |
+@@ -552,11 +552,9 @@ static inline void rvt_qp_wqe_reserve( |
1289 |
+ * the compiler does not juggle the order of the s_last |
1290 |
+ * ring index and the decrementing of s_reserved_used. |
1291 |
+ */ |
1292 |
+-static inline void rvt_qp_wqe_unreserve( |
1293 |
+- struct rvt_qp *qp, |
1294 |
+- struct rvt_swqe *wqe) |
1295 |
++static inline void rvt_qp_wqe_unreserve(struct rvt_qp *qp, int flags) |
1296 |
+ { |
1297 |
+- if (unlikely(wqe->wr.send_flags & RVT_SEND_RESERVE_USED)) { |
1298 |
++ if (unlikely(flags & RVT_SEND_RESERVE_USED)) { |
1299 |
+ atomic_dec(&qp->s_reserved_used); |
1300 |
+ /* insure no compiler re-order up to s_last change */ |
1301 |
+ smp_mb__after_atomic(); |
1302 |
+@@ -565,42 +563,6 @@ static inline void rvt_qp_wqe_unreserve( |
1303 |
+ |
1304 |
+ extern const enum ib_wc_opcode ib_rvt_wc_opcode[]; |
1305 |
+ |
1306 |
+-/** |
1307 |
+- * rvt_qp_swqe_complete() - insert send completion |
1308 |
+- * @qp - the qp |
1309 |
+- * @wqe - the send wqe |
1310 |
+- * @status - completion status |
1311 |
+- * |
1312 |
+- * Insert a send completion into the completion |
1313 |
+- * queue if the qp indicates it should be done. |
1314 |
+- * |
1315 |
+- * See IBTA 10.7.3.1 for info on completion |
1316 |
+- * control. |
1317 |
+- */ |
1318 |
+-static inline void rvt_qp_swqe_complete( |
1319 |
+- struct rvt_qp *qp, |
1320 |
+- struct rvt_swqe *wqe, |
1321 |
+- enum ib_wc_opcode opcode, |
1322 |
+- enum ib_wc_status status) |
1323 |
+-{ |
1324 |
+- if (unlikely(wqe->wr.send_flags & RVT_SEND_RESERVE_USED)) |
1325 |
+- return; |
1326 |
+- if (!(qp->s_flags & RVT_S_SIGNAL_REQ_WR) || |
1327 |
+- (wqe->wr.send_flags & IB_SEND_SIGNALED) || |
1328 |
+- status != IB_WC_SUCCESS) { |
1329 |
+- struct ib_wc wc; |
1330 |
+- |
1331 |
+- memset(&wc, 0, sizeof(wc)); |
1332 |
+- wc.wr_id = wqe->wr.wr_id; |
1333 |
+- wc.status = status; |
1334 |
+- wc.opcode = opcode; |
1335 |
+- wc.qp = &qp->ibqp; |
1336 |
+- wc.byte_len = wqe->length; |
1337 |
+- rvt_cq_enter(ibcq_to_rvtcq(qp->ibqp.send_cq), &wc, |
1338 |
+- status != IB_WC_SUCCESS); |
1339 |
+- } |
1340 |
+-} |
1341 |
+- |
1342 |
+ /* |
1343 |
+ * Compare the lower 24 bits of the msn values. |
1344 |
+ * Returns an integer <, ==, or > than zero. |
1345 |
+@@ -737,6 +699,79 @@ static inline void rvt_put_qp_swqe(struct rvt_qp *qp, struct rvt_swqe *wqe) |
1346 |
+ atomic_dec(&ibah_to_rvtah(wqe->ud_wr.ah)->refcount); |
1347 |
+ } |
1348 |
+ |
1349 |
++/** |
1350 |
++ * rvt_qp_sqwe_incr - increment ring index |
1351 |
++ * @qp: the qp |
1352 |
++ * @val: the starting value |
1353 |
++ * |
1354 |
++ * Return: the new value wrapping as appropriate |
1355 |
++ */ |
1356 |
++static inline u32 |
1357 |
++rvt_qp_swqe_incr(struct rvt_qp *qp, u32 val) |
1358 |
++{ |
1359 |
++ if (++val >= qp->s_size) |
1360 |
++ val = 0; |
1361 |
++ return val; |
1362 |
++} |
1363 |
++ |
1364 |
++/** |
1365 |
++ * rvt_qp_complete_swqe - insert send completion |
1366 |
++ * @qp - the qp |
1367 |
++ * @wqe - the send wqe |
1368 |
++ * @opcode - wc operation (driver dependent) |
1369 |
++ * @status - completion status |
1370 |
++ * |
1371 |
++ * Update the s_last information, and then insert a send |
1372 |
++ * completion into the completion |
1373 |
++ * queue if the qp indicates it should be done. |
1374 |
++ * |
1375 |
++ * See IBTA 10.7.3.1 for info on completion |
1376 |
++ * control. |
1377 |
++ * |
1378 |
++ * Return: new last |
1379 |
++ */ |
1380 |
++static inline u32 |
1381 |
++rvt_qp_complete_swqe(struct rvt_qp *qp, |
1382 |
++ struct rvt_swqe *wqe, |
1383 |
++ enum ib_wc_opcode opcode, |
1384 |
++ enum ib_wc_status status) |
1385 |
++{ |
1386 |
++ bool need_completion; |
1387 |
++ u64 wr_id; |
1388 |
++ u32 byte_len, last; |
1389 |
++ int flags = wqe->wr.send_flags; |
1390 |
++ |
1391 |
++ rvt_qp_wqe_unreserve(qp, flags); |
1392 |
++ rvt_put_qp_swqe(qp, wqe); |
1393 |
++ |
1394 |
++ need_completion = |
1395 |
++ !(flags & RVT_SEND_RESERVE_USED) && |
1396 |
++ (!(qp->s_flags & RVT_S_SIGNAL_REQ_WR) || |
1397 |
++ (flags & IB_SEND_SIGNALED) || |
1398 |
++ status != IB_WC_SUCCESS); |
1399 |
++ if (need_completion) { |
1400 |
++ wr_id = wqe->wr.wr_id; |
1401 |
++ byte_len = wqe->length; |
1402 |
++ /* above fields required before writing s_last */ |
1403 |
++ } |
1404 |
++ last = rvt_qp_swqe_incr(qp, qp->s_last); |
1405 |
++ /* see rvt_qp_is_avail() */ |
1406 |
++ smp_store_release(&qp->s_last, last); |
1407 |
++ if (need_completion) { |
1408 |
++ struct ib_wc w = { |
1409 |
++ .wr_id = wr_id, |
1410 |
++ .status = status, |
1411 |
++ .opcode = opcode, |
1412 |
++ .qp = &qp->ibqp, |
1413 |
++ .byte_len = byte_len, |
1414 |
++ }; |
1415 |
++ |
1416 |
++ rvt_cq_enter(ibcq_to_rvtcq(qp->ibqp.send_cq), &w, |
1417 |
++ status != IB_WC_SUCCESS); |
1418 |
++ } |
1419 |
++ return last; |
1420 |
++} |
1421 |
++ |
1422 |
+ extern const int ib_rvt_state_ops[]; |
1423 |
+ |
1424 |
+ struct rvt_dev_info; |
1425 |
+diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c |
1426 |
+index 9ecf1e4c624b..b07672e793a8 100644 |
1427 |
+--- a/kernel/sched/fair.c |
1428 |
++++ b/kernel/sched/fair.c |
1429 |
+@@ -4449,6 +4449,8 @@ static void __account_cfs_rq_runtime(struct cfs_rq *cfs_rq, u64 delta_exec) |
1430 |
+ if (likely(cfs_rq->runtime_remaining > 0)) |
1431 |
+ return; |
1432 |
+ |
1433 |
++ if (cfs_rq->throttled) |
1434 |
++ return; |
1435 |
+ /* |
1436 |
+ * if we're unable to extend our runtime we resched so that the active |
1437 |
+ * hierarchy can be throttled |
1438 |
+@@ -4652,6 +4654,9 @@ static u64 distribute_cfs_runtime(struct cfs_bandwidth *cfs_b, |
1439 |
+ if (!cfs_rq_throttled(cfs_rq)) |
1440 |
+ goto next; |
1441 |
+ |
1442 |
++ /* By the above check, this should never be true */ |
1443 |
++ SCHED_WARN_ON(cfs_rq->runtime_remaining > 0); |
1444 |
++ |
1445 |
+ runtime = -cfs_rq->runtime_remaining + 1; |
1446 |
+ if (runtime > remaining) |
1447 |
+ runtime = remaining; |
1448 |
+diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c |
1449 |
+index 240ed70912d6..d78938e3e008 100644 |
1450 |
+--- a/net/batman-adv/bat_iv_ogm.c |
1451 |
++++ b/net/batman-adv/bat_iv_ogm.c |
1452 |
+@@ -277,17 +277,23 @@ static u8 batadv_hop_penalty(u8 tq, const struct batadv_priv *bat_priv) |
1453 |
+ * batadv_iv_ogm_aggr_packet() - checks if there is another OGM attached |
1454 |
+ * @buff_pos: current position in the skb |
1455 |
+ * @packet_len: total length of the skb |
1456 |
+- * @tvlv_len: tvlv length of the previously considered OGM |
1457 |
++ * @ogm_packet: potential OGM in buffer |
1458 |
+ * |
1459 |
+ * Return: true if there is enough space for another OGM, false otherwise. |
1460 |
+ */ |
1461 |
+-static bool batadv_iv_ogm_aggr_packet(int buff_pos, int packet_len, |
1462 |
+- __be16 tvlv_len) |
1463 |
++static bool |
1464 |
++batadv_iv_ogm_aggr_packet(int buff_pos, int packet_len, |
1465 |
++ const struct batadv_ogm_packet *ogm_packet) |
1466 |
+ { |
1467 |
+ int next_buff_pos = 0; |
1468 |
+ |
1469 |
+- next_buff_pos += buff_pos + BATADV_OGM_HLEN; |
1470 |
+- next_buff_pos += ntohs(tvlv_len); |
1471 |
++ /* check if there is enough space for the header */ |
1472 |
++ next_buff_pos += buff_pos + sizeof(*ogm_packet); |
1473 |
++ if (next_buff_pos > packet_len) |
1474 |
++ return false; |
1475 |
++ |
1476 |
++ /* check if there is enough space for the optional TVLV */ |
1477 |
++ next_buff_pos += ntohs(ogm_packet->tvlv_len); |
1478 |
+ |
1479 |
+ return (next_buff_pos <= packet_len) && |
1480 |
+ (next_buff_pos <= BATADV_MAX_AGGREGATION_BYTES); |
1481 |
+@@ -315,7 +321,7 @@ static void batadv_iv_ogm_send_to_if(struct batadv_forw_packet *forw_packet, |
1482 |
+ |
1483 |
+ /* adjust all flags and log packets */ |
1484 |
+ while (batadv_iv_ogm_aggr_packet(buff_pos, forw_packet->packet_len, |
1485 |
+- batadv_ogm_packet->tvlv_len)) { |
1486 |
++ batadv_ogm_packet)) { |
1487 |
+ /* we might have aggregated direct link packets with an |
1488 |
+ * ordinary base packet |
1489 |
+ */ |
1490 |
+@@ -1704,7 +1710,7 @@ static int batadv_iv_ogm_receive(struct sk_buff *skb, |
1491 |
+ |
1492 |
+ /* unpack the aggregated packets and process them one by one */ |
1493 |
+ while (batadv_iv_ogm_aggr_packet(ogm_offset, skb_headlen(skb), |
1494 |
+- ogm_packet->tvlv_len)) { |
1495 |
++ ogm_packet)) { |
1496 |
+ batadv_iv_ogm_process(skb, ogm_offset, if_incoming); |
1497 |
+ |
1498 |
+ ogm_offset += BATADV_OGM_HLEN; |
1499 |
+diff --git a/net/batman-adv/netlink.c b/net/batman-adv/netlink.c |
1500 |
+index a67720fad46c..fdbd9f4c976b 100644 |
1501 |
+--- a/net/batman-adv/netlink.c |
1502 |
++++ b/net/batman-adv/netlink.c |
1503 |
+@@ -164,7 +164,7 @@ batadv_netlink_get_ifindex(const struct nlmsghdr *nlh, int attrtype) |
1504 |
+ { |
1505 |
+ struct nlattr *attr = nlmsg_find_attr(nlh, GENL_HDRLEN, attrtype); |
1506 |
+ |
1507 |
+- return attr ? nla_get_u32(attr) : 0; |
1508 |
++ return (attr && nla_len(attr) == sizeof(u32)) ? nla_get_u32(attr) : 0; |
1509 |
+ } |
1510 |
+ |
1511 |
+ /** |
1512 |
+diff --git a/sound/pci/hda/hda_auto_parser.c b/sound/pci/hda/hda_auto_parser.c |
1513 |
+index 92390d457567..18e6546b4467 100644 |
1514 |
+--- a/sound/pci/hda/hda_auto_parser.c |
1515 |
++++ b/sound/pci/hda/hda_auto_parser.c |
1516 |
+@@ -824,6 +824,8 @@ static void apply_fixup(struct hda_codec *codec, int id, int action, int depth) |
1517 |
+ while (id >= 0) { |
1518 |
+ const struct hda_fixup *fix = codec->fixup_list + id; |
1519 |
+ |
1520 |
++ if (++depth > 10) |
1521 |
++ break; |
1522 |
+ if (fix->chained_before) |
1523 |
+ apply_fixup(codec, fix->chain_id, action, depth + 1); |
1524 |
+ |
1525 |
+@@ -863,8 +865,6 @@ static void apply_fixup(struct hda_codec *codec, int id, int action, int depth) |
1526 |
+ } |
1527 |
+ if (!fix->chained || fix->chained_before) |
1528 |
+ break; |
1529 |
+- if (++depth > 10) |
1530 |
+- break; |
1531 |
+ id = fix->chain_id; |
1532 |
+ } |
1533 |
+ } |
1534 |
+diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c |
1535 |
+index 5bf24fb819d2..10d502328b76 100644 |
1536 |
+--- a/sound/pci/hda/hda_generic.c |
1537 |
++++ b/sound/pci/hda/hda_generic.c |
1538 |
+@@ -6009,7 +6009,8 @@ int snd_hda_gen_init(struct hda_codec *codec) |
1539 |
+ if (spec->init_hook) |
1540 |
+ spec->init_hook(codec); |
1541 |
+ |
1542 |
+- snd_hda_apply_verbs(codec); |
1543 |
++ if (!spec->skip_verbs) |
1544 |
++ snd_hda_apply_verbs(codec); |
1545 |
+ |
1546 |
+ init_multi_out(codec); |
1547 |
+ init_extra_out(codec); |
1548 |
+diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h |
1549 |
+index 5f199dcb0d18..fb9f1a90238b 100644 |
1550 |
+--- a/sound/pci/hda/hda_generic.h |
1551 |
++++ b/sound/pci/hda/hda_generic.h |
1552 |
+@@ -243,6 +243,7 @@ struct hda_gen_spec { |
1553 |
+ unsigned int indep_hp_enabled:1; /* independent HP enabled */ |
1554 |
+ unsigned int have_aamix_ctl:1; |
1555 |
+ unsigned int hp_mic_jack_modes:1; |
1556 |
++ unsigned int skip_verbs:1; /* don't apply verbs at snd_hda_gen_init() */ |
1557 |
+ |
1558 |
+ /* additional mute flags (only effective with auto_mute_via_amp=1) */ |
1559 |
+ u64 mute_bits; |
1560 |
+diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c |
1561 |
+index e333b3e30e31..c1ddfd2fac52 100644 |
1562 |
+--- a/sound/pci/hda/patch_realtek.c |
1563 |
++++ b/sound/pci/hda/patch_realtek.c |
1564 |
+@@ -837,9 +837,11 @@ static int alc_init(struct hda_codec *codec) |
1565 |
+ if (spec->init_hook) |
1566 |
+ spec->init_hook(codec); |
1567 |
+ |
1568 |
++ spec->gen.skip_verbs = 1; /* applied in below */ |
1569 |
+ snd_hda_gen_init(codec); |
1570 |
+ alc_fix_pll(codec); |
1571 |
+ alc_auto_init_amp(codec, spec->init_amp); |
1572 |
++ snd_hda_apply_verbs(codec); /* apply verbs here after own init */ |
1573 |
+ |
1574 |
+ snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_INIT); |
1575 |
+ |
1576 |
+@@ -5797,6 +5799,7 @@ enum { |
1577 |
+ ALC286_FIXUP_ACER_AIO_HEADSET_MIC, |
1578 |
+ ALC256_FIXUP_ASUS_MIC_NO_PRESENCE, |
1579 |
+ ALC299_FIXUP_PREDATOR_SPK, |
1580 |
++ ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC, |
1581 |
+ }; |
1582 |
+ |
1583 |
+ static const struct hda_fixup alc269_fixups[] = { |
1584 |
+@@ -6837,6 +6840,16 @@ static const struct hda_fixup alc269_fixups[] = { |
1585 |
+ { } |
1586 |
+ } |
1587 |
+ }, |
1588 |
++ [ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC] = { |
1589 |
++ .type = HDA_FIXUP_PINS, |
1590 |
++ .v.pins = (const struct hda_pintbl[]) { |
1591 |
++ { 0x14, 0x411111f0 }, /* disable confusing internal speaker */ |
1592 |
++ { 0x19, 0x04a11150 }, /* use as headset mic, without its own jack detect */ |
1593 |
++ { } |
1594 |
++ }, |
1595 |
++ .chained = true, |
1596 |
++ .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC |
1597 |
++ }, |
1598 |
+ }; |
1599 |
+ |
1600 |
+ static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
1601 |
+@@ -6979,6 +6992,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
1602 |
+ SND_PCI_QUIRK(0x103c, 0x82c0, "HP G3 mini premium", ALC221_FIXUP_HP_MIC_NO_PRESENCE), |
1603 |
+ SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3), |
1604 |
+ SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3), |
1605 |
++ SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3), |
1606 |
+ SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC), |
1607 |
+ SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300), |
1608 |
+ SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
1609 |
+@@ -6995,6 +7009,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
1610 |
+ SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK), |
1611 |
+ SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A), |
1612 |
+ SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), |
1613 |
++ SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC), |
1614 |
+ SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), |
1615 |
+ SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC), |
1616 |
+ SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC), |
1617 |
+@@ -7072,6 +7087,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
1618 |
+ SND_PCI_QUIRK(0x17aa, 0x312a, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), |
1619 |
+ SND_PCI_QUIRK(0x17aa, 0x312f, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), |
1620 |
+ SND_PCI_QUIRK(0x17aa, 0x313c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), |
1621 |
++ SND_PCI_QUIRK(0x17aa, 0x3151, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), |
1622 |
+ SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI), |
1623 |
+ SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC), |
1624 |
+ SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI), |
1625 |
+@@ -8946,6 +8962,7 @@ static int patch_alc680(struct hda_codec *codec) |
1626 |
+ static const struct hda_device_id snd_hda_id_realtek[] = { |
1627 |
+ HDA_CODEC_ENTRY(0x10ec0215, "ALC215", patch_alc269), |
1628 |
+ HDA_CODEC_ENTRY(0x10ec0221, "ALC221", patch_alc269), |
1629 |
++ HDA_CODEC_ENTRY(0x10ec0222, "ALC222", patch_alc269), |
1630 |
+ HDA_CODEC_ENTRY(0x10ec0225, "ALC225", patch_alc269), |
1631 |
+ HDA_CODEC_ENTRY(0x10ec0231, "ALC231", patch_alc269), |
1632 |
+ HDA_CODEC_ENTRY(0x10ec0233, "ALC233", patch_alc269), |