Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:4.0 commit in: /
Date: Tue, 30 Jun 2015 15:01:45
Message-Id: 1435676308.ff006a9d7ad689c96ec4a56f89cab306dc08a6c2.mpagano@gentoo
1 commit: ff006a9d7ad689c96ec4a56f89cab306dc08a6c2
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 30 14:58:28 2015 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 30 14:58:28 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=ff006a9d
7
8 Linux patch 4.0.7
9
10 0000_README | 4 +
11 1006_linux-4.0.7.patch | 707 +++++++++++++++++++++++++++++++++++++++++++++++++
12 2 files changed, 711 insertions(+)
13
14 diff --git a/0000_README b/0000_README
15 index 8761846..077a9de 100644
16 --- a/0000_README
17 +++ b/0000_README
18 @@ -67,6 +67,10 @@ Patch: 1005_linux-4.0.6.patch
19 From: http://www.kernel.org
20 Desc: Linux 4.0.6
21
22 +Patch: 1006_linux-4.0.7.patch
23 +From: http://www.kernel.org
24 +Desc: Linux 4.0.7
25 +
26 Patch: 1500_XATTR_USER_PREFIX.patch
27 From: https://bugs.gentoo.org/show_bug.cgi?id=470644
28 Desc: Support for namespace user.pax.* on tmpfs.
29
30 diff --git a/1006_linux-4.0.7.patch b/1006_linux-4.0.7.patch
31 new file mode 100644
32 index 0000000..ba486f4
33 --- /dev/null
34 +++ b/1006_linux-4.0.7.patch
35 @@ -0,0 +1,707 @@
36 +diff --git a/Makefile b/Makefile
37 +index af6da040b952..bd76a8e94395 100644
38 +--- a/Makefile
39 ++++ b/Makefile
40 +@@ -1,6 +1,6 @@
41 + VERSION = 4
42 + PATCHLEVEL = 0
43 +-SUBLEVEL = 6
44 ++SUBLEVEL = 7
45 + EXTRAVERSION =
46 + NAME = Hurr durr I'ma sheep
47 +
48 +diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
49 +index f70eca7ee705..0ef8d4b47102 100644
50 +--- a/arch/arm/mach-exynos/common.h
51 ++++ b/arch/arm/mach-exynos/common.h
52 +@@ -153,6 +153,8 @@ extern void exynos_enter_aftr(void);
53 +
54 + extern struct cpuidle_exynos_data cpuidle_coupled_exynos_data;
55 +
56 ++extern void exynos_set_delayed_reset_assertion(bool enable);
57 ++
58 + extern void s5p_init_cpu(void __iomem *cpuid_addr);
59 + extern unsigned int samsung_rev(void);
60 + extern void __iomem *cpu_boot_reg_base(void);
61 +diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
62 +index 9e9dfdfad9d7..1081ff1f03c6 100644
63 +--- a/arch/arm/mach-exynos/exynos.c
64 ++++ b/arch/arm/mach-exynos/exynos.c
65 +@@ -166,6 +166,33 @@ static void __init exynos_init_io(void)
66 + exynos_map_io();
67 + }
68 +
69 ++/*
70 ++ * Set or clear the USE_DELAYED_RESET_ASSERTION option. Used by smp code
71 ++ * and suspend.
72 ++ *
73 ++ * This is necessary only on Exynos4 SoCs. When system is running
74 ++ * USE_DELAYED_RESET_ASSERTION should be set so the ARM CLK clock down
75 ++ * feature could properly detect global idle state when secondary CPU is
76 ++ * powered down.
77 ++ *
78 ++ * However this should not be set when such system is going into suspend.
79 ++ */
80 ++void exynos_set_delayed_reset_assertion(bool enable)
81 ++{
82 ++ if (soc_is_exynos4()) {
83 ++ unsigned int tmp, core_id;
84 ++
85 ++ for (core_id = 0; core_id < num_possible_cpus(); core_id++) {
86 ++ tmp = pmu_raw_readl(EXYNOS_ARM_CORE_OPTION(core_id));
87 ++ if (enable)
88 ++ tmp |= S5P_USE_DELAYED_RESET_ASSERTION;
89 ++ else
90 ++ tmp &= ~(S5P_USE_DELAYED_RESET_ASSERTION);
91 ++ pmu_raw_writel(tmp, EXYNOS_ARM_CORE_OPTION(core_id));
92 ++ }
93 ++ }
94 ++}
95 ++
96 + static const struct of_device_id exynos_dt_pmu_match[] = {
97 + { .compatible = "samsung,exynos3250-pmu" },
98 + { .compatible = "samsung,exynos4210-pmu" },
99 +diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
100 +index d2e9f12d12f1..d45e8cd23925 100644
101 +--- a/arch/arm/mach-exynos/platsmp.c
102 ++++ b/arch/arm/mach-exynos/platsmp.c
103 +@@ -34,30 +34,6 @@
104 +
105 + extern void exynos4_secondary_startup(void);
106 +
107 +-/*
108 +- * Set or clear the USE_DELAYED_RESET_ASSERTION option, set on Exynos4 SoCs
109 +- * during hot-(un)plugging CPUx.
110 +- *
111 +- * The feature can be cleared safely during first boot of secondary CPU.
112 +- *
113 +- * Exynos4 SoCs require setting USE_DELAYED_RESET_ASSERTION during powering
114 +- * down a CPU so the CPU idle clock down feature could properly detect global
115 +- * idle state when CPUx is off.
116 +- */
117 +-static void exynos_set_delayed_reset_assertion(u32 core_id, bool enable)
118 +-{
119 +- if (soc_is_exynos4()) {
120 +- unsigned int tmp;
121 +-
122 +- tmp = pmu_raw_readl(EXYNOS_ARM_CORE_OPTION(core_id));
123 +- if (enable)
124 +- tmp |= S5P_USE_DELAYED_RESET_ASSERTION;
125 +- else
126 +- tmp &= ~(S5P_USE_DELAYED_RESET_ASSERTION);
127 +- pmu_raw_writel(tmp, EXYNOS_ARM_CORE_OPTION(core_id));
128 +- }
129 +-}
130 +-
131 + #ifdef CONFIG_HOTPLUG_CPU
132 + static inline void cpu_leave_lowpower(u32 core_id)
133 + {
134 +@@ -73,8 +49,6 @@ static inline void cpu_leave_lowpower(u32 core_id)
135 + : "=&r" (v)
136 + : "Ir" (CR_C), "Ir" (0x40)
137 + : "cc");
138 +-
139 +- exynos_set_delayed_reset_assertion(core_id, false);
140 + }
141 +
142 + static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
143 +@@ -87,14 +61,6 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
144 + /* Turn the CPU off on next WFI instruction. */
145 + exynos_cpu_power_down(core_id);
146 +
147 +- /*
148 +- * Exynos4 SoCs require setting
149 +- * USE_DELAYED_RESET_ASSERTION so the CPU idle
150 +- * clock down feature could properly detect
151 +- * global idle state when CPUx is off.
152 +- */
153 +- exynos_set_delayed_reset_assertion(core_id, true);
154 +-
155 + wfi();
156 +
157 + if (pen_release == core_id) {
158 +@@ -354,9 +320,6 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
159 + udelay(10);
160 + }
161 +
162 +- /* No harm if this is called during first boot of secondary CPU */
163 +- exynos_set_delayed_reset_assertion(core_id, false);
164 +-
165 + /*
166 + * now the secondary core is starting up let it run its
167 + * calibrations, then wait for it to finish
168 +@@ -403,6 +366,8 @@ static void __init exynos_smp_prepare_cpus(unsigned int max_cpus)
169 +
170 + exynos_sysram_init();
171 +
172 ++ exynos_set_delayed_reset_assertion(true);
173 ++
174 + if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9)
175 + scu_enable(scu_base_addr());
176 +
177 +diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c
178 +index 318d127df147..582ef2df960d 100644
179 +--- a/arch/arm/mach-exynos/suspend.c
180 ++++ b/arch/arm/mach-exynos/suspend.c
181 +@@ -235,6 +235,8 @@ static void exynos_pm_enter_sleep_mode(void)
182 +
183 + static void exynos_pm_prepare(void)
184 + {
185 ++ exynos_set_delayed_reset_assertion(false);
186 ++
187 + /* Set wake-up mask registers */
188 + exynos_pm_set_wakeup_mask();
189 +
190 +@@ -383,6 +385,7 @@ early_wakeup:
191 +
192 + /* Clear SLEEP mode set in INFORM1 */
193 + pmu_raw_writel(0x0, S5P_INFORM1);
194 ++ exynos_set_delayed_reset_assertion(true);
195 + }
196 +
197 + static void exynos3250_pm_resume(void)
198 +diff --git a/arch/powerpc/kernel/idle_power7.S b/arch/powerpc/kernel/idle_power7.S
199 +index 05adc8bbdef8..401d8d0085aa 100644
200 +--- a/arch/powerpc/kernel/idle_power7.S
201 ++++ b/arch/powerpc/kernel/idle_power7.S
202 +@@ -500,9 +500,11 @@ BEGIN_FTR_SECTION
203 + CHECK_HMI_INTERRUPT
204 + END_FTR_SECTION_IFSET(CPU_FTR_HVMODE)
205 + ld r1,PACAR1(r13)
206 ++ ld r6,_CCR(r1)
207 + ld r4,_MSR(r1)
208 + ld r5,_NIP(r1)
209 + addi r1,r1,INT_FRAME_SIZE
210 ++ mtcr r6
211 + mtspr SPRN_SRR1,r4
212 + mtspr SPRN_SRR0,r5
213 + rfid
214 +diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
215 +index 4e3d5a9621fe..03189d86357d 100644
216 +--- a/arch/x86/kernel/kprobes/core.c
217 ++++ b/arch/x86/kernel/kprobes/core.c
218 +@@ -354,6 +354,7 @@ int __copy_instruction(u8 *dest, u8 *src)
219 + {
220 + struct insn insn;
221 + kprobe_opcode_t buf[MAX_INSN_SIZE];
222 ++ int length;
223 + unsigned long recovered_insn =
224 + recover_probed_instruction(buf, (unsigned long)src);
225 +
226 +@@ -361,16 +362,18 @@ int __copy_instruction(u8 *dest, u8 *src)
227 + return 0;
228 + kernel_insn_init(&insn, (void *)recovered_insn, MAX_INSN_SIZE);
229 + insn_get_length(&insn);
230 ++ length = insn.length;
231 ++
232 + /* Another subsystem puts a breakpoint, failed to recover */
233 + if (insn.opcode.bytes[0] == BREAKPOINT_INSTRUCTION)
234 + return 0;
235 +- memcpy(dest, insn.kaddr, insn.length);
236 ++ memcpy(dest, insn.kaddr, length);
237 +
238 + #ifdef CONFIG_X86_64
239 + if (insn_rip_relative(&insn)) {
240 + s64 newdisp;
241 + u8 *disp;
242 +- kernel_insn_init(&insn, dest, insn.length);
243 ++ kernel_insn_init(&insn, dest, length);
244 + insn_get_displacement(&insn);
245 + /*
246 + * The copied instruction uses the %rip-relative addressing
247 +@@ -394,7 +397,7 @@ int __copy_instruction(u8 *dest, u8 *src)
248 + *(s32 *) disp = (s32) newdisp;
249 + }
250 + #endif
251 +- return insn.length;
252 ++ return length;
253 + }
254 +
255 + static int arch_copy_kprobe(struct kprobe *p)
256 +diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
257 +index 4ee827d7bf36..3cb2b58fa26b 100644
258 +--- a/arch/x86/kvm/lapic.c
259 ++++ b/arch/x86/kvm/lapic.c
260 +@@ -1064,6 +1064,17 @@ static void update_divide_count(struct kvm_lapic *apic)
261 + apic->divide_count);
262 + }
263 +
264 ++static void apic_update_lvtt(struct kvm_lapic *apic)
265 ++{
266 ++ u32 timer_mode = kvm_apic_get_reg(apic, APIC_LVTT) &
267 ++ apic->lapic_timer.timer_mode_mask;
268 ++
269 ++ if (apic->lapic_timer.timer_mode != timer_mode) {
270 ++ apic->lapic_timer.timer_mode = timer_mode;
271 ++ hrtimer_cancel(&apic->lapic_timer.timer);
272 ++ }
273 ++}
274 ++
275 + static void apic_timer_expired(struct kvm_lapic *apic)
276 + {
277 + struct kvm_vcpu *vcpu = apic->vcpu;
278 +@@ -1272,6 +1283,7 @@ static int apic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val)
279 + apic_set_reg(apic, APIC_LVTT + 0x10 * i,
280 + lvt_val | APIC_LVT_MASKED);
281 + }
282 ++ apic_update_lvtt(apic);
283 + atomic_set(&apic->lapic_timer.pending, 0);
284 +
285 + }
286 +@@ -1304,20 +1316,13 @@ static int apic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val)
287 +
288 + break;
289 +
290 +- case APIC_LVTT: {
291 +- u32 timer_mode = val & apic->lapic_timer.timer_mode_mask;
292 +-
293 +- if (apic->lapic_timer.timer_mode != timer_mode) {
294 +- apic->lapic_timer.timer_mode = timer_mode;
295 +- hrtimer_cancel(&apic->lapic_timer.timer);
296 +- }
297 +-
298 ++ case APIC_LVTT:
299 + if (!kvm_apic_sw_enabled(apic))
300 + val |= APIC_LVT_MASKED;
301 + val &= (apic_lvt_mask[0] | apic->lapic_timer.timer_mode_mask);
302 + apic_set_reg(apic, APIC_LVTT, val);
303 ++ apic_update_lvtt(apic);
304 + break;
305 +- }
306 +
307 + case APIC_TMICT:
308 + if (apic_lvtt_tscdeadline(apic))
309 +@@ -1552,7 +1557,7 @@ void kvm_lapic_reset(struct kvm_vcpu *vcpu)
310 +
311 + for (i = 0; i < APIC_LVT_NUM; i++)
312 + apic_set_reg(apic, APIC_LVTT + 0x10 * i, APIC_LVT_MASKED);
313 +- apic->lapic_timer.timer_mode = 0;
314 ++ apic_update_lvtt(apic);
315 + apic_set_reg(apic, APIC_LVT0,
316 + SET_APIC_DELIVERY_MODE(0, APIC_MODE_EXTINT));
317 +
318 +@@ -1778,6 +1783,7 @@ void kvm_apic_post_state_restore(struct kvm_vcpu *vcpu,
319 +
320 + apic_update_ppr(apic);
321 + hrtimer_cancel(&apic->lapic_timer.timer);
322 ++ apic_update_lvtt(apic);
323 + update_divide_count(apic);
324 + start_apic_timer(apic);
325 + apic->irr_pending = true;
326 +diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
327 +index 288547a3c566..f26ebc5e0be6 100644
328 +--- a/drivers/bluetooth/ath3k.c
329 ++++ b/drivers/bluetooth/ath3k.c
330 +@@ -80,6 +80,7 @@ static const struct usb_device_id ath3k_table[] = {
331 + { USB_DEVICE(0x0489, 0xe057) },
332 + { USB_DEVICE(0x0489, 0xe056) },
333 + { USB_DEVICE(0x0489, 0xe05f) },
334 ++ { USB_DEVICE(0x0489, 0xe076) },
335 + { USB_DEVICE(0x0489, 0xe078) },
336 + { USB_DEVICE(0x04c5, 0x1330) },
337 + { USB_DEVICE(0x04CA, 0x3004) },
338 +@@ -111,6 +112,7 @@ static const struct usb_device_id ath3k_table[] = {
339 + { USB_DEVICE(0x13d3, 0x3408) },
340 + { USB_DEVICE(0x13d3, 0x3423) },
341 + { USB_DEVICE(0x13d3, 0x3432) },
342 ++ { USB_DEVICE(0x13d3, 0x3474) },
343 +
344 + /* Atheros AR5BBU12 with sflash firmware */
345 + { USB_DEVICE(0x0489, 0xE02C) },
346 +@@ -135,6 +137,7 @@ static const struct usb_device_id ath3k_blist_tbl[] = {
347 + { USB_DEVICE(0x0489, 0xe056), .driver_info = BTUSB_ATH3012 },
348 + { USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 },
349 + { USB_DEVICE(0x0489, 0xe05f), .driver_info = BTUSB_ATH3012 },
350 ++ { USB_DEVICE(0x0489, 0xe076), .driver_info = BTUSB_ATH3012 },
351 + { USB_DEVICE(0x0489, 0xe078), .driver_info = BTUSB_ATH3012 },
352 + { USB_DEVICE(0x04c5, 0x1330), .driver_info = BTUSB_ATH3012 },
353 + { USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 },
354 +@@ -166,6 +169,7 @@ static const struct usb_device_id ath3k_blist_tbl[] = {
355 + { USB_DEVICE(0x13d3, 0x3408), .driver_info = BTUSB_ATH3012 },
356 + { USB_DEVICE(0x13d3, 0x3423), .driver_info = BTUSB_ATH3012 },
357 + { USB_DEVICE(0x13d3, 0x3432), .driver_info = BTUSB_ATH3012 },
358 ++ { USB_DEVICE(0x13d3, 0x3474), .driver_info = BTUSB_ATH3012 },
359 +
360 + /* Atheros AR5BBU22 with sflash firmware */
361 + { USB_DEVICE(0x0489, 0xE036), .driver_info = BTUSB_ATH3012 },
362 +diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
363 +index 2c527da668ae..4fc415703ffc 100644
364 +--- a/drivers/bluetooth/btusb.c
365 ++++ b/drivers/bluetooth/btusb.c
366 +@@ -174,6 +174,7 @@ static const struct usb_device_id blacklist_table[] = {
367 + { USB_DEVICE(0x0489, 0xe056), .driver_info = BTUSB_ATH3012 },
368 + { USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 },
369 + { USB_DEVICE(0x0489, 0xe05f), .driver_info = BTUSB_ATH3012 },
370 ++ { USB_DEVICE(0x0489, 0xe076), .driver_info = BTUSB_ATH3012 },
371 + { USB_DEVICE(0x0489, 0xe078), .driver_info = BTUSB_ATH3012 },
372 + { USB_DEVICE(0x04c5, 0x1330), .driver_info = BTUSB_ATH3012 },
373 + { USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 },
374 +@@ -205,6 +206,7 @@ static const struct usb_device_id blacklist_table[] = {
375 + { USB_DEVICE(0x13d3, 0x3408), .driver_info = BTUSB_ATH3012 },
376 + { USB_DEVICE(0x13d3, 0x3423), .driver_info = BTUSB_ATH3012 },
377 + { USB_DEVICE(0x13d3, 0x3432), .driver_info = BTUSB_ATH3012 },
378 ++ { USB_DEVICE(0x13d3, 0x3474), .driver_info = BTUSB_ATH3012 },
379 +
380 + /* Atheros AR5BBU12 with sflash firmware */
381 + { USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },
382 +diff --git a/drivers/clk/at91/clk-pll.c b/drivers/clk/at91/clk-pll.c
383 +index 6ec79dbc0840..cbbe40377ad6 100644
384 +--- a/drivers/clk/at91/clk-pll.c
385 ++++ b/drivers/clk/at91/clk-pll.c
386 +@@ -173,8 +173,7 @@ static long clk_pll_get_best_div_mul(struct clk_pll *pll, unsigned long rate,
387 + int i = 0;
388 +
389 + /* Check if parent_rate is a valid input rate */
390 +- if (parent_rate < characteristics->input.min ||
391 +- parent_rate > characteristics->input.max)
392 ++ if (parent_rate < characteristics->input.min)
393 + return -ERANGE;
394 +
395 + /*
396 +@@ -187,6 +186,15 @@ static long clk_pll_get_best_div_mul(struct clk_pll *pll, unsigned long rate,
397 + if (!mindiv)
398 + mindiv = 1;
399 +
400 ++ if (parent_rate > characteristics->input.max) {
401 ++ tmpdiv = DIV_ROUND_UP(parent_rate, characteristics->input.max);
402 ++ if (tmpdiv > PLL_DIV_MAX)
403 ++ return -ERANGE;
404 ++
405 ++ if (tmpdiv > mindiv)
406 ++ mindiv = tmpdiv;
407 ++ }
408 ++
409 + /*
410 + * Calculate the maximum divider which is limited by PLL register
411 + * layout (limited by the MUL or DIV field size).
412 +diff --git a/drivers/clk/at91/pmc.h b/drivers/clk/at91/pmc.h
413 +index 69abb08cf146..eb8e5dc9076d 100644
414 +--- a/drivers/clk/at91/pmc.h
415 ++++ b/drivers/clk/at91/pmc.h
416 +@@ -121,7 +121,7 @@ extern void __init of_at91sam9x5_clk_smd_setup(struct device_node *np,
417 + struct at91_pmc *pmc);
418 + #endif
419 +
420 +-#if defined(CONFIG_HAVE_AT91_SMD)
421 ++#if defined(CONFIG_HAVE_AT91_H32MX)
422 + extern void __init of_sama5d4_clk_h32mx_setup(struct device_node *np,
423 + struct at91_pmc *pmc);
424 + #endif
425 +diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
426 +index f347ab7eea95..08b0da23c4ab 100644
427 +--- a/drivers/crypto/caam/caamhash.c
428 ++++ b/drivers/crypto/caam/caamhash.c
429 +@@ -1543,6 +1543,8 @@ static int ahash_init(struct ahash_request *req)
430 +
431 + state->current_buf = 0;
432 + state->buf_dma = 0;
433 ++ state->buflen_0 = 0;
434 ++ state->buflen_1 = 0;
435 +
436 + return 0;
437 + }
438 +diff --git a/drivers/crypto/caam/caamrng.c b/drivers/crypto/caam/caamrng.c
439 +index ae31e555793c..a48dc251b14f 100644
440 +--- a/drivers/crypto/caam/caamrng.c
441 ++++ b/drivers/crypto/caam/caamrng.c
442 +@@ -56,7 +56,7 @@
443 +
444 + /* Buffer, its dma address and lock */
445 + struct buf_data {
446 +- u8 buf[RN_BUF_SIZE];
447 ++ u8 buf[RN_BUF_SIZE] ____cacheline_aligned;
448 + dma_addr_t addr;
449 + struct completion filled;
450 + u32 hw_desc[DESC_JOB_O_LEN];
451 +diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
452 +index ec4d932f8be4..169123a6ad0e 100644
453 +--- a/drivers/gpu/drm/i915/i915_drv.c
454 ++++ b/drivers/gpu/drm/i915/i915_drv.c
455 +@@ -693,6 +693,16 @@ static int i915_drm_resume(struct drm_device *dev)
456 + intel_init_pch_refclk(dev);
457 + drm_mode_config_reset(dev);
458 +
459 ++ /*
460 ++ * Interrupts have to be enabled before any batches are run.
461 ++ * If not the GPU will hang. i915_gem_init_hw() will initiate
462 ++ * batches to update/restore the context.
463 ++ *
464 ++ * Modeset enabling in intel_modeset_init_hw() also needs
465 ++ * working interrupts.
466 ++ */
467 ++ intel_runtime_pm_enable_interrupts(dev_priv);
468 ++
469 + mutex_lock(&dev->struct_mutex);
470 + if (i915_gem_init_hw(dev)) {
471 + DRM_ERROR("failed to re-initialize GPU, declaring wedged!\n");
472 +@@ -700,9 +710,6 @@ static int i915_drm_resume(struct drm_device *dev)
473 + }
474 + mutex_unlock(&dev->struct_mutex);
475 +
476 +- /* We need working interrupts for modeset enabling ... */
477 +- intel_runtime_pm_enable_interrupts(dev_priv);
478 +-
479 + intel_modeset_init_hw(dev);
480 +
481 + spin_lock_irq(&dev_priv->irq_lock);
482 +diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
483 +index 7a628e4cb27a..9536ec390614 100644
484 +--- a/drivers/gpu/drm/i915/i915_gem.c
485 ++++ b/drivers/gpu/drm/i915/i915_gem.c
486 +@@ -2732,6 +2732,9 @@ void i915_gem_reset(struct drm_device *dev)
487 + void
488 + i915_gem_retire_requests_ring(struct intel_engine_cs *ring)
489 + {
490 ++ if (list_empty(&ring->request_list))
491 ++ return;
492 ++
493 + WARN_ON(i915_verify_lists(ring->dev));
494 +
495 + /* Retire requests first as we use it above for the early return.
496 +@@ -3088,8 +3091,8 @@ int i915_vma_unbind(struct i915_vma *vma)
497 + } else if (vma->ggtt_view.pages) {
498 + sg_free_table(vma->ggtt_view.pages);
499 + kfree(vma->ggtt_view.pages);
500 +- vma->ggtt_view.pages = NULL;
501 + }
502 ++ vma->ggtt_view.pages = NULL;
503 + }
504 +
505 + drm_mm_remove_node(&vma->node);
506 +diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c
507 +index 9872ba9abf1a..2ffeda3589c2 100644
508 +--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
509 ++++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
510 +@@ -1526,6 +1526,11 @@ static int mga_vga_mode_valid(struct drm_connector *connector,
511 + return MODE_BANDWIDTH;
512 + }
513 +
514 ++ if ((mode->hdisplay % 8) != 0 || (mode->hsync_start % 8) != 0 ||
515 ++ (mode->hsync_end % 8) != 0 || (mode->htotal % 8) != 0) {
516 ++ return MODE_H_ILLEGAL;
517 ++ }
518 ++
519 + if (mode->crtc_hdisplay > 2048 || mode->crtc_hsync_start > 4096 ||
520 + mode->crtc_hsync_end > 4096 || mode->crtc_htotal > 4096 ||
521 + mode->crtc_vdisplay > 2048 || mode->crtc_vsync_start > 4096 ||
522 +diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
523 +index 686411e4e4f6..b82f2dd1fc32 100644
524 +--- a/drivers/gpu/drm/radeon/radeon_kms.c
525 ++++ b/drivers/gpu/drm/radeon/radeon_kms.c
526 +@@ -547,6 +547,9 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file
527 + else
528 + *value = 1;
529 + break;
530 ++ case RADEON_INFO_VA_UNMAP_WORKING:
531 ++ *value = true;
532 ++ break;
533 + default:
534 + DRM_DEBUG_KMS("Invalid request %d\n", info->request);
535 + return -EINVAL;
536 +diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
537 +index 147029adb885..ac72ece70160 100644
538 +--- a/drivers/infiniband/ulp/isert/ib_isert.c
539 ++++ b/drivers/infiniband/ulp/isert/ib_isert.c
540 +@@ -2316,7 +2316,6 @@ isert_build_rdma_wr(struct isert_conn *isert_conn, struct isert_cmd *isert_cmd,
541 + page_off = offset % PAGE_SIZE;
542 +
543 + send_wr->sg_list = ib_sge;
544 +- send_wr->num_sge = sg_nents;
545 + send_wr->wr_id = (uintptr_t)&isert_cmd->tx_desc;
546 + /*
547 + * Perform mapping of TCM scatterlist memory ib_sge dma_addr.
548 +@@ -2336,14 +2335,17 @@ isert_build_rdma_wr(struct isert_conn *isert_conn, struct isert_cmd *isert_cmd,
549 + ib_sge->addr, ib_sge->length, ib_sge->lkey);
550 + page_off = 0;
551 + data_left -= ib_sge->length;
552 ++ if (!data_left)
553 ++ break;
554 + ib_sge++;
555 + isert_dbg("Incrementing ib_sge pointer to %p\n", ib_sge);
556 + }
557 +
558 ++ send_wr->num_sge = ++i;
559 + isert_dbg("Set outgoing sg_list: %p num_sg: %u from TCM SGLs\n",
560 + send_wr->sg_list, send_wr->num_sge);
561 +
562 +- return sg_nents;
563 ++ return send_wr->num_sge;
564 + }
565 +
566 + static int
567 +@@ -3311,6 +3313,7 @@ static void isert_free_conn(struct iscsi_conn *conn)
568 + {
569 + struct isert_conn *isert_conn = conn->context;
570 +
571 ++ isert_wait4flush(isert_conn);
572 + isert_put_conn(isert_conn);
573 + }
574 +
575 +diff --git a/drivers/md/dm.c b/drivers/md/dm.c
576 +index 9b4e30a82e4a..beda011cb741 100644
577 +--- a/drivers/md/dm.c
578 ++++ b/drivers/md/dm.c
579 +@@ -1889,8 +1889,8 @@ static int map_request(struct dm_target *ti, struct request *rq,
580 + dm_kill_unmapped_request(rq, r);
581 + return r;
582 + }
583 +- if (IS_ERR(clone))
584 +- return DM_MAPIO_REQUEUE;
585 ++ if (r != DM_MAPIO_REMAPPED)
586 ++ return r;
587 + if (setup_clone(clone, rq, tio, GFP_KERNEL)) {
588 + /* -ENOMEM */
589 + ti->type->release_clone_rq(clone);
590 +diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
591 +index 75345c1e8c34..5c91df5c1f4f 100644
592 +--- a/drivers/net/wireless/b43/main.c
593 ++++ b/drivers/net/wireless/b43/main.c
594 +@@ -5365,6 +5365,10 @@ static void b43_supported_bands(struct b43_wldev *dev, bool *have_2ghz_phy,
595 + *have_5ghz_phy = true;
596 + return;
597 + case 0x4321: /* BCM4306 */
598 ++ /* There are 14e4:4321 PCI devs with 2.4 GHz BCM4321 (N-PHY) */
599 ++ if (dev->phy.type != B43_PHYTYPE_G)
600 ++ break;
601 ++ /* fall through */
602 + case 0x4313: /* BCM4311 */
603 + case 0x431a: /* BCM4318 */
604 + case 0x432a: /* BCM4321 */
605 +diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
606 +index 220c0fd059bb..50faef4f056f 100644
607 +--- a/drivers/usb/class/cdc-acm.c
608 ++++ b/drivers/usb/class/cdc-acm.c
609 +@@ -1468,6 +1468,11 @@ skip_countries:
610 + goto alloc_fail8;
611 + }
612 +
613 ++ if (quirks & CLEAR_HALT_CONDITIONS) {
614 ++ usb_clear_halt(usb_dev, usb_rcvbulkpipe(usb_dev, epread->bEndpointAddress));
615 ++ usb_clear_halt(usb_dev, usb_sndbulkpipe(usb_dev, epwrite->bEndpointAddress));
616 ++ }
617 ++
618 + return 0;
619 + alloc_fail8:
620 + if (acm->country_codes) {
621 +@@ -1747,6 +1752,10 @@ static const struct usb_device_id acm_ids[] = {
622 + .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */
623 + },
624 +
625 ++ { USB_DEVICE(0x2912, 0x0001), /* ATOL FPrint */
626 ++ .driver_info = CLEAR_HALT_CONDITIONS,
627 ++ },
628 ++
629 + /* Nokia S60 phones expose two ACM channels. The first is
630 + * a modem and is picked up by the standard AT-command
631 + * information below. The second is 'vendor-specific' but
632 +diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h
633 +index ffeb3c83941f..b3b6c9db6fe5 100644
634 +--- a/drivers/usb/class/cdc-acm.h
635 ++++ b/drivers/usb/class/cdc-acm.h
636 +@@ -133,3 +133,4 @@ struct acm {
637 + #define NO_DATA_INTERFACE BIT(4)
638 + #define IGNORE_DEVICE BIT(5)
639 + #define QUIRK_CONTROL_LINE_STATE BIT(6)
640 ++#define CLEAR_HALT_CONDITIONS BIT(7)
641 +diff --git a/include/uapi/drm/radeon_drm.h b/include/uapi/drm/radeon_drm.h
642 +index 50d0fb41a3bf..76d2edea5bd1 100644
643 +--- a/include/uapi/drm/radeon_drm.h
644 ++++ b/include/uapi/drm/radeon_drm.h
645 +@@ -1034,6 +1034,7 @@ struct drm_radeon_cs {
646 + #define RADEON_INFO_VRAM_USAGE 0x1e
647 + #define RADEON_INFO_GTT_USAGE 0x1f
648 + #define RADEON_INFO_ACTIVE_CU_COUNT 0x20
649 ++#define RADEON_INFO_VA_UNMAP_WORKING 0x25
650 +
651 + struct drm_radeon_info {
652 + uint32_t request;
653 +diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
654 +index ced69da0ff55..7f2e97ce71a7 100644
655 +--- a/kernel/trace/trace_events_filter.c
656 ++++ b/kernel/trace/trace_events_filter.c
657 +@@ -1369,19 +1369,26 @@ static int check_preds(struct filter_parse_state *ps)
658 + {
659 + int n_normal_preds = 0, n_logical_preds = 0;
660 + struct postfix_elt *elt;
661 ++ int cnt = 0;
662 +
663 + list_for_each_entry(elt, &ps->postfix, list) {
664 +- if (elt->op == OP_NONE)
665 ++ if (elt->op == OP_NONE) {
666 ++ cnt++;
667 + continue;
668 ++ }
669 +
670 + if (elt->op == OP_AND || elt->op == OP_OR) {
671 + n_logical_preds++;
672 ++ cnt--;
673 + continue;
674 + }
675 ++ if (elt->op != OP_NOT)
676 ++ cnt--;
677 + n_normal_preds++;
678 ++ WARN_ON_ONCE(cnt < 0);
679 + }
680 +
681 +- if (!n_normal_preds || n_logical_preds >= n_normal_preds) {
682 ++ if (cnt != 1 || !n_normal_preds || n_logical_preds >= n_normal_preds) {
683 + parse_error(ps, FILT_ERR_INVALID_FILTER, 0);
684 + return -EINVAL;
685 + }
686 +diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
687 +index 87eff3173ce9..60b3100a2120 100644
688 +--- a/sound/pci/hda/patch_sigmatel.c
689 ++++ b/sound/pci/hda/patch_sigmatel.c
690 +@@ -100,6 +100,7 @@ enum {
691 + STAC_HP_ENVY_BASS,
692 + STAC_HP_BNB13_EQ,
693 + STAC_HP_ENVY_TS_BASS,
694 ++ STAC_HP_ENVY_TS_DAC_BIND,
695 + STAC_92HD83XXX_GPIO10_EAPD,
696 + STAC_92HD83XXX_MODELS
697 + };
698 +@@ -2170,6 +2171,22 @@ static void stac92hd83xxx_fixup_gpio10_eapd(struct hda_codec *codec,
699 + spec->eapd_switch = 0;
700 + }
701 +
702 ++static void hp_envy_ts_fixup_dac_bind(struct hda_codec *codec,
703 ++ const struct hda_fixup *fix,
704 ++ int action)
705 ++{
706 ++ struct sigmatel_spec *spec = codec->spec;
707 ++ static hda_nid_t preferred_pairs[] = {
708 ++ 0xd, 0x13,
709 ++ 0
710 ++ };
711 ++
712 ++ if (action != HDA_FIXUP_ACT_PRE_PROBE)
713 ++ return;
714 ++
715 ++ spec->gen.preferred_dacs = preferred_pairs;
716 ++}
717 ++
718 + static const struct hda_verb hp_bnb13_eq_verbs[] = {
719 + /* 44.1KHz base */
720 + { 0x22, 0x7A6, 0x3E },
721 +@@ -2685,6 +2702,12 @@ static const struct hda_fixup stac92hd83xxx_fixups[] = {
722 + {}
723 + },
724 + },
725 ++ [STAC_HP_ENVY_TS_DAC_BIND] = {
726 ++ .type = HDA_FIXUP_FUNC,
727 ++ .v.func = hp_envy_ts_fixup_dac_bind,
728 ++ .chained = true,
729 ++ .chain_id = STAC_HP_ENVY_TS_BASS,
730 ++ },
731 + [STAC_92HD83XXX_GPIO10_EAPD] = {
732 + .type = HDA_FIXUP_FUNC,
733 + .v.func = stac92hd83xxx_fixup_gpio10_eapd,
734 +@@ -2763,6 +2786,8 @@ static const struct snd_pci_quirk stac92hd83xxx_fixup_tbl[] = {
735 + "HP bNB13", STAC_HP_BNB13_EQ),
736 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x190e,
737 + "HP ENVY TS", STAC_HP_ENVY_TS_BASS),
738 ++ SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1967,
739 ++ "HP ENVY TS", STAC_HP_ENVY_TS_DAC_BIND),
740 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1940,
741 + "HP bNB13", STAC_HP_BNB13_EQ),
742 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1941,