1 |
commit: 80d2920109660fb572a5de65ad1479e951848663 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Feb 15 12:38:53 2019 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Feb 15 12:38:53 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=80d29201 |
7 |
|
8 |
proj/linux-patches: Linux patches 4.19.22 and 4.19.23 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 8 + |
13 |
1021_linux-4.19.22.patch | 1306 ++++++++++++++++++++++++++++++++++++++++++++++ |
14 |
1022_linux-4.19.23.patch | 35 ++ |
15 |
3 files changed, 1349 insertions(+) |
16 |
|
17 |
diff --git a/0000_README b/0000_README |
18 |
index ff7bed3..67480bc 100644 |
19 |
--- a/0000_README |
20 |
+++ b/0000_README |
21 |
@@ -127,6 +127,14 @@ Patch: 1020_linux-4.19.21.patch |
22 |
From: http://www.kernel.org |
23 |
Desc: Linux 4.19.21 |
24 |
|
25 |
+Patch: 1021_linux-4.19.22.patch |
26 |
+From: http://www.kernel.org |
27 |
+Desc: Linux 4.19.22 |
28 |
+ |
29 |
+Patch: 1022_linux-4.19.23.patch |
30 |
+From: http://www.kernel.org |
31 |
+Desc: Linux 4.19.23 |
32 |
+ |
33 |
Patch: 1500_XATTR_USER_PREFIX.patch |
34 |
From: https://bugs.gentoo.org/show_bug.cgi?id=470644 |
35 |
Desc: Support for namespace user.pax.* on tmpfs. |
36 |
|
37 |
diff --git a/1021_linux-4.19.22.patch b/1021_linux-4.19.22.patch |
38 |
new file mode 100644 |
39 |
index 0000000..2d54602 |
40 |
--- /dev/null |
41 |
+++ b/1021_linux-4.19.22.patch |
42 |
@@ -0,0 +1,1306 @@ |
43 |
+diff --git a/Makefile b/Makefile |
44 |
+index ba5f14d38d8e..8cfcb01fcd7b 100644 |
45 |
+--- a/Makefile |
46 |
++++ b/Makefile |
47 |
+@@ -1,7 +1,7 @@ |
48 |
+ # SPDX-License-Identifier: GPL-2.0 |
49 |
+ VERSION = 4 |
50 |
+ PATCHLEVEL = 19 |
51 |
+-SUBLEVEL = 21 |
52 |
++SUBLEVEL = 22 |
53 |
+ EXTRAVERSION = |
54 |
+ NAME = "People's Front" |
55 |
+ |
56 |
+diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi |
57 |
+index 47aa53ba6b92..559659b399d0 100644 |
58 |
+--- a/arch/arm/boot/dts/da850.dtsi |
59 |
++++ b/arch/arm/boot/dts/da850.dtsi |
60 |
+@@ -476,7 +476,7 @@ |
61 |
+ clocksource: timer@20000 { |
62 |
+ compatible = "ti,da830-timer"; |
63 |
+ reg = <0x20000 0x1000>; |
64 |
+- interrupts = <12>, <13>; |
65 |
++ interrupts = <21>, <22>; |
66 |
+ interrupt-names = "tint12", "tint34"; |
67 |
+ clocks = <&pll0_auxclk>; |
68 |
+ }; |
69 |
+diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c |
70 |
+index 3b73813c6b04..23e8c93515d4 100644 |
71 |
+--- a/arch/arm/mach-iop32x/n2100.c |
72 |
++++ b/arch/arm/mach-iop32x/n2100.c |
73 |
+@@ -75,8 +75,7 @@ void __init n2100_map_io(void) |
74 |
+ /* |
75 |
+ * N2100 PCI. |
76 |
+ */ |
77 |
+-static int __init |
78 |
+-n2100_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
79 |
++static int n2100_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
80 |
+ { |
81 |
+ int irq; |
82 |
+ |
83 |
+diff --git a/arch/arm/mach-tango/pm.c b/arch/arm/mach-tango/pm.c |
84 |
+index 028e50c6383f..a32c3b631484 100644 |
85 |
+--- a/arch/arm/mach-tango/pm.c |
86 |
++++ b/arch/arm/mach-tango/pm.c |
87 |
+@@ -3,6 +3,7 @@ |
88 |
+ #include <linux/suspend.h> |
89 |
+ #include <asm/suspend.h> |
90 |
+ #include "smc.h" |
91 |
++#include "pm.h" |
92 |
+ |
93 |
+ static int tango_pm_powerdown(unsigned long arg) |
94 |
+ { |
95 |
+@@ -24,10 +25,7 @@ static const struct platform_suspend_ops tango_pm_ops = { |
96 |
+ .valid = suspend_valid_only_mem, |
97 |
+ }; |
98 |
+ |
99 |
+-static int __init tango_pm_init(void) |
100 |
++void __init tango_pm_init(void) |
101 |
+ { |
102 |
+ suspend_set_ops(&tango_pm_ops); |
103 |
+- return 0; |
104 |
+ } |
105 |
+- |
106 |
+-late_initcall(tango_pm_init); |
107 |
+diff --git a/arch/arm/mach-tango/pm.h b/arch/arm/mach-tango/pm.h |
108 |
+new file mode 100644 |
109 |
+index 000000000000..35ea705a0ee2 |
110 |
+--- /dev/null |
111 |
++++ b/arch/arm/mach-tango/pm.h |
112 |
+@@ -0,0 +1,7 @@ |
113 |
++/* SPDX-License-Identifier: GPL-2.0 */ |
114 |
++ |
115 |
++#ifdef CONFIG_SUSPEND |
116 |
++void __init tango_pm_init(void); |
117 |
++#else |
118 |
++#define tango_pm_init NULL |
119 |
++#endif |
120 |
+diff --git a/arch/arm/mach-tango/setup.c b/arch/arm/mach-tango/setup.c |
121 |
+index 677dd7b5efd9..824f90737b04 100644 |
122 |
+--- a/arch/arm/mach-tango/setup.c |
123 |
++++ b/arch/arm/mach-tango/setup.c |
124 |
+@@ -2,6 +2,7 @@ |
125 |
+ #include <asm/mach/arch.h> |
126 |
+ #include <asm/hardware/cache-l2x0.h> |
127 |
+ #include "smc.h" |
128 |
++#include "pm.h" |
129 |
+ |
130 |
+ static void tango_l2c_write(unsigned long val, unsigned int reg) |
131 |
+ { |
132 |
+@@ -15,4 +16,5 @@ DT_MACHINE_START(TANGO_DT, "Sigma Tango DT") |
133 |
+ .dt_compat = tango_dt_compat, |
134 |
+ .l2c_aux_mask = ~0, |
135 |
+ .l2c_write_sec = tango_l2c_write, |
136 |
++ .init_late = tango_pm_init, |
137 |
+ MACHINE_END |
138 |
+diff --git a/arch/mips/kernel/mips-cm.c b/arch/mips/kernel/mips-cm.c |
139 |
+index 8f5bd04f320a..7f3f136572de 100644 |
140 |
+--- a/arch/mips/kernel/mips-cm.c |
141 |
++++ b/arch/mips/kernel/mips-cm.c |
142 |
+@@ -457,5 +457,5 @@ void mips_cm_error_report(void) |
143 |
+ } |
144 |
+ |
145 |
+ /* reprime cause register */ |
146 |
+- write_gcr_error_cause(0); |
147 |
++ write_gcr_error_cause(cm_error); |
148 |
+ } |
149 |
+diff --git a/arch/mips/loongson64/common/reset.c b/arch/mips/loongson64/common/reset.c |
150 |
+index a60715e11306..b26892ce871c 100644 |
151 |
+--- a/arch/mips/loongson64/common/reset.c |
152 |
++++ b/arch/mips/loongson64/common/reset.c |
153 |
+@@ -59,7 +59,12 @@ static void loongson_poweroff(void) |
154 |
+ { |
155 |
+ #ifndef CONFIG_LEFI_FIRMWARE_INTERFACE |
156 |
+ mach_prepare_shutdown(); |
157 |
+- unreachable(); |
158 |
++ |
159 |
++ /* |
160 |
++ * It needs a wait loop here, but mips/kernel/reset.c already calls |
161 |
++ * a generic delay loop, machine_hang(), so simply return. |
162 |
++ */ |
163 |
++ return; |
164 |
+ #else |
165 |
+ void (*fw_poweroff)(void) = (void *)loongson_sysconf.poweroff_addr; |
166 |
+ |
167 |
+diff --git a/arch/mips/pci/pci-octeon.c b/arch/mips/pci/pci-octeon.c |
168 |
+index 5017d5843c5a..fc29b85cfa92 100644 |
169 |
+--- a/arch/mips/pci/pci-octeon.c |
170 |
++++ b/arch/mips/pci/pci-octeon.c |
171 |
+@@ -568,6 +568,11 @@ static int __init octeon_pci_setup(void) |
172 |
+ if (octeon_has_feature(OCTEON_FEATURE_PCIE)) |
173 |
+ return 0; |
174 |
+ |
175 |
++ if (!octeon_is_pci_host()) { |
176 |
++ pr_notice("Not in host mode, PCI Controller not initialized\n"); |
177 |
++ return 0; |
178 |
++ } |
179 |
++ |
180 |
+ /* Point pcibios_map_irq() to the PCI version of it */ |
181 |
+ octeon_pcibios_map_irq = octeon_pci_pcibios_map_irq; |
182 |
+ |
183 |
+@@ -579,11 +584,6 @@ static int __init octeon_pci_setup(void) |
184 |
+ else |
185 |
+ octeon_dma_bar_type = OCTEON_DMA_BAR_TYPE_BIG; |
186 |
+ |
187 |
+- if (!octeon_is_pci_host()) { |
188 |
+- pr_notice("Not in host mode, PCI Controller not initialized\n"); |
189 |
+- return 0; |
190 |
+- } |
191 |
+- |
192 |
+ /* PCI I/O and PCI MEM values */ |
193 |
+ set_io_port_base(OCTEON_PCI_IOSPACE_BASE); |
194 |
+ ioport_resource.start = 0; |
195 |
+diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile |
196 |
+index 34605ca21498..6f10312e0c76 100644 |
197 |
+--- a/arch/mips/vdso/Makefile |
198 |
++++ b/arch/mips/vdso/Makefile |
199 |
+@@ -8,6 +8,7 @@ ccflags-vdso := \ |
200 |
+ $(filter -E%,$(KBUILD_CFLAGS)) \ |
201 |
+ $(filter -mmicromips,$(KBUILD_CFLAGS)) \ |
202 |
+ $(filter -march=%,$(KBUILD_CFLAGS)) \ |
203 |
++ $(filter -m%-float,$(KBUILD_CFLAGS)) \ |
204 |
+ -D__VDSO__ |
205 |
+ |
206 |
+ ifeq ($(cc-name),clang) |
207 |
+@@ -128,7 +129,7 @@ $(obj)/%-o32.o: $(src)/%.c FORCE |
208 |
+ $(call cmd,force_checksrc) |
209 |
+ $(call if_changed_rule,cc_o_c) |
210 |
+ |
211 |
+-$(obj)/vdso-o32.lds: KBUILD_CPPFLAGS := -mabi=32 |
212 |
++$(obj)/vdso-o32.lds: KBUILD_CPPFLAGS := $(ccflags-vdso) -mabi=32 |
213 |
+ $(obj)/vdso-o32.lds: $(src)/vdso.lds.S FORCE |
214 |
+ $(call if_changed_dep,cpp_lds_S) |
215 |
+ |
216 |
+@@ -168,7 +169,7 @@ $(obj)/%-n32.o: $(src)/%.c FORCE |
217 |
+ $(call cmd,force_checksrc) |
218 |
+ $(call if_changed_rule,cc_o_c) |
219 |
+ |
220 |
+-$(obj)/vdso-n32.lds: KBUILD_CPPFLAGS := -mabi=n32 |
221 |
++$(obj)/vdso-n32.lds: KBUILD_CPPFLAGS := $(ccflags-vdso) -mabi=n32 |
222 |
+ $(obj)/vdso-n32.lds: $(src)/vdso.lds.S FORCE |
223 |
+ $(call if_changed_dep,cpp_lds_S) |
224 |
+ |
225 |
+diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h |
226 |
+index 2a2486526d1f..855dbae6d351 100644 |
227 |
+--- a/arch/powerpc/include/asm/book3s/64/pgtable.h |
228 |
++++ b/arch/powerpc/include/asm/book3s/64/pgtable.h |
229 |
+@@ -1234,21 +1234,13 @@ extern pmd_t pmdp_invalidate(struct vm_area_struct *vma, unsigned long address, |
230 |
+ |
231 |
+ #define pmd_move_must_withdraw pmd_move_must_withdraw |
232 |
+ struct spinlock; |
233 |
+-static inline int pmd_move_must_withdraw(struct spinlock *new_pmd_ptl, |
234 |
+- struct spinlock *old_pmd_ptl, |
235 |
+- struct vm_area_struct *vma) |
236 |
+-{ |
237 |
+- if (radix_enabled()) |
238 |
+- return false; |
239 |
+- /* |
240 |
+- * Archs like ppc64 use pgtable to store per pmd |
241 |
+- * specific information. So when we switch the pmd, |
242 |
+- * we should also withdraw and deposit the pgtable |
243 |
+- */ |
244 |
+- return true; |
245 |
+-} |
246 |
+- |
247 |
+- |
248 |
++extern int pmd_move_must_withdraw(struct spinlock *new_pmd_ptl, |
249 |
++ struct spinlock *old_pmd_ptl, |
250 |
++ struct vm_area_struct *vma); |
251 |
++/* |
252 |
++ * Hash translation mode use the deposited table to store hash pte |
253 |
++ * slot information. |
254 |
++ */ |
255 |
+ #define arch_needs_pgtable_deposit arch_needs_pgtable_deposit |
256 |
+ static inline bool arch_needs_pgtable_deposit(void) |
257 |
+ { |
258 |
+diff --git a/arch/powerpc/mm/pgtable-book3s64.c b/arch/powerpc/mm/pgtable-book3s64.c |
259 |
+index 01d7c0f7c4f0..297db665d953 100644 |
260 |
+--- a/arch/powerpc/mm/pgtable-book3s64.c |
261 |
++++ b/arch/powerpc/mm/pgtable-book3s64.c |
262 |
+@@ -477,3 +477,25 @@ void arch_report_meminfo(struct seq_file *m) |
263 |
+ atomic_long_read(&direct_pages_count[MMU_PAGE_1G]) << 20); |
264 |
+ } |
265 |
+ #endif /* CONFIG_PROC_FS */ |
266 |
++ |
267 |
++/* |
268 |
++ * For hash translation mode, we use the deposited table to store hash slot |
269 |
++ * information and they are stored at PTRS_PER_PMD offset from related pmd |
270 |
++ * location. Hence a pmd move requires deposit and withdraw. |
271 |
++ * |
272 |
++ * For radix translation with split pmd ptl, we store the deposited table in the |
273 |
++ * pmd page. Hence if we have different pmd page we need to withdraw during pmd |
274 |
++ * move. |
275 |
++ * |
276 |
++ * With hash we use deposited table always irrespective of anon or not. |
277 |
++ * With radix we use deposited table only for anonymous mapping. |
278 |
++ */ |
279 |
++int pmd_move_must_withdraw(struct spinlock *new_pmd_ptl, |
280 |
++ struct spinlock *old_pmd_ptl, |
281 |
++ struct vm_area_struct *vma) |
282 |
++{ |
283 |
++ if (radix_enabled()) |
284 |
++ return (new_pmd_ptl != old_pmd_ptl) && vma_is_anonymous(vma); |
285 |
++ |
286 |
++ return true; |
287 |
++} |
288 |
+diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c |
289 |
+index b8c3f9e6af89..adf28788cab5 100644 |
290 |
+--- a/drivers/ata/libata-core.c |
291 |
++++ b/drivers/ata/libata-core.c |
292 |
+@@ -4554,6 +4554,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { |
293 |
+ { "SAMSUNG MZMPC128HBFU-000MV", "CXM14M1Q", ATA_HORKAGE_NOLPM, }, |
294 |
+ { "SAMSUNG SSD PM830 mSATA *", "CXM13D1Q", ATA_HORKAGE_NOLPM, }, |
295 |
+ { "SAMSUNG MZ7TD256HAFV-000L9", NULL, ATA_HORKAGE_NOLPM, }, |
296 |
++ { "SAMSUNG MZ7TE512HMHP-000L1", "EXT06L0Q", ATA_HORKAGE_NOLPM, }, |
297 |
+ |
298 |
+ /* devices that don't properly handle queued TRIM commands */ |
299 |
+ { "Micron_M500IT_*", "MU01", ATA_HORKAGE_NO_NCQ_TRIM | |
300 |
+diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c |
301 |
+index 472c88ae1c0f..92f843eaf1e0 100644 |
302 |
+--- a/drivers/firmware/arm_scmi/bus.c |
303 |
++++ b/drivers/firmware/arm_scmi/bus.c |
304 |
+@@ -119,6 +119,11 @@ void scmi_driver_unregister(struct scmi_driver *driver) |
305 |
+ } |
306 |
+ EXPORT_SYMBOL_GPL(scmi_driver_unregister); |
307 |
+ |
308 |
++static void scmi_device_release(struct device *dev) |
309 |
++{ |
310 |
++ kfree(to_scmi_dev(dev)); |
311 |
++} |
312 |
++ |
313 |
+ struct scmi_device * |
314 |
+ scmi_device_create(struct device_node *np, struct device *parent, int protocol) |
315 |
+ { |
316 |
+@@ -138,6 +143,7 @@ scmi_device_create(struct device_node *np, struct device *parent, int protocol) |
317 |
+ scmi_dev->dev.parent = parent; |
318 |
+ scmi_dev->dev.of_node = np; |
319 |
+ scmi_dev->dev.bus = &scmi_bus_type; |
320 |
++ scmi_dev->dev.release = scmi_device_release; |
321 |
+ dev_set_name(&scmi_dev->dev, "scmi_dev.%d", id); |
322 |
+ |
323 |
+ retval = device_register(&scmi_dev->dev); |
324 |
+@@ -156,9 +162,8 @@ free_mem: |
325 |
+ void scmi_device_destroy(struct scmi_device *scmi_dev) |
326 |
+ { |
327 |
+ scmi_handle_put(scmi_dev->handle); |
328 |
+- device_unregister(&scmi_dev->dev); |
329 |
+ ida_simple_remove(&scmi_bus_id, scmi_dev->id); |
330 |
+- kfree(scmi_dev); |
331 |
++ device_unregister(&scmi_dev->dev); |
332 |
+ } |
333 |
+ |
334 |
+ void scmi_set_handle(struct scmi_device *scmi_dev) |
335 |
+diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c |
336 |
+index a63e00653324..1546bc49004f 100644 |
337 |
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c |
338 |
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c |
339 |
+@@ -984,6 +984,7 @@ static int smu10_get_clock_by_type_with_latency(struct pp_hwmgr *hwmgr, |
340 |
+ break; |
341 |
+ case amd_pp_dpp_clock: |
342 |
+ pclk_vol_table = pinfo->vdd_dep_on_dppclk; |
343 |
++ break; |
344 |
+ default: |
345 |
+ return -EINVAL; |
346 |
+ } |
347 |
+diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c |
348 |
+index 02db9ac82d7a..a3104d79b48f 100644 |
349 |
+--- a/drivers/gpu/drm/drm_modes.c |
350 |
++++ b/drivers/gpu/drm/drm_modes.c |
351 |
+@@ -758,7 +758,7 @@ int drm_mode_hsync(const struct drm_display_mode *mode) |
352 |
+ if (mode->hsync) |
353 |
+ return mode->hsync; |
354 |
+ |
355 |
+- if (mode->htotal < 0) |
356 |
++ if (mode->htotal <= 0) |
357 |
+ return 0; |
358 |
+ |
359 |
+ calc_val = (mode->clock * 1000) / mode->htotal; /* hsync in Hz */ |
360 |
+diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c |
361 |
+index c9af34861d9e..b4b1f9ca05b6 100644 |
362 |
+--- a/drivers/gpu/drm/i915/intel_ddi.c |
363 |
++++ b/drivers/gpu/drm/i915/intel_ddi.c |
364 |
+@@ -1085,7 +1085,7 @@ static uint32_t icl_pll_to_ddi_pll_sel(struct intel_encoder *encoder, |
365 |
+ return DDI_CLK_SEL_TBT_810; |
366 |
+ default: |
367 |
+ MISSING_CASE(clock); |
368 |
+- break; |
369 |
++ return DDI_CLK_SEL_NONE; |
370 |
+ } |
371 |
+ case DPLL_ID_ICL_MGPLL1: |
372 |
+ case DPLL_ID_ICL_MGPLL2: |
373 |
+diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c |
374 |
+index bb6dbbe18835..c72b942f2bdf 100644 |
375 |
+--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c |
376 |
++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c |
377 |
+@@ -627,13 +627,16 @@ out_fixup: |
378 |
+ static int vmw_dma_masks(struct vmw_private *dev_priv) |
379 |
+ { |
380 |
+ struct drm_device *dev = dev_priv->dev; |
381 |
++ int ret = 0; |
382 |
+ |
383 |
+- if (intel_iommu_enabled && |
384 |
++ ret = dma_set_mask_and_coherent(dev->dev, DMA_BIT_MASK(64)); |
385 |
++ if (dev_priv->map_mode != vmw_dma_phys && |
386 |
+ (sizeof(unsigned long) == 4 || vmw_restrict_dma_mask)) { |
387 |
+ DRM_INFO("Restricting DMA addresses to 44 bits.\n"); |
388 |
+- return dma_set_mask(dev->dev, DMA_BIT_MASK(44)); |
389 |
++ return dma_set_mask_and_coherent(dev->dev, DMA_BIT_MASK(44)); |
390 |
+ } |
391 |
+- return 0; |
392 |
++ |
393 |
++ return ret; |
394 |
+ } |
395 |
+ #else |
396 |
+ static int vmw_dma_masks(struct vmw_private *dev_priv) |
397 |
+diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c |
398 |
+index f0ab6b2313bb..c3e2022bda5d 100644 |
399 |
+--- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c |
400 |
++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c |
401 |
+@@ -3843,7 +3843,7 @@ int vmw_execbuf_fence_commands(struct drm_file *file_priv, |
402 |
+ *p_fence = NULL; |
403 |
+ } |
404 |
+ |
405 |
+- return 0; |
406 |
++ return ret; |
407 |
+ } |
408 |
+ |
409 |
+ /** |
410 |
+diff --git a/drivers/iio/adc/axp288_adc.c b/drivers/iio/adc/axp288_adc.c |
411 |
+index 031d568b4972..4e339cfd0c54 100644 |
412 |
+--- a/drivers/iio/adc/axp288_adc.c |
413 |
++++ b/drivers/iio/adc/axp288_adc.c |
414 |
+@@ -27,9 +27,18 @@ |
415 |
+ #include <linux/iio/machine.h> |
416 |
+ #include <linux/iio/driver.h> |
417 |
+ |
418 |
+-#define AXP288_ADC_EN_MASK 0xF1 |
419 |
+-#define AXP288_ADC_TS_PIN_GPADC 0xF2 |
420 |
+-#define AXP288_ADC_TS_PIN_ON 0xF3 |
421 |
++/* |
422 |
++ * This mask enables all ADCs except for the battery temp-sensor (TS), that is |
423 |
++ * left as-is to avoid breaking charging on devices without a temp-sensor. |
424 |
++ */ |
425 |
++#define AXP288_ADC_EN_MASK 0xF0 |
426 |
++#define AXP288_ADC_TS_ENABLE 0x01 |
427 |
++ |
428 |
++#define AXP288_ADC_TS_CURRENT_ON_OFF_MASK GENMASK(1, 0) |
429 |
++#define AXP288_ADC_TS_CURRENT_OFF (0 << 0) |
430 |
++#define AXP288_ADC_TS_CURRENT_ON_WHEN_CHARGING (1 << 0) |
431 |
++#define AXP288_ADC_TS_CURRENT_ON_ONDEMAND (2 << 0) |
432 |
++#define AXP288_ADC_TS_CURRENT_ON (3 << 0) |
433 |
+ |
434 |
+ enum axp288_adc_id { |
435 |
+ AXP288_ADC_TS, |
436 |
+@@ -44,6 +53,7 @@ enum axp288_adc_id { |
437 |
+ struct axp288_adc_info { |
438 |
+ int irq; |
439 |
+ struct regmap *regmap; |
440 |
++ bool ts_enabled; |
441 |
+ }; |
442 |
+ |
443 |
+ static const struct iio_chan_spec axp288_adc_channels[] = { |
444 |
+@@ -115,21 +125,33 @@ static int axp288_adc_read_channel(int *val, unsigned long address, |
445 |
+ return IIO_VAL_INT; |
446 |
+ } |
447 |
+ |
448 |
+-static int axp288_adc_set_ts(struct regmap *regmap, unsigned int mode, |
449 |
+- unsigned long address) |
450 |
++/* |
451 |
++ * The current-source used for the battery temp-sensor (TS) is shared |
452 |
++ * with the GPADC. For proper fuel-gauge and charger operation the TS |
453 |
++ * current-source needs to be permanently on. But to read the GPADC we |
454 |
++ * need to temporary switch the TS current-source to ondemand, so that |
455 |
++ * the GPADC can use it, otherwise we will always read an all 0 value. |
456 |
++ */ |
457 |
++static int axp288_adc_set_ts(struct axp288_adc_info *info, |
458 |
++ unsigned int mode, unsigned long address) |
459 |
+ { |
460 |
+ int ret; |
461 |
+ |
462 |
+- /* channels other than GPADC do not need to switch TS pin */ |
463 |
++ /* No need to switch the current-source if the TS pin is disabled */ |
464 |
++ if (!info->ts_enabled) |
465 |
++ return 0; |
466 |
++ |
467 |
++ /* Channels other than GPADC do not need the current source */ |
468 |
+ if (address != AXP288_GP_ADC_H) |
469 |
+ return 0; |
470 |
+ |
471 |
+- ret = regmap_write(regmap, AXP288_ADC_TS_PIN_CTRL, mode); |
472 |
++ ret = regmap_update_bits(info->regmap, AXP288_ADC_TS_PIN_CTRL, |
473 |
++ AXP288_ADC_TS_CURRENT_ON_OFF_MASK, mode); |
474 |
+ if (ret) |
475 |
+ return ret; |
476 |
+ |
477 |
+ /* When switching to the GPADC pin give things some time to settle */ |
478 |
+- if (mode == AXP288_ADC_TS_PIN_GPADC) |
479 |
++ if (mode == AXP288_ADC_TS_CURRENT_ON_ONDEMAND) |
480 |
+ usleep_range(6000, 10000); |
481 |
+ |
482 |
+ return 0; |
483 |
+@@ -145,14 +167,14 @@ static int axp288_adc_read_raw(struct iio_dev *indio_dev, |
484 |
+ mutex_lock(&indio_dev->mlock); |
485 |
+ switch (mask) { |
486 |
+ case IIO_CHAN_INFO_RAW: |
487 |
+- if (axp288_adc_set_ts(info->regmap, AXP288_ADC_TS_PIN_GPADC, |
488 |
++ if (axp288_adc_set_ts(info, AXP288_ADC_TS_CURRENT_ON_ONDEMAND, |
489 |
+ chan->address)) { |
490 |
+ dev_err(&indio_dev->dev, "GPADC mode\n"); |
491 |
+ ret = -EINVAL; |
492 |
+ break; |
493 |
+ } |
494 |
+ ret = axp288_adc_read_channel(val, chan->address, info->regmap); |
495 |
+- if (axp288_adc_set_ts(info->regmap, AXP288_ADC_TS_PIN_ON, |
496 |
++ if (axp288_adc_set_ts(info, AXP288_ADC_TS_CURRENT_ON, |
497 |
+ chan->address)) |
498 |
+ dev_err(&indio_dev->dev, "TS pin restore\n"); |
499 |
+ break; |
500 |
+@@ -164,13 +186,35 @@ static int axp288_adc_read_raw(struct iio_dev *indio_dev, |
501 |
+ return ret; |
502 |
+ } |
503 |
+ |
504 |
+-static int axp288_adc_set_state(struct regmap *regmap) |
505 |
++static int axp288_adc_initialize(struct axp288_adc_info *info) |
506 |
+ { |
507 |
+- /* ADC should be always enabled for internal FG to function */ |
508 |
+- if (regmap_write(regmap, AXP288_ADC_TS_PIN_CTRL, AXP288_ADC_TS_PIN_ON)) |
509 |
+- return -EIO; |
510 |
++ int ret, adc_enable_val; |
511 |
++ |
512 |
++ /* |
513 |
++ * Determine if the TS pin is enabled and set the TS current-source |
514 |
++ * accordingly. |
515 |
++ */ |
516 |
++ ret = regmap_read(info->regmap, AXP20X_ADC_EN1, &adc_enable_val); |
517 |
++ if (ret) |
518 |
++ return ret; |
519 |
++ |
520 |
++ if (adc_enable_val & AXP288_ADC_TS_ENABLE) { |
521 |
++ info->ts_enabled = true; |
522 |
++ ret = regmap_update_bits(info->regmap, AXP288_ADC_TS_PIN_CTRL, |
523 |
++ AXP288_ADC_TS_CURRENT_ON_OFF_MASK, |
524 |
++ AXP288_ADC_TS_CURRENT_ON); |
525 |
++ } else { |
526 |
++ info->ts_enabled = false; |
527 |
++ ret = regmap_update_bits(info->regmap, AXP288_ADC_TS_PIN_CTRL, |
528 |
++ AXP288_ADC_TS_CURRENT_ON_OFF_MASK, |
529 |
++ AXP288_ADC_TS_CURRENT_OFF); |
530 |
++ } |
531 |
++ if (ret) |
532 |
++ return ret; |
533 |
+ |
534 |
+- return regmap_write(regmap, AXP20X_ADC_EN1, AXP288_ADC_EN_MASK); |
535 |
++ /* Turn on the ADC for all channels except TS, leave TS as is */ |
536 |
++ return regmap_update_bits(info->regmap, AXP20X_ADC_EN1, |
537 |
++ AXP288_ADC_EN_MASK, AXP288_ADC_EN_MASK); |
538 |
+ } |
539 |
+ |
540 |
+ static const struct iio_info axp288_adc_iio_info = { |
541 |
+@@ -200,7 +244,7 @@ static int axp288_adc_probe(struct platform_device *pdev) |
542 |
+ * Set ADC to enabled state at all time, including system suspend. |
543 |
+ * otherwise internal fuel gauge functionality may be affected. |
544 |
+ */ |
545 |
+- ret = axp288_adc_set_state(axp20x->regmap); |
546 |
++ ret = axp288_adc_initialize(info); |
547 |
+ if (ret) { |
548 |
+ dev_err(&pdev->dev, "unable to enable ADC device\n"); |
549 |
+ return ret; |
550 |
+diff --git a/drivers/iio/adc/ti-ads8688.c b/drivers/iio/adc/ti-ads8688.c |
551 |
+index 184d686ebd99..8b4568edd5cb 100644 |
552 |
+--- a/drivers/iio/adc/ti-ads8688.c |
553 |
++++ b/drivers/iio/adc/ti-ads8688.c |
554 |
+@@ -41,6 +41,7 @@ |
555 |
+ |
556 |
+ #define ADS8688_VREF_MV 4096 |
557 |
+ #define ADS8688_REALBITS 16 |
558 |
++#define ADS8688_MAX_CHANNELS 8 |
559 |
+ |
560 |
+ /* |
561 |
+ * enum ads8688_range - ADS8688 reference voltage range |
562 |
+@@ -385,7 +386,7 @@ static irqreturn_t ads8688_trigger_handler(int irq, void *p) |
563 |
+ { |
564 |
+ struct iio_poll_func *pf = p; |
565 |
+ struct iio_dev *indio_dev = pf->indio_dev; |
566 |
+- u16 buffer[8]; |
567 |
++ u16 buffer[ADS8688_MAX_CHANNELS + sizeof(s64)/sizeof(u16)]; |
568 |
+ int i, j = 0; |
569 |
+ |
570 |
+ for (i = 0; i < indio_dev->masklength; i++) { |
571 |
+diff --git a/drivers/iio/chemical/atlas-ph-sensor.c b/drivers/iio/chemical/atlas-ph-sensor.c |
572 |
+index a406ad31b096..3a20cb5d9bff 100644 |
573 |
+--- a/drivers/iio/chemical/atlas-ph-sensor.c |
574 |
++++ b/drivers/iio/chemical/atlas-ph-sensor.c |
575 |
+@@ -444,9 +444,8 @@ static int atlas_read_raw(struct iio_dev *indio_dev, |
576 |
+ case IIO_CHAN_INFO_SCALE: |
577 |
+ switch (chan->type) { |
578 |
+ case IIO_TEMP: |
579 |
+- *val = 1; /* 0.01 */ |
580 |
+- *val2 = 100; |
581 |
+- break; |
582 |
++ *val = 10; |
583 |
++ return IIO_VAL_INT; |
584 |
+ case IIO_PH: |
585 |
+ *val = 1; /* 0.001 */ |
586 |
+ *val2 = 1000; |
587 |
+@@ -477,7 +476,7 @@ static int atlas_write_raw(struct iio_dev *indio_dev, |
588 |
+ int val, int val2, long mask) |
589 |
+ { |
590 |
+ struct atlas_data *data = iio_priv(indio_dev); |
591 |
+- __be32 reg = cpu_to_be32(val); |
592 |
++ __be32 reg = cpu_to_be32(val / 10); |
593 |
+ |
594 |
+ if (val2 != 0 || val < 0 || val > 20000) |
595 |
+ return -EINVAL; |
596 |
+diff --git a/drivers/misc/mei/hw-me-regs.h b/drivers/misc/mei/hw-me-regs.h |
597 |
+index 23739a60517f..bb1ee9834a02 100644 |
598 |
+--- a/drivers/misc/mei/hw-me-regs.h |
599 |
++++ b/drivers/misc/mei/hw-me-regs.h |
600 |
+@@ -139,6 +139,8 @@ |
601 |
+ #define MEI_DEV_ID_CNP_H 0xA360 /* Cannon Point H */ |
602 |
+ #define MEI_DEV_ID_CNP_H_4 0xA364 /* Cannon Point H 4 (iTouch) */ |
603 |
+ |
604 |
++#define MEI_DEV_ID_ICP_LP 0x34E0 /* Ice Lake Point LP */ |
605 |
++ |
606 |
+ /* |
607 |
+ * MEI HW Section |
608 |
+ */ |
609 |
+diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c |
610 |
+index c8e21c894a5f..4299658d48d6 100644 |
611 |
+--- a/drivers/misc/mei/pci-me.c |
612 |
++++ b/drivers/misc/mei/pci-me.c |
613 |
+@@ -105,6 +105,8 @@ static const struct pci_device_id mei_me_pci_tbl[] = { |
614 |
+ {MEI_PCI_DEVICE(MEI_DEV_ID_CNP_H, MEI_ME_PCH8_CFG)}, |
615 |
+ {MEI_PCI_DEVICE(MEI_DEV_ID_CNP_H_4, MEI_ME_PCH8_CFG)}, |
616 |
+ |
617 |
++ {MEI_PCI_DEVICE(MEI_DEV_ID_ICP_LP, MEI_ME_PCH12_CFG)}, |
618 |
++ |
619 |
+ /* required last entry */ |
620 |
+ {0, } |
621 |
+ }; |
622 |
+diff --git a/drivers/misc/mic/vop/vop_main.c b/drivers/misc/mic/vop/vop_main.c |
623 |
+index 3633202e18f4..de7f035a176d 100644 |
624 |
+--- a/drivers/misc/mic/vop/vop_main.c |
625 |
++++ b/drivers/misc/mic/vop/vop_main.c |
626 |
+@@ -563,6 +563,8 @@ static int _vop_remove_device(struct mic_device_desc __iomem *d, |
627 |
+ int ret = -1; |
628 |
+ |
629 |
+ if (ioread8(&dc->config_change) == MIC_VIRTIO_PARAM_DEV_REMOVE) { |
630 |
++ struct device *dev = get_device(&vdev->vdev.dev); |
631 |
++ |
632 |
+ dev_dbg(&vpdev->dev, |
633 |
+ "%s %d config_change %d type %d vdev %p\n", |
634 |
+ __func__, __LINE__, |
635 |
+@@ -574,7 +576,7 @@ static int _vop_remove_device(struct mic_device_desc __iomem *d, |
636 |
+ iowrite8(-1, &dc->h2c_vdev_db); |
637 |
+ if (status & VIRTIO_CONFIG_S_DRIVER_OK) |
638 |
+ wait_for_completion(&vdev->reset_done); |
639 |
+- put_device(&vdev->vdev.dev); |
640 |
++ put_device(dev); |
641 |
+ iowrite8(1, &dc->guest_ack); |
642 |
+ dev_dbg(&vpdev->dev, "%s %d guest_ack %d\n", |
643 |
+ __func__, __LINE__, ioread8(&dc->guest_ack)); |
644 |
+diff --git a/drivers/misc/vexpress-syscfg.c b/drivers/misc/vexpress-syscfg.c |
645 |
+index 6c3591cdf855..a3c6c773d9dc 100644 |
646 |
+--- a/drivers/misc/vexpress-syscfg.c |
647 |
++++ b/drivers/misc/vexpress-syscfg.c |
648 |
+@@ -61,7 +61,7 @@ static int vexpress_syscfg_exec(struct vexpress_syscfg_func *func, |
649 |
+ int tries; |
650 |
+ long timeout; |
651 |
+ |
652 |
+- if (WARN_ON(index > func->num_templates)) |
653 |
++ if (WARN_ON(index >= func->num_templates)) |
654 |
+ return -EINVAL; |
655 |
+ |
656 |
+ command = readl(syscfg->base + SYS_CFGCTRL); |
657 |
+diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c |
658 |
+index 99c460facd5e..0bbb23b014f1 100644 |
659 |
+--- a/drivers/mtd/mtdpart.c |
660 |
++++ b/drivers/mtd/mtdpart.c |
661 |
+@@ -470,6 +470,10 @@ static struct mtd_part *allocate_partition(struct mtd_info *parent, |
662 |
+ /* let's register it anyway to preserve ordering */ |
663 |
+ slave->offset = 0; |
664 |
+ slave->mtd.size = 0; |
665 |
++ |
666 |
++ /* Initialize ->erasesize to make add_mtd_device() happy. */ |
667 |
++ slave->mtd.erasesize = parent->erasesize; |
668 |
++ |
669 |
+ printk(KERN_ERR"mtd: partition \"%s\" is out of reach -- disabled\n", |
670 |
+ part->name); |
671 |
+ goto out_register; |
672 |
+diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c b/drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c |
673 |
+index 88ea2203e263..322a008290e5 100644 |
674 |
+--- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c |
675 |
++++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c |
676 |
+@@ -155,9 +155,10 @@ int gpmi_init(struct gpmi_nand_data *this) |
677 |
+ |
678 |
+ /* |
679 |
+ * Reset BCH here, too. We got failures otherwise :( |
680 |
+- * See later BCH reset for explanation of MX23 handling |
681 |
++ * See later BCH reset for explanation of MX23 and MX28 handling |
682 |
+ */ |
683 |
+- ret = gpmi_reset_block(r->bch_regs, GPMI_IS_MX23(this)); |
684 |
++ ret = gpmi_reset_block(r->bch_regs, |
685 |
++ GPMI_IS_MX23(this) || GPMI_IS_MX28(this)); |
686 |
+ if (ret) |
687 |
+ goto err_out; |
688 |
+ |
689 |
+@@ -263,12 +264,10 @@ int bch_set_geometry(struct gpmi_nand_data *this) |
690 |
+ /* |
691 |
+ * Due to erratum #2847 of the MX23, the BCH cannot be soft reset on this |
692 |
+ * chip, otherwise it will lock up. So we skip resetting BCH on the MX23. |
693 |
+- * On the other hand, the MX28 needs the reset, because one case has been |
694 |
+- * seen where the BCH produced ECC errors constantly after 10000 |
695 |
+- * consecutive reboots. The latter case has not been seen on the MX23 |
696 |
+- * yet, still we don't know if it could happen there as well. |
697 |
++ * and MX28. |
698 |
+ */ |
699 |
+- ret = gpmi_reset_block(r->bch_regs, GPMI_IS_MX23(this)); |
700 |
++ ret = gpmi_reset_block(r->bch_regs, |
701 |
++ GPMI_IS_MX23(this) || GPMI_IS_MX28(this)); |
702 |
+ if (ret) |
703 |
+ goto err_out; |
704 |
+ |
705 |
+diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c |
706 |
+index 30f83649c481..8c7bf91ce4e1 100644 |
707 |
+--- a/drivers/mtd/nand/spi/core.c |
708 |
++++ b/drivers/mtd/nand/spi/core.c |
709 |
+@@ -304,24 +304,30 @@ static int spinand_write_to_cache_op(struct spinand_device *spinand, |
710 |
+ struct nand_device *nand = spinand_to_nand(spinand); |
711 |
+ struct mtd_info *mtd = nanddev_to_mtd(nand); |
712 |
+ struct nand_page_io_req adjreq = *req; |
713 |
+- unsigned int nbytes = 0; |
714 |
+- void *buf = NULL; |
715 |
++ void *buf = spinand->databuf; |
716 |
++ unsigned int nbytes; |
717 |
+ u16 column = 0; |
718 |
+ int ret; |
719 |
+ |
720 |
+- memset(spinand->databuf, 0xff, |
721 |
+- nanddev_page_size(nand) + |
722 |
+- nanddev_per_page_oobsize(nand)); |
723 |
++ /* |
724 |
++ * Looks like PROGRAM LOAD (AKA write cache) does not necessarily reset |
725 |
++ * the cache content to 0xFF (depends on vendor implementation), so we |
726 |
++ * must fill the page cache entirely even if we only want to program |
727 |
++ * the data portion of the page, otherwise we might corrupt the BBM or |
728 |
++ * user data previously programmed in OOB area. |
729 |
++ */ |
730 |
++ nbytes = nanddev_page_size(nand) + nanddev_per_page_oobsize(nand); |
731 |
++ memset(spinand->databuf, 0xff, nbytes); |
732 |
++ adjreq.dataoffs = 0; |
733 |
++ adjreq.datalen = nanddev_page_size(nand); |
734 |
++ adjreq.databuf.out = spinand->databuf; |
735 |
++ adjreq.ooblen = nanddev_per_page_oobsize(nand); |
736 |
++ adjreq.ooboffs = 0; |
737 |
++ adjreq.oobbuf.out = spinand->oobbuf; |
738 |
+ |
739 |
+- if (req->datalen) { |
740 |
++ if (req->datalen) |
741 |
+ memcpy(spinand->databuf + req->dataoffs, req->databuf.out, |
742 |
+ req->datalen); |
743 |
+- adjreq.dataoffs = 0; |
744 |
+- adjreq.datalen = nanddev_page_size(nand); |
745 |
+- adjreq.databuf.out = spinand->databuf; |
746 |
+- nbytes = adjreq.datalen; |
747 |
+- buf = spinand->databuf; |
748 |
+- } |
749 |
+ |
750 |
+ if (req->ooblen) { |
751 |
+ if (req->mode == MTD_OPS_AUTO_OOB) |
752 |
+@@ -332,14 +338,6 @@ static int spinand_write_to_cache_op(struct spinand_device *spinand, |
753 |
+ else |
754 |
+ memcpy(spinand->oobbuf + req->ooboffs, req->oobbuf.out, |
755 |
+ req->ooblen); |
756 |
+- |
757 |
+- adjreq.ooblen = nanddev_per_page_oobsize(nand); |
758 |
+- adjreq.ooboffs = 0; |
759 |
+- nbytes += nanddev_per_page_oobsize(nand); |
760 |
+- if (!buf) { |
761 |
+- buf = spinand->oobbuf; |
762 |
+- column = nanddev_page_size(nand); |
763 |
+- } |
764 |
+ } |
765 |
+ |
766 |
+ spinand_cache_op_adjust_colum(spinand, &adjreq, &column); |
767 |
+@@ -370,8 +368,8 @@ static int spinand_write_to_cache_op(struct spinand_device *spinand, |
768 |
+ |
769 |
+ /* |
770 |
+ * We need to use the RANDOM LOAD CACHE operation if there's |
771 |
+- * more than one iteration, because the LOAD operation resets |
772 |
+- * the cache to 0xff. |
773 |
++ * more than one iteration, because the LOAD operation might |
774 |
++ * reset the cache to 0xff. |
775 |
+ */ |
776 |
+ if (nbytes) { |
777 |
+ column = op.addr.val; |
778 |
+@@ -1016,11 +1014,11 @@ static int spinand_init(struct spinand_device *spinand) |
779 |
+ for (i = 0; i < nand->memorg.ntargets; i++) { |
780 |
+ ret = spinand_select_target(spinand, i); |
781 |
+ if (ret) |
782 |
+- goto err_free_bufs; |
783 |
++ goto err_manuf_cleanup; |
784 |
+ |
785 |
+ ret = spinand_lock_block(spinand, BL_ALL_UNLOCKED); |
786 |
+ if (ret) |
787 |
+- goto err_free_bufs; |
788 |
++ goto err_manuf_cleanup; |
789 |
+ } |
790 |
+ |
791 |
+ ret = nanddev_init(nand, &spinand_ops, THIS_MODULE); |
792 |
+diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c |
793 |
+index 6d31ad799987..b7e272d6ae81 100644 |
794 |
+--- a/drivers/pinctrl/intel/pinctrl-cherryview.c |
795 |
++++ b/drivers/pinctrl/intel/pinctrl-cherryview.c |
796 |
+@@ -1524,7 +1524,7 @@ static const struct dmi_system_id chv_no_valid_mask[] = { |
797 |
+ .matches = { |
798 |
+ DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"), |
799 |
+ DMI_MATCH(DMI_PRODUCT_FAMILY, "Intel_Strago"), |
800 |
+- DMI_MATCH(DMI_BOARD_VERSION, "1.0"), |
801 |
++ DMI_MATCH(DMI_PRODUCT_VERSION, "1.0"), |
802 |
+ }, |
803 |
+ }, |
804 |
+ { |
805 |
+@@ -1532,7 +1532,7 @@ static const struct dmi_system_id chv_no_valid_mask[] = { |
806 |
+ .matches = { |
807 |
+ DMI_MATCH(DMI_SYS_VENDOR, "HP"), |
808 |
+ DMI_MATCH(DMI_PRODUCT_NAME, "Setzer"), |
809 |
+- DMI_MATCH(DMI_BOARD_VERSION, "1.0"), |
810 |
++ DMI_MATCH(DMI_PRODUCT_VERSION, "1.0"), |
811 |
+ }, |
812 |
+ }, |
813 |
+ { |
814 |
+@@ -1540,7 +1540,7 @@ static const struct dmi_system_id chv_no_valid_mask[] = { |
815 |
+ .matches = { |
816 |
+ DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"), |
817 |
+ DMI_MATCH(DMI_PRODUCT_NAME, "Cyan"), |
818 |
+- DMI_MATCH(DMI_BOARD_VERSION, "1.0"), |
819 |
++ DMI_MATCH(DMI_PRODUCT_VERSION, "1.0"), |
820 |
+ }, |
821 |
+ }, |
822 |
+ { |
823 |
+@@ -1548,7 +1548,7 @@ static const struct dmi_system_id chv_no_valid_mask[] = { |
824 |
+ .matches = { |
825 |
+ DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"), |
826 |
+ DMI_MATCH(DMI_PRODUCT_NAME, "Celes"), |
827 |
+- DMI_MATCH(DMI_BOARD_VERSION, "1.0"), |
828 |
++ DMI_MATCH(DMI_PRODUCT_VERSION, "1.0"), |
829 |
+ }, |
830 |
+ }, |
831 |
+ {} |
832 |
+diff --git a/drivers/pinctrl/sunxi/pinctrl-sun50i-h6.c b/drivers/pinctrl/sunxi/pinctrl-sun50i-h6.c |
833 |
+index aa8b58125568..ef4268cc6227 100644 |
834 |
+--- a/drivers/pinctrl/sunxi/pinctrl-sun50i-h6.c |
835 |
++++ b/drivers/pinctrl/sunxi/pinctrl-sun50i-h6.c |
836 |
+@@ -588,7 +588,7 @@ static const unsigned int h6_irq_bank_map[] = { 1, 5, 6, 7 }; |
837 |
+ static const struct sunxi_pinctrl_desc h6_pinctrl_data = { |
838 |
+ .pins = h6_pins, |
839 |
+ .npins = ARRAY_SIZE(h6_pins), |
840 |
+- .irq_banks = 3, |
841 |
++ .irq_banks = 4, |
842 |
+ .irq_bank_map = h6_irq_bank_map, |
843 |
+ .irq_read_needs_mux = true, |
844 |
+ }; |
845 |
+diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c |
846 |
+index 13b01351dd1c..41ef452c1fcf 100644 |
847 |
+--- a/fs/debugfs/inode.c |
848 |
++++ b/fs/debugfs/inode.c |
849 |
+@@ -787,6 +787,13 @@ struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, |
850 |
+ struct dentry *dentry = NULL, *trap; |
851 |
+ struct name_snapshot old_name; |
852 |
+ |
853 |
++ if (IS_ERR(old_dir)) |
854 |
++ return old_dir; |
855 |
++ if (IS_ERR(new_dir)) |
856 |
++ return new_dir; |
857 |
++ if (IS_ERR_OR_NULL(old_dentry)) |
858 |
++ return old_dentry; |
859 |
++ |
860 |
+ trap = lock_rename(new_dir, old_dir); |
861 |
+ /* Source or destination directories don't exist? */ |
862 |
+ if (d_really_is_negative(old_dir) || d_really_is_negative(new_dir)) |
863 |
+diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c |
864 |
+index 712f00995390..5508baa11bb6 100644 |
865 |
+--- a/fs/ext4/fsync.c |
866 |
++++ b/fs/ext4/fsync.c |
867 |
+@@ -116,16 +116,8 @@ int ext4_sync_file(struct file *file, loff_t start, loff_t end, int datasync) |
868 |
+ goto out; |
869 |
+ } |
870 |
+ |
871 |
+- ret = file_write_and_wait_range(file, start, end); |
872 |
+- if (ret) |
873 |
+- return ret; |
874 |
+- |
875 |
+ if (!journal) { |
876 |
+- struct writeback_control wbc = { |
877 |
+- .sync_mode = WB_SYNC_ALL |
878 |
+- }; |
879 |
+- |
880 |
+- ret = ext4_write_inode(inode, &wbc); |
881 |
++ ret = __generic_file_fsync(file, start, end, datasync); |
882 |
+ if (!ret) |
883 |
+ ret = ext4_sync_parent(inode); |
884 |
+ if (test_opt(inode->i_sb, BARRIER)) |
885 |
+@@ -133,6 +125,9 @@ int ext4_sync_file(struct file *file, loff_t start, loff_t end, int datasync) |
886 |
+ goto out; |
887 |
+ } |
888 |
+ |
889 |
++ ret = file_write_and_wait_range(file, start, end); |
890 |
++ if (ret) |
891 |
++ return ret; |
892 |
+ /* |
893 |
+ * data=writeback,ordered: |
894 |
+ * The caller's filemap_fdatawrite()/wait will sync the data. |
895 |
+diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h |
896 |
+index 336fd1a19cca..f30bf500888d 100644 |
897 |
+--- a/include/linux/sunrpc/xprt.h |
898 |
++++ b/include/linux/sunrpc/xprt.h |
899 |
+@@ -443,6 +443,11 @@ static inline int xprt_test_and_set_connecting(struct rpc_xprt *xprt) |
900 |
+ return test_and_set_bit(XPRT_CONNECTING, &xprt->state); |
901 |
+ } |
902 |
+ |
903 |
++static inline int xprt_close_wait(struct rpc_xprt *xprt) |
904 |
++{ |
905 |
++ return test_bit(XPRT_CLOSE_WAIT, &xprt->state); |
906 |
++} |
907 |
++ |
908 |
+ static inline void xprt_set_bound(struct rpc_xprt *xprt) |
909 |
+ { |
910 |
+ test_and_set_bit(XPRT_BOUND, &xprt->state); |
911 |
+diff --git a/kernel/signal.c b/kernel/signal.c |
912 |
+index edc28afc9fb4..c187def3dba6 100644 |
913 |
+--- a/kernel/signal.c |
914 |
++++ b/kernel/signal.c |
915 |
+@@ -681,6 +681,48 @@ int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info) |
916 |
+ return signr; |
917 |
+ } |
918 |
+ |
919 |
++static int dequeue_synchronous_signal(siginfo_t *info) |
920 |
++{ |
921 |
++ struct task_struct *tsk = current; |
922 |
++ struct sigpending *pending = &tsk->pending; |
923 |
++ struct sigqueue *q, *sync = NULL; |
924 |
++ |
925 |
++ /* |
926 |
++ * Might a synchronous signal be in the queue? |
927 |
++ */ |
928 |
++ if (!((pending->signal.sig[0] & ~tsk->blocked.sig[0]) & SYNCHRONOUS_MASK)) |
929 |
++ return 0; |
930 |
++ |
931 |
++ /* |
932 |
++ * Return the first synchronous signal in the queue. |
933 |
++ */ |
934 |
++ list_for_each_entry(q, &pending->list, list) { |
935 |
++ /* Synchronous signals have a postive si_code */ |
936 |
++ if ((q->info.si_code > SI_USER) && |
937 |
++ (sigmask(q->info.si_signo) & SYNCHRONOUS_MASK)) { |
938 |
++ sync = q; |
939 |
++ goto next; |
940 |
++ } |
941 |
++ } |
942 |
++ return 0; |
943 |
++next: |
944 |
++ /* |
945 |
++ * Check if there is another siginfo for the same signal. |
946 |
++ */ |
947 |
++ list_for_each_entry_continue(q, &pending->list, list) { |
948 |
++ if (q->info.si_signo == sync->info.si_signo) |
949 |
++ goto still_pending; |
950 |
++ } |
951 |
++ |
952 |
++ sigdelset(&pending->signal, sync->info.si_signo); |
953 |
++ recalc_sigpending(); |
954 |
++still_pending: |
955 |
++ list_del_init(&sync->list); |
956 |
++ copy_siginfo(info, &sync->info); |
957 |
++ __sigqueue_free(sync); |
958 |
++ return info->si_signo; |
959 |
++} |
960 |
++ |
961 |
+ /* |
962 |
+ * Tell a process that it has a new active signal.. |
963 |
+ * |
964 |
+@@ -2390,6 +2432,11 @@ relock: |
965 |
+ goto relock; |
966 |
+ } |
967 |
+ |
968 |
++ /* Has this task already been marked for death? */ |
969 |
++ ksig->info.si_signo = signr = SIGKILL; |
970 |
++ if (signal_group_exit(signal)) |
971 |
++ goto fatal; |
972 |
++ |
973 |
+ for (;;) { |
974 |
+ struct k_sigaction *ka; |
975 |
+ |
976 |
+@@ -2403,7 +2450,15 @@ relock: |
977 |
+ goto relock; |
978 |
+ } |
979 |
+ |
980 |
+- signr = dequeue_signal(current, ¤t->blocked, &ksig->info); |
981 |
++ /* |
982 |
++ * Signals generated by the execution of an instruction |
983 |
++ * need to be delivered before any other pending signals |
984 |
++ * so that the instruction pointer in the signal stack |
985 |
++ * frame points to the faulting instruction. |
986 |
++ */ |
987 |
++ signr = dequeue_synchronous_signal(&ksig->info); |
988 |
++ if (!signr) |
989 |
++ signr = dequeue_signal(current, ¤t->blocked, &ksig->info); |
990 |
+ |
991 |
+ if (!signr) |
992 |
+ break; /* will return 0 */ |
993 |
+@@ -2485,6 +2540,7 @@ relock: |
994 |
+ continue; |
995 |
+ } |
996 |
+ |
997 |
++ fatal: |
998 |
+ spin_unlock_irq(&sighand->siglock); |
999 |
+ |
1000 |
+ /* |
1001 |
+diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c |
1002 |
+index e696667da29a..a6aebbc848fe 100644 |
1003 |
+--- a/kernel/trace/trace_uprobe.c |
1004 |
++++ b/kernel/trace/trace_uprobe.c |
1005 |
+@@ -5,7 +5,7 @@ |
1006 |
+ * Copyright (C) IBM Corporation, 2010-2012 |
1007 |
+ * Author: Srikar Dronamraju <srikar@××××××××××××××.com> |
1008 |
+ */ |
1009 |
+-#define pr_fmt(fmt) "trace_kprobe: " fmt |
1010 |
++#define pr_fmt(fmt) "trace_uprobe: " fmt |
1011 |
+ |
1012 |
+ #include <linux/module.h> |
1013 |
+ #include <linux/uaccess.h> |
1014 |
+diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c |
1015 |
+index 2f0d42f2f913..08690d06b7be 100644 |
1016 |
+--- a/net/batman-adv/hard-interface.c |
1017 |
++++ b/net/batman-adv/hard-interface.c |
1018 |
+@@ -20,7 +20,6 @@ |
1019 |
+ #include "main.h" |
1020 |
+ |
1021 |
+ #include <linux/atomic.h> |
1022 |
+-#include <linux/bug.h> |
1023 |
+ #include <linux/byteorder/generic.h> |
1024 |
+ #include <linux/errno.h> |
1025 |
+ #include <linux/gfp.h> |
1026 |
+@@ -179,8 +178,10 @@ static bool batadv_is_on_batman_iface(const struct net_device *net_dev) |
1027 |
+ parent_dev = __dev_get_by_index((struct net *)parent_net, |
1028 |
+ dev_get_iflink(net_dev)); |
1029 |
+ /* if we got a NULL parent_dev there is something broken.. */ |
1030 |
+- if (WARN(!parent_dev, "Cannot find parent device")) |
1031 |
++ if (!parent_dev) { |
1032 |
++ pr_err("Cannot find parent device\n"); |
1033 |
+ return false; |
1034 |
++ } |
1035 |
+ |
1036 |
+ if (batadv_mutual_parents(net_dev, net, parent_dev, parent_net)) |
1037 |
+ return false; |
1038 |
+diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c |
1039 |
+index 626ddca332db..3899fa6e201d 100644 |
1040 |
+--- a/net/batman-adv/soft-interface.c |
1041 |
++++ b/net/batman-adv/soft-interface.c |
1042 |
+@@ -221,6 +221,8 @@ static netdev_tx_t batadv_interface_tx(struct sk_buff *skb, |
1043 |
+ |
1044 |
+ netif_trans_update(soft_iface); |
1045 |
+ vid = batadv_get_vid(skb, 0); |
1046 |
++ |
1047 |
++ skb_reset_mac_header(skb); |
1048 |
+ ethhdr = eth_hdr(skb); |
1049 |
+ |
1050 |
+ switch (ntohs(ethhdr->h_proto)) { |
1051 |
+diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c |
1052 |
+index 9a1c27c61de8..a127d1442116 100644 |
1053 |
+--- a/net/ceph/messenger.c |
1054 |
++++ b/net/ceph/messenger.c |
1055 |
+@@ -3240,9 +3240,10 @@ void ceph_con_keepalive(struct ceph_connection *con) |
1056 |
+ dout("con_keepalive %p\n", con); |
1057 |
+ mutex_lock(&con->mutex); |
1058 |
+ clear_standby(con); |
1059 |
++ con_flag_set(con, CON_FLAG_KEEPALIVE_PENDING); |
1060 |
+ mutex_unlock(&con->mutex); |
1061 |
+- if (con_flag_test_and_set(con, CON_FLAG_KEEPALIVE_PENDING) == 0 && |
1062 |
+- con_flag_test_and_set(con, CON_FLAG_WRITE_PENDING) == 0) |
1063 |
++ |
1064 |
++ if (con_flag_test_and_set(con, CON_FLAG_WRITE_PENDING) == 0) |
1065 |
+ queue_con(con); |
1066 |
+ } |
1067 |
+ EXPORT_SYMBOL(ceph_con_keepalive); |
1068 |
+diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c |
1069 |
+index 995a491f73a9..c7ccd7b71b15 100644 |
1070 |
+--- a/net/mac80211/tx.c |
1071 |
++++ b/net/mac80211/tx.c |
1072 |
+@@ -1913,9 +1913,16 @@ static int ieee80211_skb_resize(struct ieee80211_sub_if_data *sdata, |
1073 |
+ int head_need, bool may_encrypt) |
1074 |
+ { |
1075 |
+ struct ieee80211_local *local = sdata->local; |
1076 |
++ struct ieee80211_hdr *hdr; |
1077 |
++ bool enc_tailroom; |
1078 |
+ int tail_need = 0; |
1079 |
+ |
1080 |
+- if (may_encrypt && sdata->crypto_tx_tailroom_needed_cnt) { |
1081 |
++ hdr = (struct ieee80211_hdr *) skb->data; |
1082 |
++ enc_tailroom = may_encrypt && |
1083 |
++ (sdata->crypto_tx_tailroom_needed_cnt || |
1084 |
++ ieee80211_is_mgmt(hdr->frame_control)); |
1085 |
++ |
1086 |
++ if (enc_tailroom) { |
1087 |
+ tail_need = IEEE80211_ENCRYPT_TAILROOM; |
1088 |
+ tail_need -= skb_tailroom(skb); |
1089 |
+ tail_need = max_t(int, tail_need, 0); |
1090 |
+@@ -1923,8 +1930,7 @@ static int ieee80211_skb_resize(struct ieee80211_sub_if_data *sdata, |
1091 |
+ |
1092 |
+ if (skb_cloned(skb) && |
1093 |
+ (!ieee80211_hw_check(&local->hw, SUPPORTS_CLONED_SKBS) || |
1094 |
+- !skb_clone_writable(skb, ETH_HLEN) || |
1095 |
+- (may_encrypt && sdata->crypto_tx_tailroom_needed_cnt))) |
1096 |
++ !skb_clone_writable(skb, ETH_HLEN) || enc_tailroom)) |
1097 |
+ I802_DEBUG_INC(local->tx_expand_skb_head_cloned); |
1098 |
+ else if (head_need || tail_need) |
1099 |
+ I802_DEBUG_INC(local->tx_expand_skb_head); |
1100 |
+diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c |
1101 |
+index 8ea2f5fadd96..1fc812ba9871 100644 |
1102 |
+--- a/net/sunrpc/clnt.c |
1103 |
++++ b/net/sunrpc/clnt.c |
1104 |
+@@ -1992,13 +1992,15 @@ call_transmit(struct rpc_task *task) |
1105 |
+ static void |
1106 |
+ call_transmit_status(struct rpc_task *task) |
1107 |
+ { |
1108 |
++ struct rpc_xprt *xprt = task->tk_rqstp->rq_xprt; |
1109 |
+ task->tk_action = call_status; |
1110 |
+ |
1111 |
+ /* |
1112 |
+ * Common case: success. Force the compiler to put this |
1113 |
+- * test first. |
1114 |
++ * test first. Or, if any error and xprt_close_wait, |
1115 |
++ * release the xprt lock so the socket can close. |
1116 |
+ */ |
1117 |
+- if (task->tk_status == 0) { |
1118 |
++ if (task->tk_status == 0 || xprt_close_wait(xprt)) { |
1119 |
+ xprt_end_transmit(task); |
1120 |
+ rpc_task_force_reencode(task); |
1121 |
+ return; |
1122 |
+diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c |
1123 |
+index 8602a5f1b515..e8ad7ddf347a 100644 |
1124 |
+--- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c |
1125 |
++++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c |
1126 |
+@@ -563,6 +563,99 @@ void svc_rdma_sync_reply_hdr(struct svcxprt_rdma *rdma, |
1127 |
+ DMA_TO_DEVICE); |
1128 |
+ } |
1129 |
+ |
1130 |
++/* If the xdr_buf has more elements than the device can |
1131 |
++ * transmit in a single RDMA Send, then the reply will |
1132 |
++ * have to be copied into a bounce buffer. |
1133 |
++ */ |
1134 |
++static bool svc_rdma_pull_up_needed(struct svcxprt_rdma *rdma, |
1135 |
++ struct xdr_buf *xdr, |
1136 |
++ __be32 *wr_lst) |
1137 |
++{ |
1138 |
++ int elements; |
1139 |
++ |
1140 |
++ /* xdr->head */ |
1141 |
++ elements = 1; |
1142 |
++ |
1143 |
++ /* xdr->pages */ |
1144 |
++ if (!wr_lst) { |
1145 |
++ unsigned int remaining; |
1146 |
++ unsigned long pageoff; |
1147 |
++ |
1148 |
++ pageoff = xdr->page_base & ~PAGE_MASK; |
1149 |
++ remaining = xdr->page_len; |
1150 |
++ while (remaining) { |
1151 |
++ ++elements; |
1152 |
++ remaining -= min_t(u32, PAGE_SIZE - pageoff, |
1153 |
++ remaining); |
1154 |
++ pageoff = 0; |
1155 |
++ } |
1156 |
++ } |
1157 |
++ |
1158 |
++ /* xdr->tail */ |
1159 |
++ if (xdr->tail[0].iov_len) |
1160 |
++ ++elements; |
1161 |
++ |
1162 |
++ /* assume 1 SGE is needed for the transport header */ |
1163 |
++ return elements >= rdma->sc_max_send_sges; |
1164 |
++} |
1165 |
++ |
1166 |
++/* The device is not capable of sending the reply directly. |
1167 |
++ * Assemble the elements of @xdr into the transport header |
1168 |
++ * buffer. |
1169 |
++ */ |
1170 |
++static int svc_rdma_pull_up_reply_msg(struct svcxprt_rdma *rdma, |
1171 |
++ struct svc_rdma_send_ctxt *ctxt, |
1172 |
++ struct xdr_buf *xdr, __be32 *wr_lst) |
1173 |
++{ |
1174 |
++ unsigned char *dst, *tailbase; |
1175 |
++ unsigned int taillen; |
1176 |
++ |
1177 |
++ dst = ctxt->sc_xprt_buf; |
1178 |
++ dst += ctxt->sc_sges[0].length; |
1179 |
++ |
1180 |
++ memcpy(dst, xdr->head[0].iov_base, xdr->head[0].iov_len); |
1181 |
++ dst += xdr->head[0].iov_len; |
1182 |
++ |
1183 |
++ tailbase = xdr->tail[0].iov_base; |
1184 |
++ taillen = xdr->tail[0].iov_len; |
1185 |
++ if (wr_lst) { |
1186 |
++ u32 xdrpad; |
1187 |
++ |
1188 |
++ xdrpad = xdr_padsize(xdr->page_len); |
1189 |
++ if (taillen && xdrpad) { |
1190 |
++ tailbase += xdrpad; |
1191 |
++ taillen -= xdrpad; |
1192 |
++ } |
1193 |
++ } else { |
1194 |
++ unsigned int len, remaining; |
1195 |
++ unsigned long pageoff; |
1196 |
++ struct page **ppages; |
1197 |
++ |
1198 |
++ ppages = xdr->pages + (xdr->page_base >> PAGE_SHIFT); |
1199 |
++ pageoff = xdr->page_base & ~PAGE_MASK; |
1200 |
++ remaining = xdr->page_len; |
1201 |
++ while (remaining) { |
1202 |
++ len = min_t(u32, PAGE_SIZE - pageoff, remaining); |
1203 |
++ |
1204 |
++ memcpy(dst, page_address(*ppages), len); |
1205 |
++ remaining -= len; |
1206 |
++ dst += len; |
1207 |
++ pageoff = 0; |
1208 |
++ } |
1209 |
++ } |
1210 |
++ |
1211 |
++ if (taillen) |
1212 |
++ memcpy(dst, tailbase, taillen); |
1213 |
++ |
1214 |
++ ctxt->sc_sges[0].length += xdr->len; |
1215 |
++ ib_dma_sync_single_for_device(rdma->sc_pd->device, |
1216 |
++ ctxt->sc_sges[0].addr, |
1217 |
++ ctxt->sc_sges[0].length, |
1218 |
++ DMA_TO_DEVICE); |
1219 |
++ |
1220 |
++ return 0; |
1221 |
++} |
1222 |
++ |
1223 |
+ /* svc_rdma_map_reply_msg - Map the buffer holding RPC message |
1224 |
+ * @rdma: controlling transport |
1225 |
+ * @ctxt: send_ctxt for the Send WR |
1226 |
+@@ -585,8 +678,10 @@ int svc_rdma_map_reply_msg(struct svcxprt_rdma *rdma, |
1227 |
+ u32 xdr_pad; |
1228 |
+ int ret; |
1229 |
+ |
1230 |
+- if (++ctxt->sc_cur_sge_no >= rdma->sc_max_send_sges) |
1231 |
+- return -EIO; |
1232 |
++ if (svc_rdma_pull_up_needed(rdma, xdr, wr_lst)) |
1233 |
++ return svc_rdma_pull_up_reply_msg(rdma, ctxt, xdr, wr_lst); |
1234 |
++ |
1235 |
++ ++ctxt->sc_cur_sge_no; |
1236 |
+ ret = svc_rdma_dma_map_buf(rdma, ctxt, |
1237 |
+ xdr->head[0].iov_base, |
1238 |
+ xdr->head[0].iov_len); |
1239 |
+@@ -617,8 +712,7 @@ int svc_rdma_map_reply_msg(struct svcxprt_rdma *rdma, |
1240 |
+ while (remaining) { |
1241 |
+ len = min_t(u32, PAGE_SIZE - page_off, remaining); |
1242 |
+ |
1243 |
+- if (++ctxt->sc_cur_sge_no >= rdma->sc_max_send_sges) |
1244 |
+- return -EIO; |
1245 |
++ ++ctxt->sc_cur_sge_no; |
1246 |
+ ret = svc_rdma_dma_map_page(rdma, ctxt, *ppages++, |
1247 |
+ page_off, len); |
1248 |
+ if (ret < 0) |
1249 |
+@@ -632,8 +726,7 @@ int svc_rdma_map_reply_msg(struct svcxprt_rdma *rdma, |
1250 |
+ len = xdr->tail[0].iov_len; |
1251 |
+ tail: |
1252 |
+ if (len) { |
1253 |
+- if (++ctxt->sc_cur_sge_no >= rdma->sc_max_send_sges) |
1254 |
+- return -EIO; |
1255 |
++ ++ctxt->sc_cur_sge_no; |
1256 |
+ ret = svc_rdma_dma_map_buf(rdma, ctxt, base, len); |
1257 |
+ if (ret < 0) |
1258 |
+ return ret; |
1259 |
+diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c |
1260 |
+index 2848cafd4a17..ce5c610b49c7 100644 |
1261 |
+--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c |
1262 |
++++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c |
1263 |
+@@ -475,13 +475,12 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt) |
1264 |
+ |
1265 |
+ /* Qualify the transport resource defaults with the |
1266 |
+ * capabilities of this particular device */ |
1267 |
+- newxprt->sc_max_send_sges = dev->attrs.max_send_sge; |
1268 |
+- /* transport hdr, head iovec, one page list entry, tail iovec */ |
1269 |
+- if (newxprt->sc_max_send_sges < 4) { |
1270 |
+- pr_err("svcrdma: too few Send SGEs available (%d)\n", |
1271 |
+- newxprt->sc_max_send_sges); |
1272 |
+- goto errout; |
1273 |
+- } |
1274 |
++ /* Transport header, head iovec, tail iovec */ |
1275 |
++ newxprt->sc_max_send_sges = 3; |
1276 |
++ /* Add one SGE per page list entry */ |
1277 |
++ newxprt->sc_max_send_sges += (svcrdma_max_req_size / PAGE_SIZE) + 1; |
1278 |
++ if (newxprt->sc_max_send_sges > dev->attrs.max_send_sge) |
1279 |
++ newxprt->sc_max_send_sges = dev->attrs.max_send_sge; |
1280 |
+ newxprt->sc_max_req_size = svcrdma_max_req_size; |
1281 |
+ newxprt->sc_max_requests = svcrdma_max_requests; |
1282 |
+ newxprt->sc_max_bc_requests = svcrdma_max_bc_requests; |
1283 |
+diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c |
1284 |
+index 119a427d9b2b..6ea8036fcdbe 100644 |
1285 |
+--- a/net/xfrm/xfrm_policy.c |
1286 |
++++ b/net/xfrm/xfrm_policy.c |
1287 |
+@@ -1628,7 +1628,10 @@ static struct dst_entry *xfrm_bundle_create(struct xfrm_policy *policy, |
1288 |
+ dst_copy_metrics(dst1, dst); |
1289 |
+ |
1290 |
+ if (xfrm[i]->props.mode != XFRM_MODE_TRANSPORT) { |
1291 |
+- __u32 mark = xfrm_smark_get(fl->flowi_mark, xfrm[i]); |
1292 |
++ __u32 mark = 0; |
1293 |
++ |
1294 |
++ if (xfrm[i]->props.smark.v || xfrm[i]->props.smark.m) |
1295 |
++ mark = xfrm_smark_get(fl->flowi_mark, xfrm[i]); |
1296 |
+ |
1297 |
+ family = xfrm[i]->props.family; |
1298 |
+ dst = xfrm_dst_lookup(xfrm[i], tos, fl->flowi_oif, |
1299 |
+diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c |
1300 |
+index 566919838d5e..ab557827aac0 100644 |
1301 |
+--- a/net/xfrm/xfrm_user.c |
1302 |
++++ b/net/xfrm/xfrm_user.c |
1303 |
+@@ -1488,10 +1488,15 @@ static int validate_tmpl(int nr, struct xfrm_user_tmpl *ut, u16 family) |
1304 |
+ if (!ut[i].family) |
1305 |
+ ut[i].family = family; |
1306 |
+ |
1307 |
+- if ((ut[i].mode == XFRM_MODE_TRANSPORT) && |
1308 |
+- (ut[i].family != prev_family)) |
1309 |
+- return -EINVAL; |
1310 |
+- |
1311 |
++ switch (ut[i].mode) { |
1312 |
++ case XFRM_MODE_TUNNEL: |
1313 |
++ case XFRM_MODE_BEET: |
1314 |
++ break; |
1315 |
++ default: |
1316 |
++ if (ut[i].family != prev_family) |
1317 |
++ return -EINVAL; |
1318 |
++ break; |
1319 |
++ } |
1320 |
+ if (ut[i].mode >= XFRM_MODE_MAX) |
1321 |
+ return -EINVAL; |
1322 |
+ |
1323 |
+diff --git a/samples/mei/mei-amt-version.c b/samples/mei/mei-amt-version.c |
1324 |
+index 57d0d871dcf7..bb9988914a56 100644 |
1325 |
+--- a/samples/mei/mei-amt-version.c |
1326 |
++++ b/samples/mei/mei-amt-version.c |
1327 |
+@@ -117,7 +117,7 @@ static bool mei_init(struct mei *me, const uuid_le *guid, |
1328 |
+ |
1329 |
+ me->verbose = verbose; |
1330 |
+ |
1331 |
+- me->fd = open("/dev/mei", O_RDWR); |
1332 |
++ me->fd = open("/dev/mei0", O_RDWR); |
1333 |
+ if (me->fd == -1) { |
1334 |
+ mei_err(me, "Cannot establish a handle to the Intel MEI driver\n"); |
1335 |
+ goto err; |
1336 |
+diff --git a/tools/iio/iio_generic_buffer.c b/tools/iio/iio_generic_buffer.c |
1337 |
+index 3040830d7797..84545666a09c 100644 |
1338 |
+--- a/tools/iio/iio_generic_buffer.c |
1339 |
++++ b/tools/iio/iio_generic_buffer.c |
1340 |
+@@ -330,7 +330,7 @@ static const struct option longopts[] = { |
1341 |
+ |
1342 |
+ int main(int argc, char **argv) |
1343 |
+ { |
1344 |
+- unsigned long long num_loops = 2; |
1345 |
++ long long num_loops = 2; |
1346 |
+ unsigned long timedelay = 1000000; |
1347 |
+ unsigned long buf_len = 128; |
1348 |
+ |
1349 |
|
1350 |
diff --git a/1022_linux-4.19.23.patch b/1022_linux-4.19.23.patch |
1351 |
new file mode 100644 |
1352 |
index 0000000..564858d |
1353 |
--- /dev/null |
1354 |
+++ b/1022_linux-4.19.23.patch |
1355 |
@@ -0,0 +1,35 @@ |
1356 |
+diff --git a/Makefile b/Makefile |
1357 |
+index 8cfcb01fcd7b..3dcf3f2363c1 100644 |
1358 |
+--- a/Makefile |
1359 |
++++ b/Makefile |
1360 |
+@@ -1,7 +1,7 @@ |
1361 |
+ # SPDX-License-Identifier: GPL-2.0 |
1362 |
+ VERSION = 4 |
1363 |
+ PATCHLEVEL = 19 |
1364 |
+-SUBLEVEL = 22 |
1365 |
++SUBLEVEL = 23 |
1366 |
+ EXTRAVERSION = |
1367 |
+ NAME = "People's Front" |
1368 |
+ |
1369 |
+diff --git a/fs/binfmt_script.c b/fs/binfmt_script.c |
1370 |
+index d0078cbb718b..7cde3f46ad26 100644 |
1371 |
+--- a/fs/binfmt_script.c |
1372 |
++++ b/fs/binfmt_script.c |
1373 |
+@@ -42,14 +42,10 @@ static int load_script(struct linux_binprm *bprm) |
1374 |
+ fput(bprm->file); |
1375 |
+ bprm->file = NULL; |
1376 |
+ |
1377 |
+- for (cp = bprm->buf+2;; cp++) { |
1378 |
+- if (cp >= bprm->buf + BINPRM_BUF_SIZE) |
1379 |
+- return -ENOEXEC; |
1380 |
+- if (!*cp || (*cp == '\n')) |
1381 |
+- break; |
1382 |
+- } |
1383 |
++ bprm->buf[BINPRM_BUF_SIZE - 1] = '\0'; |
1384 |
++ if ((cp = strchr(bprm->buf, '\n')) == NULL) |
1385 |
++ cp = bprm->buf+BINPRM_BUF_SIZE-1; |
1386 |
+ *cp = '\0'; |
1387 |
+- |
1388 |
+ while (cp > bprm->buf) { |
1389 |
+ cp--; |
1390 |
+ if ((*cp == ' ') || (*cp == '\t')) |