Magellan Linux

Contents of /trunk/kernel-alx/patches-5.4/0139-5.4.40-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3520 - (show annotations) (download)
Mon May 11 14:36:45 2020 UTC (3 years, 10 months ago) by niro
File size: 51766 byte(s)
-linux-5.4.40
1 diff --git a/Makefile b/Makefile
2 index ff2b90ddc9bc..6d4fca82529a 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 = 39
10 +SUBLEVEL = 40
11 EXTRAVERSION =
12 NAME = Kleptomaniac Octopus
13
14 diff --git a/arch/hexagon/include/asm/io.h b/arch/hexagon/include/asm/io.h
15 index ba1a444d55b3..68a68147504d 100644
16 --- a/arch/hexagon/include/asm/io.h
17 +++ b/arch/hexagon/include/asm/io.h
18 @@ -171,16 +171,10 @@ static inline void writel(u32 data, volatile void __iomem *addr)
19 #define writew_relaxed __raw_writew
20 #define writel_relaxed __raw_writel
21
22 -/*
23 - * Need an mtype somewhere in here, for cache type deals?
24 - * This is probably too long for an inline.
25 - */
26 -void __iomem *ioremap_nocache(unsigned long phys_addr, unsigned long size);
27 +void __iomem *ioremap(unsigned long phys_addr, unsigned long size);
28 +#define ioremap_nocache ioremap
29 +#define ioremap_uc(X, Y) ioremap((X), (Y))
30
31 -static inline void __iomem *ioremap(unsigned long phys_addr, unsigned long size)
32 -{
33 - return ioremap_nocache(phys_addr, size);
34 -}
35
36 static inline void iounmap(volatile void __iomem *addr)
37 {
38 diff --git a/arch/hexagon/kernel/hexagon_ksyms.c b/arch/hexagon/kernel/hexagon_ksyms.c
39 index cf8974beb500..b3dbb472572e 100644
40 --- a/arch/hexagon/kernel/hexagon_ksyms.c
41 +++ b/arch/hexagon/kernel/hexagon_ksyms.c
42 @@ -20,7 +20,7 @@ EXPORT_SYMBOL(__vmgetie);
43 EXPORT_SYMBOL(__vmsetie);
44 EXPORT_SYMBOL(__vmyield);
45 EXPORT_SYMBOL(empty_zero_page);
46 -EXPORT_SYMBOL(ioremap_nocache);
47 +EXPORT_SYMBOL(ioremap);
48 EXPORT_SYMBOL(memcpy);
49 EXPORT_SYMBOL(memset);
50
51 diff --git a/arch/hexagon/mm/ioremap.c b/arch/hexagon/mm/ioremap.c
52 index 77d8e1e69e9b..b103d83b5fbb 100644
53 --- a/arch/hexagon/mm/ioremap.c
54 +++ b/arch/hexagon/mm/ioremap.c
55 @@ -9,7 +9,7 @@
56 #include <linux/vmalloc.h>
57 #include <linux/mm.h>
58
59 -void __iomem *ioremap_nocache(unsigned long phys_addr, unsigned long size)
60 +void __iomem *ioremap(unsigned long phys_addr, unsigned long size)
61 {
62 unsigned long last_addr, addr;
63 unsigned long offset = phys_addr & ~PAGE_MASK;
64 diff --git a/arch/x86/kvm/vmx/ops.h b/arch/x86/kvm/vmx/ops.h
65 index 09b0937d56b1..19717d0a1100 100644
66 --- a/arch/x86/kvm/vmx/ops.h
67 +++ b/arch/x86/kvm/vmx/ops.h
68 @@ -12,6 +12,7 @@
69
70 #define __ex(x) __kvm_handle_fault_on_reboot(x)
71
72 +asmlinkage void vmread_error(unsigned long field, bool fault);
73 __attribute__((regparm(0))) void vmread_error_trampoline(unsigned long field,
74 bool fault);
75 void vmwrite_error(unsigned long field, unsigned long value);
76 diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
77 index ce1d9048a36d..edad89e58c58 100644
78 --- a/drivers/acpi/sleep.c
79 +++ b/drivers/acpi/sleep.c
80 @@ -979,10 +979,7 @@ static int acpi_s2idle_prepare_late(void)
81
82 static void acpi_s2idle_sync(void)
83 {
84 - /*
85 - * The EC driver uses the system workqueue and an additional special
86 - * one, so those need to be flushed too.
87 - */
88 + /* The EC driver uses special workqueues that need to be flushed. */
89 acpi_ec_flush_work();
90 acpi_os_wait_events_complete(); /* synchronize Notify handling */
91 }
92 diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c
93 index d5b4905e2adb..77cc138d138c 100644
94 --- a/drivers/base/swnode.c
95 +++ b/drivers/base/swnode.c
96 @@ -679,6 +679,13 @@ static void software_node_release(struct kobject *kobj)
97 {
98 struct swnode *swnode = kobj_to_swnode(kobj);
99
100 + if (swnode->parent) {
101 + ida_simple_remove(&swnode->parent->child_ids, swnode->id);
102 + list_del(&swnode->entry);
103 + } else {
104 + ida_simple_remove(&swnode_root_ids, swnode->id);
105 + }
106 +
107 if (swnode->allocated) {
108 property_entries_free(swnode->node->properties);
109 kfree(swnode->node);
110 @@ -844,13 +851,6 @@ void fwnode_remove_software_node(struct fwnode_handle *fwnode)
111 if (!swnode)
112 return;
113
114 - if (swnode->parent) {
115 - ida_simple_remove(&swnode->parent->child_ids, swnode->id);
116 - list_del(&swnode->entry);
117 - } else {
118 - ida_simple_remove(&swnode_root_ids, swnode->id);
119 - }
120 -
121 kobject_put(&swnode->kobj);
122 }
123 EXPORT_SYMBOL_GPL(fwnode_remove_software_node);
124 diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
125 index ff81b7cdab71..dce45f7a497d 100644
126 --- a/drivers/devfreq/devfreq.c
127 +++ b/drivers/devfreq/devfreq.c
128 @@ -902,7 +902,9 @@ int devfreq_suspend_device(struct devfreq *devfreq)
129 }
130
131 if (devfreq->suspend_freq) {
132 + mutex_lock(&devfreq->lock);
133 ret = devfreq_set_target(devfreq, devfreq->suspend_freq, 0);
134 + mutex_unlock(&devfreq->lock);
135 if (ret)
136 return ret;
137 }
138 @@ -930,7 +932,9 @@ int devfreq_resume_device(struct devfreq *devfreq)
139 return 0;
140
141 if (devfreq->resume_freq) {
142 + mutex_lock(&devfreq->lock);
143 ret = devfreq_set_target(devfreq, devfreq->resume_freq, 0);
144 + mutex_unlock(&devfreq->lock);
145 if (ret)
146 return ret;
147 }
148 diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
149 index 03930313c263..51263b8d94b1 100644
150 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
151 +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
152 @@ -90,7 +90,8 @@ void amdgpu_pm_acpi_event_handler(struct amdgpu_device *adev)
153 adev->pm.ac_power = true;
154 else
155 adev->pm.ac_power = false;
156 - if (adev->powerplay.pp_funcs->enable_bapm)
157 + if (adev->powerplay.pp_funcs &&
158 + adev->powerplay.pp_funcs->enable_bapm)
159 amdgpu_dpm_enable_bapm(adev, adev->pm.ac_power);
160 mutex_unlock(&adev->pm.mutex);
161 }
162 diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
163 index 3aedc724241e..5bf12a446e95 100644
164 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
165 +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
166 @@ -2768,15 +2768,6 @@ void core_link_enable_stream(
167 CONTROLLER_DP_TEST_PATTERN_VIDEOMODE,
168 COLOR_DEPTH_UNDEFINED);
169
170 - /* This second call is needed to reconfigure the DIG
171 - * as a workaround for the incorrect value being applied
172 - * from transmitter control.
173 - */
174 - if (!dc_is_virtual_signal(pipe_ctx->stream->signal))
175 - stream->link->link_enc->funcs->setup(
176 - stream->link->link_enc,
177 - pipe_ctx->stream->signal);
178 -
179 #ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT
180 if (pipe_ctx->stream->timing.flags.DSC) {
181 if (dc_is_dp_signal(pipe_ctx->stream->signal) ||
182 diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c
183 index 77c14671866c..719597c5d27d 100644
184 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c
185 +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c
186 @@ -984,6 +984,32 @@ static int init_thermal_controller(
187 struct pp_hwmgr *hwmgr,
188 const ATOM_PPLIB_POWERPLAYTABLE *powerplay_table)
189 {
190 + hwmgr->thermal_controller.ucType =
191 + powerplay_table->sThermalController.ucType;
192 + hwmgr->thermal_controller.ucI2cLine =
193 + powerplay_table->sThermalController.ucI2cLine;
194 + hwmgr->thermal_controller.ucI2cAddress =
195 + powerplay_table->sThermalController.ucI2cAddress;
196 +
197 + hwmgr->thermal_controller.fanInfo.bNoFan =
198 + (0 != (powerplay_table->sThermalController.ucFanParameters &
199 + ATOM_PP_FANPARAMETERS_NOFAN));
200 +
201 + hwmgr->thermal_controller.fanInfo.ucTachometerPulsesPerRevolution =
202 + powerplay_table->sThermalController.ucFanParameters &
203 + ATOM_PP_FANPARAMETERS_TACHOMETER_PULSES_PER_REVOLUTION_MASK;
204 +
205 + hwmgr->thermal_controller.fanInfo.ulMinRPM
206 + = powerplay_table->sThermalController.ucFanMinRPM * 100UL;
207 + hwmgr->thermal_controller.fanInfo.ulMaxRPM
208 + = powerplay_table->sThermalController.ucFanMaxRPM * 100UL;
209 +
210 + set_hw_cap(hwmgr,
211 + ATOM_PP_THERMALCONTROLLER_NONE != hwmgr->thermal_controller.ucType,
212 + PHM_PlatformCaps_ThermalController);
213 +
214 + hwmgr->thermal_controller.use_hw_fan_control = 1;
215 +
216 return 0;
217 }
218
219 diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
220 index 22885dceaa17..1f26890a8da6 100644
221 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
222 +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
223 @@ -1635,8 +1635,7 @@ static ssize_t analogix_dpaux_transfer(struct drm_dp_aux *aux,
224 }
225
226 struct analogix_dp_device *
227 -analogix_dp_bind(struct device *dev, struct drm_device *drm_dev,
228 - struct analogix_dp_plat_data *plat_data)
229 +analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data)
230 {
231 struct platform_device *pdev = to_platform_device(dev);
232 struct analogix_dp_device *dp;
233 @@ -1739,22 +1738,30 @@ analogix_dp_bind(struct device *dev, struct drm_device *drm_dev,
234 irq_flags, "analogix-dp", dp);
235 if (ret) {
236 dev_err(&pdev->dev, "failed to request irq\n");
237 - goto err_disable_pm_runtime;
238 + return ERR_PTR(ret);
239 }
240 disable_irq(dp->irq);
241
242 + return dp;
243 +}
244 +EXPORT_SYMBOL_GPL(analogix_dp_probe);
245 +
246 +int analogix_dp_bind(struct analogix_dp_device *dp, struct drm_device *drm_dev)
247 +{
248 + int ret;
249 +
250 dp->drm_dev = drm_dev;
251 dp->encoder = dp->plat_data->encoder;
252
253 dp->aux.name = "DP-AUX";
254 dp->aux.transfer = analogix_dpaux_transfer;
255 - dp->aux.dev = &pdev->dev;
256 + dp->aux.dev = dp->dev;
257
258 ret = drm_dp_aux_register(&dp->aux);
259 if (ret)
260 - return ERR_PTR(ret);
261 + return ret;
262
263 - pm_runtime_enable(dev);
264 + pm_runtime_enable(dp->dev);
265
266 ret = analogix_dp_create_bridge(drm_dev, dp);
267 if (ret) {
268 @@ -1762,13 +1769,12 @@ analogix_dp_bind(struct device *dev, struct drm_device *drm_dev,
269 goto err_disable_pm_runtime;
270 }
271
272 - return dp;
273 + return 0;
274
275 err_disable_pm_runtime:
276 + pm_runtime_disable(dp->dev);
277
278 - pm_runtime_disable(dev);
279 -
280 - return ERR_PTR(ret);
281 + return ret;
282 }
283 EXPORT_SYMBOL_GPL(analogix_dp_bind);
284
285 @@ -1785,10 +1791,15 @@ void analogix_dp_unbind(struct analogix_dp_device *dp)
286
287 drm_dp_aux_unregister(&dp->aux);
288 pm_runtime_disable(dp->dev);
289 - clk_disable_unprepare(dp->clock);
290 }
291 EXPORT_SYMBOL_GPL(analogix_dp_unbind);
292
293 +void analogix_dp_remove(struct analogix_dp_device *dp)
294 +{
295 + clk_disable_unprepare(dp->clock);
296 +}
297 +EXPORT_SYMBOL_GPL(analogix_dp_remove);
298 +
299 #ifdef CONFIG_PM
300 int analogix_dp_suspend(struct analogix_dp_device *dp)
301 {
302 diff --git a/drivers/gpu/drm/exynos/exynos_dp.c b/drivers/gpu/drm/exynos/exynos_dp.c
303 index 3a0f0ba8c63a..e0cfae744afc 100644
304 --- a/drivers/gpu/drm/exynos/exynos_dp.c
305 +++ b/drivers/gpu/drm/exynos/exynos_dp.c
306 @@ -158,15 +158,8 @@ static int exynos_dp_bind(struct device *dev, struct device *master, void *data)
307 struct drm_device *drm_dev = data;
308 int ret;
309
310 - dp->dev = dev;
311 dp->drm_dev = drm_dev;
312
313 - dp->plat_data.dev_type = EXYNOS_DP;
314 - dp->plat_data.power_on_start = exynos_dp_poweron;
315 - dp->plat_data.power_off = exynos_dp_poweroff;
316 - dp->plat_data.attach = exynos_dp_bridge_attach;
317 - dp->plat_data.get_modes = exynos_dp_get_modes;
318 -
319 if (!dp->plat_data.panel && !dp->ptn_bridge) {
320 ret = exynos_dp_dt_parse_panel(dp);
321 if (ret)
322 @@ -184,13 +177,11 @@ static int exynos_dp_bind(struct device *dev, struct device *master, void *data)
323
324 dp->plat_data.encoder = encoder;
325
326 - dp->adp = analogix_dp_bind(dev, dp->drm_dev, &dp->plat_data);
327 - if (IS_ERR(dp->adp)) {
328 + ret = analogix_dp_bind(dp->adp, dp->drm_dev);
329 + if (ret)
330 dp->encoder.funcs->destroy(&dp->encoder);
331 - return PTR_ERR(dp->adp);
332 - }
333
334 - return 0;
335 + return ret;
336 }
337
338 static void exynos_dp_unbind(struct device *dev, struct device *master,
339 @@ -221,6 +212,7 @@ static int exynos_dp_probe(struct platform_device *pdev)
340 if (!dp)
341 return -ENOMEM;
342
343 + dp->dev = dev;
344 /*
345 * We just use the drvdata until driver run into component
346 * add function, and then we would set drvdata to null, so
347 @@ -246,16 +238,29 @@ static int exynos_dp_probe(struct platform_device *pdev)
348
349 /* The remote port can be either a panel or a bridge */
350 dp->plat_data.panel = panel;
351 + dp->plat_data.dev_type = EXYNOS_DP;
352 + dp->plat_data.power_on_start = exynos_dp_poweron;
353 + dp->plat_data.power_off = exynos_dp_poweroff;
354 + dp->plat_data.attach = exynos_dp_bridge_attach;
355 + dp->plat_data.get_modes = exynos_dp_get_modes;
356 dp->plat_data.skip_connector = !!bridge;
357 +
358 dp->ptn_bridge = bridge;
359
360 out:
361 + dp->adp = analogix_dp_probe(dev, &dp->plat_data);
362 + if (IS_ERR(dp->adp))
363 + return PTR_ERR(dp->adp);
364 +
365 return component_add(&pdev->dev, &exynos_dp_ops);
366 }
367
368 static int exynos_dp_remove(struct platform_device *pdev)
369 {
370 + struct exynos_dp_device *dp = platform_get_drvdata(pdev);
371 +
372 component_del(&pdev->dev, &exynos_dp_ops);
373 + analogix_dp_remove(dp->adp);
374
375 return 0;
376 }
377 diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
378 index 272503615378..ae31836aa4ee 100644
379 --- a/drivers/gpu/drm/i915/display/intel_display.c
380 +++ b/drivers/gpu/drm/i915/display/intel_display.c
381 @@ -16860,8 +16860,11 @@ get_encoder_power_domains(struct drm_i915_private *dev_priv)
382
383 static void intel_early_display_was(struct drm_i915_private *dev_priv)
384 {
385 - /* Display WA #1185 WaDisableDARBFClkGating:cnl,glk */
386 - if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv))
387 + /*
388 + * Display WA #1185 WaDisableDARBFClkGating:cnl,glk,icl,ehl,tgl
389 + * Also known as Wa_14010480278.
390 + */
391 + if (IS_GEN_RANGE(dev_priv, 10, 12) || IS_GEMINILAKE(dev_priv))
392 I915_WRITE(GEN9_CLKGATE_DIS_0, I915_READ(GEN9_CLKGATE_DIS_0) |
393 DARBF_GATING_DIS);
394
395 diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
396 index f38f5e113c6b..ce98c08aa8b4 100644
397 --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
398 +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
399 @@ -325,15 +325,9 @@ static int rockchip_dp_bind(struct device *dev, struct device *master,
400 void *data)
401 {
402 struct rockchip_dp_device *dp = dev_get_drvdata(dev);
403 - const struct rockchip_dp_chip_data *dp_data;
404 struct drm_device *drm_dev = data;
405 int ret;
406
407 - dp_data = of_device_get_match_data(dev);
408 - if (!dp_data)
409 - return -ENODEV;
410 -
411 - dp->data = dp_data;
412 dp->drm_dev = drm_dev;
413
414 ret = rockchip_dp_drm_create_encoder(dp);
415 @@ -344,16 +338,9 @@ static int rockchip_dp_bind(struct device *dev, struct device *master,
416
417 dp->plat_data.encoder = &dp->encoder;
418
419 - dp->plat_data.dev_type = dp->data->chip_type;
420 - dp->plat_data.power_on_start = rockchip_dp_poweron_start;
421 - dp->plat_data.power_off = rockchip_dp_powerdown;
422 - dp->plat_data.get_modes = rockchip_dp_get_modes;
423 -
424 - dp->adp = analogix_dp_bind(dev, dp->drm_dev, &dp->plat_data);
425 - if (IS_ERR(dp->adp)) {
426 - ret = PTR_ERR(dp->adp);
427 + ret = analogix_dp_bind(dp->adp, drm_dev);
428 + if (ret)
429 goto err_cleanup_encoder;
430 - }
431
432 return 0;
433 err_cleanup_encoder:
434 @@ -368,8 +355,6 @@ static void rockchip_dp_unbind(struct device *dev, struct device *master,
435
436 analogix_dp_unbind(dp->adp);
437 dp->encoder.funcs->destroy(&dp->encoder);
438 -
439 - dp->adp = ERR_PTR(-ENODEV);
440 }
441
442 static const struct component_ops rockchip_dp_component_ops = {
443 @@ -380,10 +365,15 @@ static const struct component_ops rockchip_dp_component_ops = {
444 static int rockchip_dp_probe(struct platform_device *pdev)
445 {
446 struct device *dev = &pdev->dev;
447 + const struct rockchip_dp_chip_data *dp_data;
448 struct drm_panel *panel = NULL;
449 struct rockchip_dp_device *dp;
450 int ret;
451
452 + dp_data = of_device_get_match_data(dev);
453 + if (!dp_data)
454 + return -ENODEV;
455 +
456 ret = drm_of_find_panel_or_bridge(dev->of_node, 1, 0, &panel, NULL);
457 if (ret < 0)
458 return ret;
459 @@ -394,7 +384,12 @@ static int rockchip_dp_probe(struct platform_device *pdev)
460
461 dp->dev = dev;
462 dp->adp = ERR_PTR(-ENODEV);
463 + dp->data = dp_data;
464 dp->plat_data.panel = panel;
465 + dp->plat_data.dev_type = dp->data->chip_type;
466 + dp->plat_data.power_on_start = rockchip_dp_poweron_start;
467 + dp->plat_data.power_off = rockchip_dp_powerdown;
468 + dp->plat_data.get_modes = rockchip_dp_get_modes;
469
470 ret = rockchip_dp_of_probe(dp);
471 if (ret < 0)
472 @@ -402,12 +397,19 @@ static int rockchip_dp_probe(struct platform_device *pdev)
473
474 platform_set_drvdata(pdev, dp);
475
476 + dp->adp = analogix_dp_probe(dev, &dp->plat_data);
477 + if (IS_ERR(dp->adp))
478 + return PTR_ERR(dp->adp);
479 +
480 return component_add(dev, &rockchip_dp_component_ops);
481 }
482
483 static int rockchip_dp_remove(struct platform_device *pdev)
484 {
485 + struct rockchip_dp_device *dp = platform_get_drvdata(pdev);
486 +
487 component_del(&pdev->dev, &rockchip_dp_component_ops);
488 + analogix_dp_remove(dp->adp);
489
490 return 0;
491 }
492 diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c
493 index bfe4ff337581..b0f0781a6b9c 100644
494 --- a/drivers/mfd/intel-lpss.c
495 +++ b/drivers/mfd/intel-lpss.c
496 @@ -384,7 +384,7 @@ int intel_lpss_probe(struct device *dev,
497 if (!lpss)
498 return -ENOMEM;
499
500 - lpss->priv = devm_ioremap(dev, info->mem->start + LPSS_PRIV_OFFSET,
501 + lpss->priv = devm_ioremap_uc(dev, info->mem->start + LPSS_PRIV_OFFSET,
502 LPSS_PRIV_SIZE);
503 if (!lpss->priv)
504 return -ENOMEM;
505 diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
506 index ad86a186ddc5..4dfdb5a58025 100644
507 --- a/drivers/net/ethernet/broadcom/bcmsysport.c
508 +++ b/drivers/net/ethernet/broadcom/bcmsysport.c
509 @@ -666,7 +666,8 @@ static struct sk_buff *bcm_sysport_rx_refill(struct bcm_sysport_priv *priv,
510 dma_addr_t mapping;
511
512 /* Allocate a new SKB for a new packet */
513 - skb = netdev_alloc_skb(priv->netdev, RX_BUF_LENGTH);
514 + skb = __netdev_alloc_skb(priv->netdev, RX_BUF_LENGTH,
515 + GFP_ATOMIC | __GFP_NOWARN);
516 if (!skb) {
517 priv->mib.alloc_rx_buff_failed++;
518 netif_err(priv, rx_err, ndev, "SKB alloc failed\n");
519 diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
520 index ff09ee777b2b..6f01f4e03cef 100644
521 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
522 +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
523 @@ -1697,7 +1697,8 @@ static struct sk_buff *bcmgenet_rx_refill(struct bcmgenet_priv *priv,
524 dma_addr_t mapping;
525
526 /* Allocate a new Rx skb */
527 - skb = netdev_alloc_skb(priv->dev, priv->rx_buf_len + SKB_ALIGNMENT);
528 + skb = __netdev_alloc_skb(priv->dev, priv->rx_buf_len + SKB_ALIGNMENT,
529 + GFP_ATOMIC | __GFP_NOWARN);
530 if (!skb) {
531 priv->mib.alloc_rx_buff_failed++;
532 netif_err(priv, rx_err, priv->dev,
533 diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
534 index fa32cd5b418e..70d41783329d 100644
535 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
536 +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
537 @@ -291,16 +291,19 @@ static int socfpga_gen5_set_phy_mode(struct socfpga_dwmac *dwmac)
538 phymode == PHY_INTERFACE_MODE_MII ||
539 phymode == PHY_INTERFACE_MODE_GMII ||
540 phymode == PHY_INTERFACE_MODE_SGMII) {
541 - ctrl |= SYSMGR_EMACGRP_CTRL_PTP_REF_CLK_MASK << (reg_shift / 2);
542 regmap_read(sys_mgr_base_addr, SYSMGR_FPGAGRP_MODULE_REG,
543 &module);
544 module |= (SYSMGR_FPGAGRP_MODULE_EMAC << (reg_shift / 2));
545 regmap_write(sys_mgr_base_addr, SYSMGR_FPGAGRP_MODULE_REG,
546 module);
547 - } else {
548 - ctrl &= ~(SYSMGR_EMACGRP_CTRL_PTP_REF_CLK_MASK << (reg_shift / 2));
549 }
550
551 + if (dwmac->f2h_ptp_ref_clk)
552 + ctrl |= SYSMGR_EMACGRP_CTRL_PTP_REF_CLK_MASK << (reg_shift / 2);
553 + else
554 + ctrl &= ~(SYSMGR_EMACGRP_CTRL_PTP_REF_CLK_MASK <<
555 + (reg_shift / 2));
556 +
557 regmap_write(sys_mgr_base_addr, reg_offset, ctrl);
558
559 /* Deassert reset for the phy configuration to be sampled by
560 diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
561 index 020159622559..e5d9007c8090 100644
562 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
563 +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
564 @@ -26,12 +26,16 @@ static void config_sub_second_increment(void __iomem *ioaddr,
565 unsigned long data;
566 u32 reg_value;
567
568 - /* For GMAC3.x, 4.x versions, convert the ptp_clock to nano second
569 - * formula = (1/ptp_clock) * 1000000000
570 - * where ptp_clock is 50MHz if fine method is used to update system
571 + /* For GMAC3.x, 4.x versions, in "fine adjustement mode" set sub-second
572 + * increment to twice the number of nanoseconds of a clock cycle.
573 + * The calculation of the default_addend value by the caller will set it
574 + * to mid-range = 2^31 when the remainder of this division is zero,
575 + * which will make the accumulator overflow once every 2 ptp_clock
576 + * cycles, adding twice the number of nanoseconds of a clock cycle :
577 + * 2000000000ULL / ptp_clock.
578 */
579 if (value & PTP_TCR_TSCFUPDT)
580 - data = (1000000000ULL / 50000000);
581 + data = (2000000000ULL / ptp_clock);
582 else
583 data = (1000000000ULL / ptp_clock);
584
585 diff --git a/drivers/net/wimax/i2400m/usb-fw.c b/drivers/net/wimax/i2400m/usb-fw.c
586 index 529ebca1e9e1..1f7709d24f35 100644
587 --- a/drivers/net/wimax/i2400m/usb-fw.c
588 +++ b/drivers/net/wimax/i2400m/usb-fw.c
589 @@ -354,6 +354,7 @@ out:
590 usb_autopm_put_interface(i2400mu->usb_iface);
591 d_fnend(8, dev, "(i2400m %p ack %p size %zu) = %ld\n",
592 i2400m, ack, ack_size, (long) result);
593 + usb_put_urb(&notif_urb);
594 return result;
595
596 error_exceeded:
597 diff --git a/drivers/platform/x86/gpd-pocket-fan.c b/drivers/platform/x86/gpd-pocket-fan.c
598 index b471b86c28fe..5b516e4c2bfb 100644
599 --- a/drivers/platform/x86/gpd-pocket-fan.c
600 +++ b/drivers/platform/x86/gpd-pocket-fan.c
601 @@ -128,7 +128,7 @@ static int gpd_pocket_fan_probe(struct platform_device *pdev)
602
603 for (i = 0; i < ARRAY_SIZE(temp_limits); i++) {
604 if (temp_limits[i] < 20000 || temp_limits[i] > 90000) {
605 - dev_err(&pdev->dev, "Invalid temp-limit %d (must be between 40000 and 70000)\n",
606 + dev_err(&pdev->dev, "Invalid temp-limit %d (must be between 20000 and 90000)\n",
607 temp_limits[i]);
608 temp_limits[0] = TEMP_LIMIT0_DEFAULT;
609 temp_limits[1] = TEMP_LIMIT1_DEFAULT;
610 diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
611 index 783d00131a2a..6ba065d5c4d9 100644
612 --- a/drivers/remoteproc/qcom_q6v5_mss.c
613 +++ b/drivers/remoteproc/qcom_q6v5_mss.c
614 @@ -1440,7 +1440,7 @@ static int q6v5_probe(struct platform_device *pdev)
615 ret = of_property_read_string_index(pdev->dev.of_node, "firmware-name",
616 1, &qproc->hexagon_mdt_image);
617 if (ret < 0 && ret != -EINVAL)
618 - return ret;
619 + goto free_rproc;
620
621 platform_set_drvdata(pdev, qproc);
622
623 diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
624 index 3ecc69c5b150..ce4acbf7fef9 100644
625 --- a/drivers/usb/dwc3/core.h
626 +++ b/drivers/usb/dwc3/core.h
627 @@ -310,6 +310,10 @@
628 #define DWC3_GTXFIFOSIZ_TXFDEF(n) ((n) & 0xffff)
629 #define DWC3_GTXFIFOSIZ_TXFSTADDR(n) ((n) & 0xffff0000)
630
631 +/* Global RX Fifo Size Register */
632 +#define DWC31_GRXFIFOSIZ_RXFDEP(n) ((n) & 0x7fff) /* DWC_usb31 only */
633 +#define DWC3_GRXFIFOSIZ_RXFDEP(n) ((n) & 0xffff)
634 +
635 /* Global Event Size Registers */
636 #define DWC3_GEVNTSIZ_INTMASK BIT(31)
637 #define DWC3_GEVNTSIZ_SIZE(n) ((n) & 0xffff)
638 diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
639 index 379f978db13d..3d30dec42c81 100644
640 --- a/drivers/usb/dwc3/gadget.c
641 +++ b/drivers/usb/dwc3/gadget.c
642 @@ -2220,7 +2220,6 @@ static int dwc3_gadget_init_in_endpoint(struct dwc3_ep *dep)
643 {
644 struct dwc3 *dwc = dep->dwc;
645 int mdwidth;
646 - int kbytes;
647 int size;
648
649 mdwidth = DWC3_MDWIDTH(dwc->hwparams.hwparams0);
650 @@ -2236,17 +2235,17 @@ static int dwc3_gadget_init_in_endpoint(struct dwc3_ep *dep)
651 /* FIFO Depth is in MDWDITH bytes. Multiply */
652 size *= mdwidth;
653
654 - kbytes = size / 1024;
655 - if (kbytes == 0)
656 - kbytes = 1;
657 -
658 /*
659 - * FIFO sizes account an extra MDWIDTH * (kbytes + 1) bytes for
660 - * internal overhead. We don't really know how these are used,
661 - * but documentation say it exists.
662 + * To meet performance requirement, a minimum TxFIFO size of 3x
663 + * MaxPacketSize is recommended for endpoints that support burst and a
664 + * minimum TxFIFO size of 2x MaxPacketSize for endpoints that don't
665 + * support burst. Use those numbers and we can calculate the max packet
666 + * limit as below.
667 */
668 - size -= mdwidth * (kbytes + 1);
669 - size /= kbytes;
670 + if (dwc->maximum_speed >= USB_SPEED_SUPER)
671 + size /= 3;
672 + else
673 + size /= 2;
674
675 usb_ep_set_maxpacket_limit(&dep->endpoint, size);
676
677 @@ -2264,8 +2263,39 @@ static int dwc3_gadget_init_in_endpoint(struct dwc3_ep *dep)
678 static int dwc3_gadget_init_out_endpoint(struct dwc3_ep *dep)
679 {
680 struct dwc3 *dwc = dep->dwc;
681 + int mdwidth;
682 + int size;
683 +
684 + mdwidth = DWC3_MDWIDTH(dwc->hwparams.hwparams0);
685 +
686 + /* MDWIDTH is represented in bits, convert to bytes */
687 + mdwidth /= 8;
688
689 - usb_ep_set_maxpacket_limit(&dep->endpoint, 1024);
690 + /* All OUT endpoints share a single RxFIFO space */
691 + size = dwc3_readl(dwc->regs, DWC3_GRXFIFOSIZ(0));
692 + if (dwc3_is_usb31(dwc))
693 + size = DWC31_GRXFIFOSIZ_RXFDEP(size);
694 + else
695 + size = DWC3_GRXFIFOSIZ_RXFDEP(size);
696 +
697 + /* FIFO depth is in MDWDITH bytes */
698 + size *= mdwidth;
699 +
700 + /*
701 + * To meet performance requirement, a minimum recommended RxFIFO size
702 + * is defined as follow:
703 + * RxFIFO size >= (3 x MaxPacketSize) +
704 + * (3 x 8 bytes setup packets size) + (16 bytes clock crossing margin)
705 + *
706 + * Then calculate the max packet limit as below.
707 + */
708 + size -= (3 * 8) + 16;
709 + if (size < 0)
710 + size = 0;
711 + else
712 + size /= 3;
713 +
714 + usb_ep_set_maxpacket_limit(&dep->endpoint, size);
715 dep->endpoint.max_streams = 15;
716 dep->endpoint.ops = &dwc3_gadget_ep_ops;
717 list_add_tail(&dep->endpoint.ep_list,
718 diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
719 index 88a5aa6624b4..6c089f655707 100644
720 --- a/drivers/vhost/vsock.c
721 +++ b/drivers/vhost/vsock.c
722 @@ -500,6 +500,11 @@ static int vhost_vsock_start(struct vhost_vsock *vsock)
723 mutex_unlock(&vq->mutex);
724 }
725
726 + /* Some packets may have been queued before the device was started,
727 + * let's kick the send worker to send them.
728 + */
729 + vhost_work_queue(&vsock->dev, &vsock->send_pkt_work);
730 +
731 mutex_unlock(&vsock->dev.mutex);
732 return 0;
733
734 diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
735 index bcda48c03882..721b2560caa7 100644
736 --- a/fs/cifs/connect.c
737 +++ b/fs/cifs/connect.c
738 @@ -371,8 +371,10 @@ static int reconn_set_ipaddr(struct TCP_Server_Info *server)
739 return rc;
740 }
741
742 + spin_lock(&cifs_tcp_ses_lock);
743 rc = cifs_convert_address((struct sockaddr *)&server->dstaddr, ipaddr,
744 strlen(ipaddr));
745 + spin_unlock(&cifs_tcp_ses_lock);
746 kfree(ipaddr);
747
748 return !rc ? -1 : 0;
749 @@ -3360,6 +3362,10 @@ cifs_find_tcon(struct cifs_ses *ses, struct smb_vol *volume_info)
750 spin_lock(&cifs_tcp_ses_lock);
751 list_for_each(tmp, &ses->tcon_list) {
752 tcon = list_entry(tmp, struct cifs_tcon, tcon_list);
753 +#ifdef CONFIG_CIFS_DFS_UPCALL
754 + if (tcon->dfs_path)
755 + continue;
756 +#endif
757 if (!match_tcon(tcon, volume_info))
758 continue;
759 ++tcon->tc_count;
760 diff --git a/include/drm/bridge/analogix_dp.h b/include/drm/bridge/analogix_dp.h
761 index 7aa2f93da49c..b0dcc07334a1 100644
762 --- a/include/drm/bridge/analogix_dp.h
763 +++ b/include/drm/bridge/analogix_dp.h
764 @@ -42,9 +42,10 @@ int analogix_dp_resume(struct analogix_dp_device *dp);
765 int analogix_dp_suspend(struct analogix_dp_device *dp);
766
767 struct analogix_dp_device *
768 -analogix_dp_bind(struct device *dev, struct drm_device *drm_dev,
769 - struct analogix_dp_plat_data *plat_data);
770 +analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data);
771 +int analogix_dp_bind(struct analogix_dp_device *dp, struct drm_device *drm_dev);
772 void analogix_dp_unbind(struct analogix_dp_device *dp);
773 +void analogix_dp_remove(struct analogix_dp_device *dp);
774
775 int analogix_dp_start_crc(struct drm_connector *connector);
776 int analogix_dp_stop_crc(struct drm_connector *connector);
777 diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
778 index 73c66a3a33ae..7f3486e32e5d 100644
779 --- a/include/linux/ieee80211.h
780 +++ b/include/linux/ieee80211.h
781 @@ -619,6 +619,15 @@ static inline bool ieee80211_is_qos_nullfunc(__le16 fc)
782 cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC);
783 }
784
785 +/**
786 + * ieee80211_is_any_nullfunc - check if frame is regular or QoS nullfunc frame
787 + * @fc: frame control bytes in little-endian byteorder
788 + */
789 +static inline bool ieee80211_is_any_nullfunc(__le16 fc)
790 +{
791 + return (ieee80211_is_nullfunc(fc) || ieee80211_is_qos_nullfunc(fc));
792 +}
793 +
794 /**
795 * ieee80211_is_bufferable_mmpdu - check if frame is bufferable MMPDU
796 * @fc: frame control field in little-endian byteorder
797 diff --git a/include/linux/io.h b/include/linux/io.h
798 index accac822336a..a59834bc0a11 100644
799 --- a/include/linux/io.h
800 +++ b/include/linux/io.h
801 @@ -64,6 +64,8 @@ static inline void devm_ioport_unmap(struct device *dev, void __iomem *addr)
802
803 void __iomem *devm_ioremap(struct device *dev, resource_size_t offset,
804 resource_size_t size);
805 +void __iomem *devm_ioremap_uc(struct device *dev, resource_size_t offset,
806 + resource_size_t size);
807 void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset,
808 resource_size_t size);
809 void __iomem *devm_ioremap_wc(struct device *dev, resource_size_t offset,
810 diff --git a/include/net/udp.h b/include/net/udp.h
811 index 8f163d674f07..fabf507bce5d 100644
812 --- a/include/net/udp.h
813 +++ b/include/net/udp.h
814 @@ -476,6 +476,13 @@ static inline struct sk_buff *udp_rcv_segment(struct sock *sk,
815 if (!inet_get_convert_csum(sk))
816 features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
817
818 + /* UDP segmentation expects packets of type CHECKSUM_PARTIAL or
819 + * CHECKSUM_NONE in __udp_gso_segment. UDP GRO indeed builds partial
820 + * packets in udp_gro_complete_segment. As does UDP GSO, verified by
821 + * udp_send_skb. But when those packets are looped in dev_loopback_xmit
822 + * their ip_summed is set to CHECKSUM_UNNECESSARY. Reset in this
823 + * specific case, where PARTIAL is both correct and required.
824 + */
825 if (skb->pkt_type == PACKET_LOOPBACK)
826 skb->ip_summed = CHECKSUM_PARTIAL;
827
828 diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
829 index 6495800fb92a..8107574e8af9 100644
830 --- a/kernel/trace/trace_events_hist.c
831 +++ b/kernel/trace/trace_events_hist.c
832 @@ -2466,6 +2466,9 @@ static void __destroy_hist_field(struct hist_field *hist_field)
833 kfree(hist_field->name);
834 kfree(hist_field->type);
835
836 + kfree(hist_field->system);
837 + kfree(hist_field->event_name);
838 +
839 kfree(hist_field);
840 }
841
842 @@ -3528,6 +3531,7 @@ static struct hist_field *create_var(struct hist_trigger_data *hist_data,
843 goto out;
844 }
845
846 + var->ref = 1;
847 var->flags = HIST_FIELD_FL_VAR;
848 var->var.idx = idx;
849 var->var.hist_data = var->hist_data = hist_data;
850 @@ -4157,6 +4161,9 @@ static void destroy_field_vars(struct hist_trigger_data *hist_data)
851
852 for (i = 0; i < hist_data->n_field_vars; i++)
853 destroy_field_var(hist_data->field_vars[i]);
854 +
855 + for (i = 0; i < hist_data->n_save_vars; i++)
856 + destroy_field_var(hist_data->save_vars[i]);
857 }
858
859 static void save_field_var(struct hist_trigger_data *hist_data,
860 diff --git a/lib/devres.c b/lib/devres.c
861 index 6a0e9bd6524a..17624d35e82d 100644
862 --- a/lib/devres.c
863 +++ b/lib/devres.c
864 @@ -9,6 +9,7 @@
865 enum devm_ioremap_type {
866 DEVM_IOREMAP = 0,
867 DEVM_IOREMAP_NC,
868 + DEVM_IOREMAP_UC,
869 DEVM_IOREMAP_WC,
870 };
871
872 @@ -39,6 +40,9 @@ static void __iomem *__devm_ioremap(struct device *dev, resource_size_t offset,
873 case DEVM_IOREMAP_NC:
874 addr = ioremap_nocache(offset, size);
875 break;
876 + case DEVM_IOREMAP_UC:
877 + addr = ioremap_uc(offset, size);
878 + break;
879 case DEVM_IOREMAP_WC:
880 addr = ioremap_wc(offset, size);
881 break;
882 @@ -68,6 +72,21 @@ void __iomem *devm_ioremap(struct device *dev, resource_size_t offset,
883 }
884 EXPORT_SYMBOL(devm_ioremap);
885
886 +/**
887 + * devm_ioremap_uc - Managed ioremap_uc()
888 + * @dev: Generic device to remap IO address for
889 + * @offset: Resource address to map
890 + * @size: Size of map
891 + *
892 + * Managed ioremap_uc(). Map is automatically unmapped on driver detach.
893 + */
894 +void __iomem *devm_ioremap_uc(struct device *dev, resource_size_t offset,
895 + resource_size_t size)
896 +{
897 + return __devm_ioremap(dev, offset, size, DEVM_IOREMAP_UC);
898 +}
899 +EXPORT_SYMBOL_GPL(devm_ioremap_uc);
900 +
901 /**
902 * devm_ioremap_nocache - Managed ioremap_nocache()
903 * @dev: Generic device to remap IO address for
904 diff --git a/lib/mpi/longlong.h b/lib/mpi/longlong.h
905 index 2dceaca27489..891e1c3549c4 100644
906 --- a/lib/mpi/longlong.h
907 +++ b/lib/mpi/longlong.h
908 @@ -722,22 +722,22 @@ do { \
909 do { \
910 if (__builtin_constant_p(bh) && (bh) == 0) \
911 __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2" \
912 - : "=r" ((USItype)(sh)), \
913 - "=&r" ((USItype)(sl)) \
914 + : "=r" (sh), \
915 + "=&r" (sl) \
916 : "%r" ((USItype)(ah)), \
917 "%r" ((USItype)(al)), \
918 "rI" ((USItype)(bl))); \
919 else if (__builtin_constant_p(bh) && (bh) == ~(USItype) 0) \
920 __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2" \
921 - : "=r" ((USItype)(sh)), \
922 - "=&r" ((USItype)(sl)) \
923 + : "=r" (sh), \
924 + "=&r" (sl) \
925 : "%r" ((USItype)(ah)), \
926 "%r" ((USItype)(al)), \
927 "rI" ((USItype)(bl))); \
928 else \
929 __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3" \
930 - : "=r" ((USItype)(sh)), \
931 - "=&r" ((USItype)(sl)) \
932 + : "=r" (sh), \
933 + "=&r" (sl) \
934 : "%r" ((USItype)(ah)), \
935 "r" ((USItype)(bh)), \
936 "%r" ((USItype)(al)), \
937 @@ -747,36 +747,36 @@ do { \
938 do { \
939 if (__builtin_constant_p(ah) && (ah) == 0) \
940 __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2" \
941 - : "=r" ((USItype)(sh)), \
942 - "=&r" ((USItype)(sl)) \
943 + : "=r" (sh), \
944 + "=&r" (sl) \
945 : "r" ((USItype)(bh)), \
946 "rI" ((USItype)(al)), \
947 "r" ((USItype)(bl))); \
948 else if (__builtin_constant_p(ah) && (ah) == ~(USItype) 0) \
949 __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2" \
950 - : "=r" ((USItype)(sh)), \
951 - "=&r" ((USItype)(sl)) \
952 + : "=r" (sh), \
953 + "=&r" (sl) \
954 : "r" ((USItype)(bh)), \
955 "rI" ((USItype)(al)), \
956 "r" ((USItype)(bl))); \
957 else if (__builtin_constant_p(bh) && (bh) == 0) \
958 __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2" \
959 - : "=r" ((USItype)(sh)), \
960 - "=&r" ((USItype)(sl)) \
961 + : "=r" (sh), \
962 + "=&r" (sl) \
963 : "r" ((USItype)(ah)), \
964 "rI" ((USItype)(al)), \
965 "r" ((USItype)(bl))); \
966 else if (__builtin_constant_p(bh) && (bh) == ~(USItype) 0) \
967 __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2" \
968 - : "=r" ((USItype)(sh)), \
969 - "=&r" ((USItype)(sl)) \
970 + : "=r" (sh), \
971 + "=&r" (sl) \
972 : "r" ((USItype)(ah)), \
973 "rI" ((USItype)(al)), \
974 "r" ((USItype)(bl))); \
975 else \
976 __asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2" \
977 - : "=r" ((USItype)(sh)), \
978 - "=&r" ((USItype)(sl)) \
979 + : "=r" (sh), \
980 + "=&r" (sl) \
981 : "r" ((USItype)(ah)), \
982 "r" ((USItype)(bh)), \
983 "rI" ((USItype)(al)), \
984 @@ -787,7 +787,7 @@ do { \
985 do { \
986 USItype __m0 = (m0), __m1 = (m1); \
987 __asm__ ("mulhwu %0,%1,%2" \
988 - : "=r" ((USItype) ph) \
989 + : "=r" (ph) \
990 : "%r" (__m0), \
991 "r" (__m1)); \
992 (pl) = __m0 * __m1; \
993 diff --git a/mm/mremap.c b/mm/mremap.c
994 index 1d98281f7204..245bf9c555b2 100644
995 --- a/mm/mremap.c
996 +++ b/mm/mremap.c
997 @@ -606,6 +606,16 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
998 LIST_HEAD(uf_unmap_early);
999 LIST_HEAD(uf_unmap);
1000
1001 + /*
1002 + * There is a deliberate asymmetry here: we strip the pointer tag
1003 + * from the old address but leave the new address alone. This is
1004 + * for consistency with mmap(), where we prevent the creation of
1005 + * aliasing mappings in userspace by leaving the tag bits of the
1006 + * mapping address intact. A non-zero tag will cause the subsequent
1007 + * range checks to reject the address as invalid.
1008 + *
1009 + * See Documentation/arm64/tagged-address-abi.rst for more information.
1010 + */
1011 addr = untagged_addr(addr);
1012
1013 if (flags & ~(MREMAP_FIXED | MREMAP_MAYMOVE))
1014 diff --git a/net/core/netclassid_cgroup.c b/net/core/netclassid_cgroup.c
1015 index b4c87fe31be2..41b24cd31562 100644
1016 --- a/net/core/netclassid_cgroup.c
1017 +++ b/net/core/netclassid_cgroup.c
1018 @@ -127,10 +127,8 @@ static int write_classid(struct cgroup_subsys_state *css, struct cftype *cft,
1019 cs->classid = (u32)value;
1020
1021 css_task_iter_start(css, 0, &it);
1022 - while ((p = css_task_iter_next(&it))) {
1023 + while ((p = css_task_iter_next(&it)))
1024 update_classid_task(p, cs->classid);
1025 - cond_resched();
1026 - }
1027 css_task_iter_end(&it);
1028
1029 return 0;
1030 diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
1031 index c7d8044ff0fa..17a3a1c938be 100644
1032 --- a/net/mac80211/mlme.c
1033 +++ b/net/mac80211/mlme.c
1034 @@ -2460,7 +2460,7 @@ void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata,
1035 if (!ieee80211_is_data(hdr->frame_control))
1036 return;
1037
1038 - if (ieee80211_is_nullfunc(hdr->frame_control) &&
1039 + if (ieee80211_is_any_nullfunc(hdr->frame_control) &&
1040 sdata->u.mgd.probe_send_count > 0) {
1041 if (ack)
1042 ieee80211_sta_reset_conn_monitor(sdata);
1043 diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
1044 index 0ba98ad9bc85..69429c8df7b3 100644
1045 --- a/net/mac80211/rx.c
1046 +++ b/net/mac80211/rx.c
1047 @@ -1450,8 +1450,7 @@ ieee80211_rx_h_check_dup(struct ieee80211_rx_data *rx)
1048 return RX_CONTINUE;
1049
1050 if (ieee80211_is_ctl(hdr->frame_control) ||
1051 - ieee80211_is_nullfunc(hdr->frame_control) ||
1052 - ieee80211_is_qos_nullfunc(hdr->frame_control) ||
1053 + ieee80211_is_any_nullfunc(hdr->frame_control) ||
1054 is_multicast_ether_addr(hdr->addr1))
1055 return RX_CONTINUE;
1056
1057 @@ -1838,8 +1837,7 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)
1058 * Drop (qos-)data::nullfunc frames silently, since they
1059 * are used only to control station power saving mode.
1060 */
1061 - if (ieee80211_is_nullfunc(hdr->frame_control) ||
1062 - ieee80211_is_qos_nullfunc(hdr->frame_control)) {
1063 + if (ieee80211_is_any_nullfunc(hdr->frame_control)) {
1064 I802_DEBUG_INC(rx->local->rx_handlers_drop_nullfunc);
1065
1066 /*
1067 @@ -2319,7 +2317,7 @@ static int ieee80211_drop_unencrypted(struct ieee80211_rx_data *rx, __le16 fc)
1068
1069 /* Drop unencrypted frames if key is set. */
1070 if (unlikely(!ieee80211_has_protected(fc) &&
1071 - !ieee80211_is_nullfunc(fc) &&
1072 + !ieee80211_is_any_nullfunc(fc) &&
1073 ieee80211_is_data(fc) && rx->key))
1074 return -EACCES;
1075
1076 diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
1077 index 21b1422b1b1c..b1669f024470 100644
1078 --- a/net/mac80211/sta_info.c
1079 +++ b/net/mac80211/sta_info.c
1080 @@ -217,7 +217,8 @@ struct sta_info *sta_info_get_by_idx(struct ieee80211_sub_if_data *sdata,
1081 struct sta_info *sta;
1082 int i = 0;
1083
1084 - list_for_each_entry_rcu(sta, &local->sta_list, list) {
1085 + list_for_each_entry_rcu(sta, &local->sta_list, list,
1086 + lockdep_is_held(&local->sta_mtx)) {
1087 if (sdata != sta->sdata)
1088 continue;
1089 if (i < idx) {
1090 diff --git a/net/mac80211/status.c b/net/mac80211/status.c
1091 index 5a3d645fe1bc..c56831797655 100644
1092 --- a/net/mac80211/status.c
1093 +++ b/net/mac80211/status.c
1094 @@ -643,8 +643,7 @@ static void ieee80211_report_ack_skb(struct ieee80211_local *local,
1095 rcu_read_lock();
1096 sdata = ieee80211_sdata_from_skb(local, skb);
1097 if (sdata) {
1098 - if (ieee80211_is_nullfunc(hdr->frame_control) ||
1099 - ieee80211_is_qos_nullfunc(hdr->frame_control))
1100 + if (ieee80211_is_any_nullfunc(hdr->frame_control))
1101 cfg80211_probe_status(sdata->dev, hdr->addr1,
1102 cookie, acked,
1103 info->status.ack_signal,
1104 @@ -1030,7 +1029,7 @@ static void __ieee80211_tx_status(struct ieee80211_hw *hw,
1105 I802_DEBUG_INC(local->dot11FailedCount);
1106 }
1107
1108 - if ((ieee80211_is_nullfunc(fc) || ieee80211_is_qos_nullfunc(fc)) &&
1109 + if (ieee80211_is_any_nullfunc(fc) &&
1110 ieee80211_has_pm(fc) &&
1111 ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS) &&
1112 !(info->flags & IEEE80211_TX_CTL_INJECTED) &&
1113 diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
1114 index 41da41cb5c40..30201aeb426c 100644
1115 --- a/net/mac80211/tx.c
1116 +++ b/net/mac80211/tx.c
1117 @@ -297,7 +297,7 @@ ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx)
1118 if (unlikely(test_bit(SCAN_SW_SCANNING, &tx->local->scanning)) &&
1119 test_bit(SDATA_STATE_OFFCHANNEL, &tx->sdata->state) &&
1120 !ieee80211_is_probe_req(hdr->frame_control) &&
1121 - !ieee80211_is_nullfunc(hdr->frame_control))
1122 + !ieee80211_is_any_nullfunc(hdr->frame_control))
1123 /*
1124 * When software scanning only nullfunc frames (to notify
1125 * the sleep state to the AP) and probe requests (for the
1126 diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
1127 index 48d63956a68c..d5eda966a706 100644
1128 --- a/net/sctp/sm_make_chunk.c
1129 +++ b/net/sctp/sm_make_chunk.c
1130 @@ -858,7 +858,11 @@ struct sctp_chunk *sctp_make_shutdown(const struct sctp_association *asoc,
1131 struct sctp_chunk *retval;
1132 __u32 ctsn;
1133
1134 - ctsn = sctp_tsnmap_get_ctsn(&asoc->peer.tsn_map);
1135 + if (chunk && chunk->asoc)
1136 + ctsn = sctp_tsnmap_get_ctsn(&chunk->asoc->peer.tsn_map);
1137 + else
1138 + ctsn = sctp_tsnmap_get_ctsn(&asoc->peer.tsn_map);
1139 +
1140 shut.cum_tsn_ack = htonl(ctsn);
1141
1142 retval = sctp_make_control(asoc, SCTP_CID_SHUTDOWN, 0,
1143 diff --git a/scripts/config b/scripts/config
1144 index e0e39826dae9..eee5b7f3a092 100755
1145 --- a/scripts/config
1146 +++ b/scripts/config
1147 @@ -7,6 +7,9 @@ myname=${0##*/}
1148 # If no prefix forced, use the default CONFIG_
1149 CONFIG_="${CONFIG_-CONFIG_}"
1150
1151 +# We use an uncommon delimiter for sed substitutions
1152 +SED_DELIM=$(echo -en "\001")
1153 +
1154 usage() {
1155 cat >&2 <<EOL
1156 Manipulate options in a .config file from the command line.
1157 @@ -83,7 +86,7 @@ txt_subst() {
1158 local infile="$3"
1159 local tmpfile="$infile.swp"
1160
1161 - sed -e "s:$before:$after:" "$infile" >"$tmpfile"
1162 + sed -e "s$SED_DELIM$before$SED_DELIM$after$SED_DELIM" "$infile" >"$tmpfile"
1163 # replace original file with the edited one
1164 mv "$tmpfile" "$infile"
1165 }
1166 diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
1167 index 1673479b4eef..612441508e80 100644
1168 --- a/sound/pci/hda/hda_intel.c
1169 +++ b/sound/pci/hda/hda_intel.c
1170 @@ -2023,9 +2023,10 @@ static void pcm_mmap_prepare(struct snd_pcm_substream *substream,
1171 * some HD-audio PCI entries are exposed without any codecs, and such devices
1172 * should be ignored from the beginning.
1173 */
1174 -static const struct snd_pci_quirk driver_blacklist[] = {
1175 - SND_PCI_QUIRK(0x1462, 0xcb59, "MSI TRX40 Creator", 0),
1176 - SND_PCI_QUIRK(0x1462, 0xcb60, "MSI TRX40", 0),
1177 +static const struct pci_device_id driver_blacklist[] = {
1178 + { PCI_DEVICE_SUB(0x1022, 0x1487, 0x1043, 0x874f) }, /* ASUS ROG Zenith II / Strix */
1179 + { PCI_DEVICE_SUB(0x1022, 0x1487, 0x1462, 0xcb59) }, /* MSI TRX40 Creator */
1180 + { PCI_DEVICE_SUB(0x1022, 0x1487, 0x1462, 0xcb60) }, /* MSI TRX40 */
1181 {}
1182 };
1183
1184 @@ -2064,7 +2065,7 @@ static int azx_probe(struct pci_dev *pci,
1185 bool schedule_probe;
1186 int err;
1187
1188 - if (snd_pci_quirk_lookup(pci, driver_blacklist)) {
1189 + if (pci_match_id(driver_blacklist, pci)) {
1190 dev_info(&pci->dev, "Skipping the blacklisted device\n");
1191 return -ENODEV;
1192 }
1193 diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
1194 index 18c173e6a13b..78d5b4d31bb6 100644
1195 --- a/sound/soc/codecs/hdac_hdmi.c
1196 +++ b/sound/soc/codecs/hdac_hdmi.c
1197 @@ -150,14 +150,14 @@ static struct hdac_hdmi_pcm *
1198 hdac_hdmi_get_pcm_from_cvt(struct hdac_hdmi_priv *hdmi,
1199 struct hdac_hdmi_cvt *cvt)
1200 {
1201 - struct hdac_hdmi_pcm *pcm = NULL;
1202 + struct hdac_hdmi_pcm *pcm;
1203
1204 list_for_each_entry(pcm, &hdmi->pcm_list, head) {
1205 if (pcm->cvt == cvt)
1206 - break;
1207 + return pcm;
1208 }
1209
1210 - return pcm;
1211 + return NULL;
1212 }
1213
1214 static void hdac_hdmi_jack_report(struct hdac_hdmi_pcm *pcm,
1215 diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
1216 index e949b372cead..f5b59305c957 100644
1217 --- a/sound/soc/codecs/sgtl5000.c
1218 +++ b/sound/soc/codecs/sgtl5000.c
1219 @@ -1645,6 +1645,40 @@ static int sgtl5000_i2c_probe(struct i2c_client *client,
1220 dev_err(&client->dev,
1221 "Error %d initializing CHIP_CLK_CTRL\n", ret);
1222
1223 + /* Mute everything to avoid pop from the following power-up */
1224 + ret = regmap_write(sgtl5000->regmap, SGTL5000_CHIP_ANA_CTRL,
1225 + SGTL5000_CHIP_ANA_CTRL_DEFAULT);
1226 + if (ret) {
1227 + dev_err(&client->dev,
1228 + "Error %d muting outputs via CHIP_ANA_CTRL\n", ret);
1229 + goto disable_clk;
1230 + }
1231 +
1232 + /*
1233 + * If VAG is powered-on (e.g. from previous boot), it would be disabled
1234 + * by the write to ANA_POWER in later steps of the probe code. This
1235 + * may create a loud pop even with all outputs muted. The proper way
1236 + * to circumvent this is disabling the bit first and waiting the proper
1237 + * cool-down time.
1238 + */
1239 + ret = regmap_read(sgtl5000->regmap, SGTL5000_CHIP_ANA_POWER, &value);
1240 + if (ret) {
1241 + dev_err(&client->dev, "Failed to read ANA_POWER: %d\n", ret);
1242 + goto disable_clk;
1243 + }
1244 + if (value & SGTL5000_VAG_POWERUP) {
1245 + ret = regmap_update_bits(sgtl5000->regmap,
1246 + SGTL5000_CHIP_ANA_POWER,
1247 + SGTL5000_VAG_POWERUP,
1248 + 0);
1249 + if (ret) {
1250 + dev_err(&client->dev, "Error %d disabling VAG\n", ret);
1251 + goto disable_clk;
1252 + }
1253 +
1254 + msleep(SGTL5000_VAG_POWERDOWN_DELAY);
1255 + }
1256 +
1257 /* Follow section 2.2.1.1 of AN3663 */
1258 ana_pwr = SGTL5000_ANA_POWER_DEFAULT;
1259 if (sgtl5000->num_supplies <= VDDD) {
1260 diff --git a/sound/soc/codecs/sgtl5000.h b/sound/soc/codecs/sgtl5000.h
1261 index a4bf4bca95bf..56ec5863f250 100644
1262 --- a/sound/soc/codecs/sgtl5000.h
1263 +++ b/sound/soc/codecs/sgtl5000.h
1264 @@ -233,6 +233,7 @@
1265 /*
1266 * SGTL5000_CHIP_ANA_CTRL
1267 */
1268 +#define SGTL5000_CHIP_ANA_CTRL_DEFAULT 0x0133
1269 #define SGTL5000_LINE_OUT_MUTE 0x0100
1270 #define SGTL5000_HP_SEL_MASK 0x0040
1271 #define SGTL5000_HP_SEL_SHIFT 6
1272 diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
1273 index fc5d089868df..4a7d3413917f 100644
1274 --- a/sound/soc/sh/rcar/ssi.c
1275 +++ b/sound/soc/sh/rcar/ssi.c
1276 @@ -594,10 +594,16 @@ static int rsnd_ssi_stop(struct rsnd_mod *mod,
1277 * Capture: It might not receave data. Do nothing
1278 */
1279 if (rsnd_io_is_play(io)) {
1280 - rsnd_mod_write(mod, SSICR, cr | EN);
1281 + rsnd_mod_write(mod, SSICR, cr | ssi->cr_en);
1282 rsnd_ssi_status_check(mod, DIRQ);
1283 }
1284
1285 + /* In multi-SSI mode, stop is performed by setting ssi0129 in
1286 + * SSI_CONTROL to 0 (in rsnd_ssio_stop_gen2). Do nothing here.
1287 + */
1288 + if (rsnd_ssi_multi_slaves_runtime(io))
1289 + return 0;
1290 +
1291 /*
1292 * disable SSI,
1293 * and, wait idle state
1294 @@ -737,6 +743,9 @@ static void rsnd_ssi_parent_attach(struct rsnd_mod *mod,
1295 if (!rsnd_rdai_is_clk_master(rdai))
1296 return;
1297
1298 + if (rsnd_ssi_is_multi_slave(mod, io))
1299 + return;
1300 +
1301 switch (rsnd_mod_id(mod)) {
1302 case 1:
1303 case 2:
1304 diff --git a/sound/soc/sh/rcar/ssiu.c b/sound/soc/sh/rcar/ssiu.c
1305 index f35d88211887..9c7c3e7539c9 100644
1306 --- a/sound/soc/sh/rcar/ssiu.c
1307 +++ b/sound/soc/sh/rcar/ssiu.c
1308 @@ -221,7 +221,7 @@ static int rsnd_ssiu_init_gen2(struct rsnd_mod *mod,
1309 i;
1310
1311 for_each_rsnd_mod_array(i, pos, io, rsnd_ssi_array) {
1312 - shift = (i * 4) + 16;
1313 + shift = (i * 4) + 20;
1314 val = (val & ~(0xF << shift)) |
1315 rsnd_mod_id(pos) << shift;
1316 }
1317 diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
1318 index 17556a47f727..65c91abb9462 100644
1319 --- a/sound/soc/soc-topology.c
1320 +++ b/sound/soc/soc-topology.c
1321 @@ -893,7 +893,13 @@ static int soc_tplg_dmixer_create(struct soc_tplg *tplg, unsigned int count,
1322 }
1323
1324 /* create any TLV data */
1325 - soc_tplg_create_tlv(tplg, &kc, &mc->hdr);
1326 + err = soc_tplg_create_tlv(tplg, &kc, &mc->hdr);
1327 + if (err < 0) {
1328 + dev_err(tplg->dev, "ASoC: failed to create TLV %s\n",
1329 + mc->hdr.name);
1330 + kfree(sm);
1331 + continue;
1332 + }
1333
1334 /* pass control to driver for optional further init */
1335 err = soc_tplg_init_kcontrol(tplg, &kc,
1336 @@ -1117,6 +1123,7 @@ static int soc_tplg_kcontrol_elems_load(struct soc_tplg *tplg,
1337 struct snd_soc_tplg_hdr *hdr)
1338 {
1339 struct snd_soc_tplg_ctl_hdr *control_hdr;
1340 + int ret;
1341 int i;
1342
1343 if (tplg->pass != SOC_TPLG_PASS_MIXER) {
1344 @@ -1145,25 +1152,30 @@ static int soc_tplg_kcontrol_elems_load(struct soc_tplg *tplg,
1345 case SND_SOC_TPLG_CTL_RANGE:
1346 case SND_SOC_TPLG_DAPM_CTL_VOLSW:
1347 case SND_SOC_TPLG_DAPM_CTL_PIN:
1348 - soc_tplg_dmixer_create(tplg, 1,
1349 - le32_to_cpu(hdr->payload_size));
1350 + ret = soc_tplg_dmixer_create(tplg, 1,
1351 + le32_to_cpu(hdr->payload_size));
1352 break;
1353 case SND_SOC_TPLG_CTL_ENUM:
1354 case SND_SOC_TPLG_CTL_ENUM_VALUE:
1355 case SND_SOC_TPLG_DAPM_CTL_ENUM_DOUBLE:
1356 case SND_SOC_TPLG_DAPM_CTL_ENUM_VIRT:
1357 case SND_SOC_TPLG_DAPM_CTL_ENUM_VALUE:
1358 - soc_tplg_denum_create(tplg, 1,
1359 - le32_to_cpu(hdr->payload_size));
1360 + ret = soc_tplg_denum_create(tplg, 1,
1361 + le32_to_cpu(hdr->payload_size));
1362 break;
1363 case SND_SOC_TPLG_CTL_BYTES:
1364 - soc_tplg_dbytes_create(tplg, 1,
1365 - le32_to_cpu(hdr->payload_size));
1366 + ret = soc_tplg_dbytes_create(tplg, 1,
1367 + le32_to_cpu(hdr->payload_size));
1368 break;
1369 default:
1370 soc_bind_err(tplg, control_hdr, i);
1371 return -EINVAL;
1372 }
1373 + if (ret < 0) {
1374 + dev_err(tplg->dev, "ASoC: invalid control\n");
1375 + return ret;
1376 + }
1377 +
1378 }
1379
1380 return 0;
1381 @@ -1271,7 +1283,9 @@ static int soc_tplg_dapm_graph_elems_load(struct soc_tplg *tplg,
1382 routes[i]->dobj.index = tplg->index;
1383 list_add(&routes[i]->dobj.list, &tplg->comp->dobj_list);
1384
1385 - soc_tplg_add_route(tplg, routes[i]);
1386 + ret = soc_tplg_add_route(tplg, routes[i]);
1387 + if (ret < 0)
1388 + break;
1389
1390 /* add route, but keep going if some fail */
1391 snd_soc_dapm_add_routes(dapm, routes[i], 1);
1392 @@ -1354,7 +1368,13 @@ static struct snd_kcontrol_new *soc_tplg_dapm_widget_dmixer_create(
1393 }
1394
1395 /* create any TLV data */
1396 - soc_tplg_create_tlv(tplg, &kc[i], &mc->hdr);
1397 + err = soc_tplg_create_tlv(tplg, &kc[i], &mc->hdr);
1398 + if (err < 0) {
1399 + dev_err(tplg->dev, "ASoC: failed to create TLV %s\n",
1400 + mc->hdr.name);
1401 + kfree(sm);
1402 + continue;
1403 + }
1404
1405 /* pass control to driver for optional further init */
1406 err = soc_tplg_init_kcontrol(tplg, &kc[i],
1407 @@ -2072,7 +2092,9 @@ static int soc_tplg_pcm_elems_load(struct soc_tplg *tplg,
1408 _pcm = pcm;
1409 } else {
1410 abi_match = false;
1411 - pcm_new_ver(tplg, pcm, &_pcm);
1412 + ret = pcm_new_ver(tplg, pcm, &_pcm);
1413 + if (ret < 0)
1414 + return ret;
1415 }
1416
1417 /* create the FE DAIs and DAI links */
1418 @@ -2409,7 +2431,7 @@ static int soc_tplg_dai_elems_load(struct soc_tplg *tplg,
1419 {
1420 struct snd_soc_tplg_dai *dai;
1421 int count;
1422 - int i;
1423 + int i, ret;
1424
1425 count = le32_to_cpu(hdr->count);
1426
1427 @@ -2424,7 +2446,12 @@ static int soc_tplg_dai_elems_load(struct soc_tplg *tplg,
1428 return -EINVAL;
1429 }
1430
1431 - soc_tplg_dai_config(tplg, dai);
1432 + ret = soc_tplg_dai_config(tplg, dai);
1433 + if (ret < 0) {
1434 + dev_err(tplg->dev, "ASoC: failed to configure DAI\n");
1435 + return ret;
1436 + }
1437 +
1438 tplg->pos += (sizeof(*dai) + le32_to_cpu(dai->priv.size));
1439 }
1440
1441 @@ -2532,7 +2559,7 @@ static int soc_valid_header(struct soc_tplg *tplg,
1442 }
1443
1444 /* big endian firmware objects not supported atm */
1445 - if (hdr->magic == SOC_TPLG_MAGIC_BIG_ENDIAN) {
1446 + if (le32_to_cpu(hdr->magic) == SOC_TPLG_MAGIC_BIG_ENDIAN) {
1447 dev_err(tplg->dev,
1448 "ASoC: pass %d big endian not supported header got %x at offset 0x%lx size 0x%zx.\n",
1449 tplg->pass, hdr->magic,
1450 diff --git a/tools/arch/arm64/include/uapi/asm/unistd.h b/tools/arch/arm64/include/uapi/asm/unistd.h
1451 index 4703d218663a..f83a70e07df8 100644
1452 --- a/tools/arch/arm64/include/uapi/asm/unistd.h
1453 +++ b/tools/arch/arm64/include/uapi/asm/unistd.h
1454 @@ -19,5 +19,6 @@
1455 #define __ARCH_WANT_NEW_STAT
1456 #define __ARCH_WANT_SET_GET_RLIMIT
1457 #define __ARCH_WANT_TIME32_SYSCALLS
1458 +#define __ARCH_WANT_SYS_CLONE3
1459
1460 #include <asm-generic/unistd.h>
1461 diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
1462 index 122321d54922..d045707e7c9a 100644
1463 --- a/tools/lib/bpf/Makefile
1464 +++ b/tools/lib/bpf/Makefile
1465 @@ -145,6 +145,7 @@ PC_FILE := $(addprefix $(OUTPUT),$(PC_FILE))
1466
1467 GLOBAL_SYM_COUNT = $(shell readelf -s --wide $(BPF_IN_SHARED) | \
1468 cut -d "@" -f1 | sed 's/_v[0-9]_[0-9]_[0-9].*//' | \
1469 + sed 's/\[.*\]//' | \
1470 awk '/GLOBAL/ && /DEFAULT/ && !/UND/ {print $$NF}' | \
1471 sort -u | wc -l)
1472 VERSIONED_SYM_COUNT = $(shell readelf -s --wide $(OUTPUT)libbpf.so | \
1473 @@ -217,6 +218,7 @@ check_abi: $(OUTPUT)libbpf.so
1474 "versioned in $(VERSION_SCRIPT)." >&2; \
1475 readelf -s --wide $(BPF_IN_SHARED) | \
1476 cut -d "@" -f1 | sed 's/_v[0-9]_[0-9]_[0-9].*//' | \
1477 + sed 's/\[.*\]//' | \
1478 awk '/GLOBAL/ && /DEFAULT/ && !/UND/ {print $$NF}'| \
1479 sort -u > $(OUTPUT)libbpf_global_syms.tmp; \
1480 readelf -s --wide $(OUTPUT)libbpf.so | \
1481 diff --git a/tools/testing/selftests/ipc/msgque.c b/tools/testing/selftests/ipc/msgque.c
1482 index 4c156aeab6b8..5ec4d9e18806 100644
1483 --- a/tools/testing/selftests/ipc/msgque.c
1484 +++ b/tools/testing/selftests/ipc/msgque.c
1485 @@ -137,7 +137,7 @@ int dump_queue(struct msgque_data *msgque)
1486 for (kern_id = 0; kern_id < 256; kern_id++) {
1487 ret = msgctl(kern_id, MSG_STAT, &ds);
1488 if (ret < 0) {
1489 - if (errno == -EINVAL)
1490 + if (errno == EINVAL)
1491 continue;
1492 printf("Failed to get stats for IPC queue with id %d\n",
1493 kern_id);