Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:4.1 commit in: /
Date: Wed, 01 Jul 2015 15:33:11
Message-Id: 1435764809.b441dda5fa50d4b8c51ccf0641501d3574851296.mpagano@gentoo
1 commit: b441dda5fa50d4b8c51ccf0641501d3574851296
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jul 1 15:33:29 2015 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 1 15:33:29 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=b441dda5
7
8 Add the 4.1.1 patchset. For real this time.
9
10 0000_README | 4 +
11 1000_linux-4.1.1.patch | 388 +++++++++++++++++++++++++++++++++++++++++++++++++
12 2 files changed, 392 insertions(+)
13
14 diff --git a/0000_README b/0000_README
15 index dd82b40..8bf61f5 100644
16 --- a/0000_README
17 +++ b/0000_README
18 @@ -43,6 +43,10 @@ EXPERIMENTAL
19 Individual Patch Descriptions:
20 --------------------------------------------------------------------------
21
22 +Patch: 1000_linux-4.1.1.patch
23 +From: http://www.kernel.org
24 +Desc: Linux 4.1.1
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/1000_linux-4.1.1.patch b/1000_linux-4.1.1.patch
31 new file mode 100644
32 index 0000000..658aefa
33 --- /dev/null
34 +++ b/1000_linux-4.1.1.patch
35 @@ -0,0 +1,388 @@
36 +diff --git a/Makefile b/Makefile
37 +index f5c8983aeeb7..1caf4ad3eb8a 100644
38 +--- a/Makefile
39 ++++ b/Makefile
40 +@@ -1,8 +1,8 @@
41 + VERSION = 4
42 + PATCHLEVEL = 1
43 +-SUBLEVEL = 0
44 ++SUBLEVEL = 1
45 + EXTRAVERSION =
46 +-NAME = Hurr durr I'ma sheep
47 ++NAME = Series 4800
48 +
49 + # *DOCUMENTATION*
50 + # To see a list of typical targets execute "make help"
51 +diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
52 +index 4f7001f28936..aa4e3a74e541 100644
53 +--- a/arch/x86/kernel/cpu/perf_event.c
54 ++++ b/arch/x86/kernel/cpu/perf_event.c
55 +@@ -270,11 +270,7 @@ msr_fail:
56 +
57 + static void hw_perf_event_destroy(struct perf_event *event)
58 + {
59 +- if (atomic_dec_and_mutex_lock(&active_events, &pmc_reserve_mutex)) {
60 +- release_pmc_hardware();
61 +- release_ds_buffers();
62 +- mutex_unlock(&pmc_reserve_mutex);
63 +- }
64 ++ x86_release_hardware();
65 + }
66 +
67 + void hw_perf_lbr_event_destroy(struct perf_event *event)
68 +@@ -324,6 +320,35 @@ set_ext_hw_attr(struct hw_perf_event *hwc, struct perf_event *event)
69 + return x86_pmu_extra_regs(val, event);
70 + }
71 +
72 ++int x86_reserve_hardware(void)
73 ++{
74 ++ int err = 0;
75 ++
76 ++ if (!atomic_inc_not_zero(&active_events)) {
77 ++ mutex_lock(&pmc_reserve_mutex);
78 ++ if (atomic_read(&active_events) == 0) {
79 ++ if (!reserve_pmc_hardware())
80 ++ err = -EBUSY;
81 ++ else
82 ++ reserve_ds_buffers();
83 ++ }
84 ++ if (!err)
85 ++ atomic_inc(&active_events);
86 ++ mutex_unlock(&pmc_reserve_mutex);
87 ++ }
88 ++
89 ++ return err;
90 ++}
91 ++
92 ++void x86_release_hardware(void)
93 ++{
94 ++ if (atomic_dec_and_mutex_lock(&active_events, &pmc_reserve_mutex)) {
95 ++ release_pmc_hardware();
96 ++ release_ds_buffers();
97 ++ mutex_unlock(&pmc_reserve_mutex);
98 ++ }
99 ++}
100 ++
101 + /*
102 + * Check if we can create event of a certain type (that no conflicting events
103 + * are present).
104 +@@ -336,9 +361,10 @@ int x86_add_exclusive(unsigned int what)
105 + return 0;
106 +
107 + mutex_lock(&pmc_reserve_mutex);
108 +- for (i = 0; i < ARRAY_SIZE(x86_pmu.lbr_exclusive); i++)
109 ++ for (i = 0; i < ARRAY_SIZE(x86_pmu.lbr_exclusive); i++) {
110 + if (i != what && atomic_read(&x86_pmu.lbr_exclusive[i]))
111 + goto out;
112 ++ }
113 +
114 + atomic_inc(&x86_pmu.lbr_exclusive[what]);
115 + ret = 0;
116 +@@ -527,19 +553,7 @@ static int __x86_pmu_event_init(struct perf_event *event)
117 + if (!x86_pmu_initialized())
118 + return -ENODEV;
119 +
120 +- err = 0;
121 +- if (!atomic_inc_not_zero(&active_events)) {
122 +- mutex_lock(&pmc_reserve_mutex);
123 +- if (atomic_read(&active_events) == 0) {
124 +- if (!reserve_pmc_hardware())
125 +- err = -EBUSY;
126 +- else
127 +- reserve_ds_buffers();
128 +- }
129 +- if (!err)
130 +- atomic_inc(&active_events);
131 +- mutex_unlock(&pmc_reserve_mutex);
132 +- }
133 ++ err = x86_reserve_hardware();
134 + if (err)
135 + return err;
136 +
137 +diff --git a/arch/x86/kernel/cpu/perf_event.h b/arch/x86/kernel/cpu/perf_event.h
138 +index ef78516850fb..f068695eaca0 100644
139 +--- a/arch/x86/kernel/cpu/perf_event.h
140 ++++ b/arch/x86/kernel/cpu/perf_event.h
141 +@@ -703,6 +703,10 @@ int x86_add_exclusive(unsigned int what);
142 +
143 + void x86_del_exclusive(unsigned int what);
144 +
145 ++int x86_reserve_hardware(void);
146 ++
147 ++void x86_release_hardware(void);
148 ++
149 + void hw_perf_lbr_event_destroy(struct perf_event *event);
150 +
151 + int x86_setup_perfctr(struct perf_event *event);
152 +diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c
153 +index a1e35c9f06b9..2813ea0f142e 100644
154 +--- a/arch/x86/kernel/cpu/perf_event_intel.c
155 ++++ b/arch/x86/kernel/cpu/perf_event_intel.c
156 +@@ -3253,6 +3253,8 @@ __init int intel_pmu_init(void)
157 +
158 + case 61: /* 14nm Broadwell Core-M */
159 + case 86: /* 14nm Broadwell Xeon D */
160 ++ case 71: /* 14nm Broadwell + GT3e (Intel Iris Pro graphics) */
161 ++ case 79: /* 14nm Broadwell Server */
162 + x86_pmu.late_ack = true;
163 + memcpy(hw_cache_event_ids, hsw_hw_cache_event_ids, sizeof(hw_cache_event_ids));
164 + memcpy(hw_cache_extra_regs, hsw_hw_cache_extra_regs, sizeof(hw_cache_extra_regs));
165 +@@ -3322,13 +3324,13 @@ __init int intel_pmu_init(void)
166 + * counter, so do not extend mask to generic counters
167 + */
168 + for_each_event_constraint(c, x86_pmu.event_constraints) {
169 +- if (c->cmask != FIXED_EVENT_FLAGS
170 +- || c->idxmsk64 == INTEL_PMC_MSK_FIXED_REF_CYCLES) {
171 +- continue;
172 ++ if (c->cmask == FIXED_EVENT_FLAGS
173 ++ && c->idxmsk64 != INTEL_PMC_MSK_FIXED_REF_CYCLES) {
174 ++ c->idxmsk64 |= (1ULL << x86_pmu.num_counters) - 1;
175 + }
176 +-
177 +- c->idxmsk64 |= (1ULL << x86_pmu.num_counters) - 1;
178 +- c->weight += x86_pmu.num_counters;
179 ++ c->idxmsk64 &=
180 ++ ~(~0UL << (INTEL_PMC_IDX_FIXED + x86_pmu.num_counters_fixed));
181 ++ c->weight = hweight64(c->idxmsk64);
182 + }
183 + }
184 +
185 +diff --git a/arch/x86/kernel/cpu/perf_event_intel_bts.c b/arch/x86/kernel/cpu/perf_event_intel_bts.c
186 +index ac1f0c55f379..7795f3f8b1d5 100644
187 +--- a/arch/x86/kernel/cpu/perf_event_intel_bts.c
188 ++++ b/arch/x86/kernel/cpu/perf_event_intel_bts.c
189 +@@ -483,17 +483,26 @@ static int bts_event_add(struct perf_event *event, int mode)
190 +
191 + static void bts_event_destroy(struct perf_event *event)
192 + {
193 ++ x86_release_hardware();
194 + x86_del_exclusive(x86_lbr_exclusive_bts);
195 + }
196 +
197 + static int bts_event_init(struct perf_event *event)
198 + {
199 ++ int ret;
200 ++
201 + if (event->attr.type != bts_pmu.type)
202 + return -ENOENT;
203 +
204 + if (x86_add_exclusive(x86_lbr_exclusive_bts))
205 + return -EBUSY;
206 +
207 ++ ret = x86_reserve_hardware();
208 ++ if (ret) {
209 ++ x86_del_exclusive(x86_lbr_exclusive_bts);
210 ++ return ret;
211 ++ }
212 ++
213 + event->destroy = bts_event_destroy;
214 +
215 + return 0;
216 +diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
217 +index 53eeb226657c..7e429c99c728 100644
218 +--- a/arch/x86/kernel/head_32.S
219 ++++ b/arch/x86/kernel/head_32.S
220 +@@ -62,9 +62,16 @@
221 + #define PAGE_TABLE_SIZE(pages) ((pages) / PTRS_PER_PGD)
222 + #endif
223 +
224 +-/* Number of possible pages in the lowmem region */
225 +-LOWMEM_PAGES = (((1<<32) - __PAGE_OFFSET) >> PAGE_SHIFT)
226 +-
227 ++/*
228 ++ * Number of possible pages in the lowmem region.
229 ++ *
230 ++ * We shift 2 by 31 instead of 1 by 32 to the left in order to avoid a
231 ++ * gas warning about overflowing shift count when gas has been compiled
232 ++ * with only a host target support using a 32-bit type for internal
233 ++ * representation.
234 ++ */
235 ++LOWMEM_PAGES = (((2<<31) - __PAGE_OFFSET) >> PAGE_SHIFT)
236 ++
237 + /* Enough space to fit pagetables for the low memory linear map */
238 + MAPPING_BEYOND_END = PAGE_TABLE_SIZE(LOWMEM_PAGES) << PAGE_SHIFT
239 +
240 +diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
241 +index 8c81af6dbe06..e527a3e13939 100644
242 +--- a/drivers/bluetooth/ath3k.c
243 ++++ b/drivers/bluetooth/ath3k.c
244 +@@ -80,6 +80,7 @@ static const struct usb_device_id ath3k_table[] = {
245 + { USB_DEVICE(0x0489, 0xe057) },
246 + { USB_DEVICE(0x0489, 0xe056) },
247 + { USB_DEVICE(0x0489, 0xe05f) },
248 ++ { USB_DEVICE(0x0489, 0xe076) },
249 + { USB_DEVICE(0x0489, 0xe078) },
250 + { USB_DEVICE(0x04c5, 0x1330) },
251 + { USB_DEVICE(0x04CA, 0x3004) },
252 +@@ -88,6 +89,7 @@ static const struct usb_device_id ath3k_table[] = {
253 + { USB_DEVICE(0x04CA, 0x3007) },
254 + { USB_DEVICE(0x04CA, 0x3008) },
255 + { USB_DEVICE(0x04CA, 0x300b) },
256 ++ { USB_DEVICE(0x04CA, 0x300d) },
257 + { USB_DEVICE(0x04CA, 0x300f) },
258 + { USB_DEVICE(0x04CA, 0x3010) },
259 + { USB_DEVICE(0x0930, 0x0219) },
260 +@@ -113,6 +115,7 @@ static const struct usb_device_id ath3k_table[] = {
261 + { USB_DEVICE(0x13d3, 0x3408) },
262 + { USB_DEVICE(0x13d3, 0x3423) },
263 + { USB_DEVICE(0x13d3, 0x3432) },
264 ++ { USB_DEVICE(0x13d3, 0x3474) },
265 +
266 + /* Atheros AR5BBU12 with sflash firmware */
267 + { USB_DEVICE(0x0489, 0xE02C) },
268 +@@ -137,6 +140,7 @@ static const struct usb_device_id ath3k_blist_tbl[] = {
269 + { USB_DEVICE(0x0489, 0xe056), .driver_info = BTUSB_ATH3012 },
270 + { USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 },
271 + { USB_DEVICE(0x0489, 0xe05f), .driver_info = BTUSB_ATH3012 },
272 ++ { USB_DEVICE(0x0489, 0xe076), .driver_info = BTUSB_ATH3012 },
273 + { USB_DEVICE(0x0489, 0xe078), .driver_info = BTUSB_ATH3012 },
274 + { USB_DEVICE(0x04c5, 0x1330), .driver_info = BTUSB_ATH3012 },
275 + { USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 },
276 +@@ -145,6 +149,7 @@ static const struct usb_device_id ath3k_blist_tbl[] = {
277 + { USB_DEVICE(0x04ca, 0x3007), .driver_info = BTUSB_ATH3012 },
278 + { USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 },
279 + { USB_DEVICE(0x04ca, 0x300b), .driver_info = BTUSB_ATH3012 },
280 ++ { USB_DEVICE(0x04ca, 0x300d), .driver_info = BTUSB_ATH3012 },
281 + { USB_DEVICE(0x04ca, 0x300f), .driver_info = BTUSB_ATH3012 },
282 + { USB_DEVICE(0x04ca, 0x3010), .driver_info = BTUSB_ATH3012 },
283 + { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 },
284 +@@ -170,6 +175,7 @@ static const struct usb_device_id ath3k_blist_tbl[] = {
285 + { USB_DEVICE(0x13d3, 0x3408), .driver_info = BTUSB_ATH3012 },
286 + { USB_DEVICE(0x13d3, 0x3423), .driver_info = BTUSB_ATH3012 },
287 + { USB_DEVICE(0x13d3, 0x3432), .driver_info = BTUSB_ATH3012 },
288 ++ { USB_DEVICE(0x13d3, 0x3474), .driver_info = BTUSB_ATH3012 },
289 +
290 + /* Atheros AR5BBU22 with sflash firmware */
291 + { USB_DEVICE(0x0489, 0xE036), .driver_info = BTUSB_ATH3012 },
292 +diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
293 +index 3c10d4dfe9a7..420cc9f3eb76 100644
294 +--- a/drivers/bluetooth/btusb.c
295 ++++ b/drivers/bluetooth/btusb.c
296 +@@ -178,6 +178,7 @@ static const struct usb_device_id blacklist_table[] = {
297 + { USB_DEVICE(0x0489, 0xe056), .driver_info = BTUSB_ATH3012 },
298 + { USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 },
299 + { USB_DEVICE(0x0489, 0xe05f), .driver_info = BTUSB_ATH3012 },
300 ++ { USB_DEVICE(0x0489, 0xe076), .driver_info = BTUSB_ATH3012 },
301 + { USB_DEVICE(0x0489, 0xe078), .driver_info = BTUSB_ATH3012 },
302 + { USB_DEVICE(0x04c5, 0x1330), .driver_info = BTUSB_ATH3012 },
303 + { USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 },
304 +@@ -186,6 +187,7 @@ static const struct usb_device_id blacklist_table[] = {
305 + { USB_DEVICE(0x04ca, 0x3007), .driver_info = BTUSB_ATH3012 },
306 + { USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 },
307 + { USB_DEVICE(0x04ca, 0x300b), .driver_info = BTUSB_ATH3012 },
308 ++ { USB_DEVICE(0x04ca, 0x300d), .driver_info = BTUSB_ATH3012 },
309 + { USB_DEVICE(0x04ca, 0x300f), .driver_info = BTUSB_ATH3012 },
310 + { USB_DEVICE(0x04ca, 0x3010), .driver_info = BTUSB_ATH3012 },
311 + { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 },
312 +@@ -211,6 +213,7 @@ static const struct usb_device_id blacklist_table[] = {
313 + { USB_DEVICE(0x13d3, 0x3408), .driver_info = BTUSB_ATH3012 },
314 + { USB_DEVICE(0x13d3, 0x3423), .driver_info = BTUSB_ATH3012 },
315 + { USB_DEVICE(0x13d3, 0x3432), .driver_info = BTUSB_ATH3012 },
316 ++ { USB_DEVICE(0x13d3, 0x3474), .driver_info = BTUSB_ATH3012 },
317 +
318 + /* Atheros AR5BBU12 with sflash firmware */
319 + { USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },
320 +diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
321 +index b2f9521fe551..4cdac7801c8b 100644
322 +--- a/drivers/net/wireless/b43/main.c
323 ++++ b/drivers/net/wireless/b43/main.c
324 +@@ -5365,6 +5365,10 @@ static void b43_supported_bands(struct b43_wldev *dev, bool *have_2ghz_phy,
325 + *have_5ghz_phy = true;
326 + return;
327 + case 0x4321: /* BCM4306 */
328 ++ /* There are 14e4:4321 PCI devs with 2.4 GHz BCM4321 (N-PHY) */
329 ++ if (dev->phy.type != B43_PHYTYPE_G)
330 ++ break;
331 ++ /* fall through */
332 + case 0x4313: /* BCM4311 */
333 + case 0x431a: /* BCM4318 */
334 + case 0x432a: /* BCM4321 */
335 +diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
336 +index 5c8f58114677..a086e1d69bc7 100644
337 +--- a/drivers/usb/class/cdc-acm.c
338 ++++ b/drivers/usb/class/cdc-acm.c
339 +@@ -1477,6 +1477,11 @@ skip_countries:
340 + goto alloc_fail8;
341 + }
342 +
343 ++ if (quirks & CLEAR_HALT_CONDITIONS) {
344 ++ usb_clear_halt(usb_dev, usb_rcvbulkpipe(usb_dev, epread->bEndpointAddress));
345 ++ usb_clear_halt(usb_dev, usb_sndbulkpipe(usb_dev, epwrite->bEndpointAddress));
346 ++ }
347 ++
348 + return 0;
349 + alloc_fail8:
350 + if (acm->country_codes) {
351 +@@ -1756,6 +1761,10 @@ static const struct usb_device_id acm_ids[] = {
352 + .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */
353 + },
354 +
355 ++ { USB_DEVICE(0x2912, 0x0001), /* ATOL FPrint */
356 ++ .driver_info = CLEAR_HALT_CONDITIONS,
357 ++ },
358 ++
359 + /* Nokia S60 phones expose two ACM channels. The first is
360 + * a modem and is picked up by the standard AT-command
361 + * information below. The second is 'vendor-specific' but
362 +diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h
363 +index ffeb3c83941f..b3b6c9db6fe5 100644
364 +--- a/drivers/usb/class/cdc-acm.h
365 ++++ b/drivers/usb/class/cdc-acm.h
366 +@@ -133,3 +133,4 @@ struct acm {
367 + #define NO_DATA_INTERFACE BIT(4)
368 + #define IGNORE_DEVICE BIT(5)
369 + #define QUIRK_CONTROL_LINE_STATE BIT(6)
370 ++#define CLEAR_HALT_CONDITIONS BIT(7)
371 +diff --git a/kernel/events/core.c b/kernel/events/core.c
372 +index eddf1ed4155e..0ceb386777ae 100644
373 +--- a/kernel/events/core.c
374 ++++ b/kernel/events/core.c
375 +@@ -4331,20 +4331,20 @@ static void ring_buffer_attach(struct perf_event *event,
376 + WARN_ON_ONCE(event->rcu_pending);
377 +
378 + old_rb = event->rb;
379 +- event->rcu_batches = get_state_synchronize_rcu();
380 +- event->rcu_pending = 1;
381 +-
382 + spin_lock_irqsave(&old_rb->event_lock, flags);
383 + list_del_rcu(&event->rb_entry);
384 + spin_unlock_irqrestore(&old_rb->event_lock, flags);
385 +- }
386 +
387 +- if (event->rcu_pending && rb) {
388 +- cond_synchronize_rcu(event->rcu_batches);
389 +- event->rcu_pending = 0;
390 ++ event->rcu_batches = get_state_synchronize_rcu();
391 ++ event->rcu_pending = 1;
392 + }
393 +
394 + if (rb) {
395 ++ if (event->rcu_pending) {
396 ++ cond_synchronize_rcu(event->rcu_batches);
397 ++ event->rcu_pending = 0;
398 ++ }
399 ++
400 + spin_lock_irqsave(&rb->event_lock, flags);
401 + list_add_rcu(&event->rb_entry, &rb->event_list);
402 + spin_unlock_irqrestore(&rb->event_lock, flags);
403 +diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build
404 +index 10df57237a66..98cfc388ea33 100644
405 +--- a/tools/build/Makefile.build
406 ++++ b/tools/build/Makefile.build
407 +@@ -94,12 +94,12 @@ obj-y := $(patsubst %/, %/$(obj)-in.o, $(obj-y))
408 + subdir-obj-y := $(filter %/$(obj)-in.o, $(obj-y))
409 +
410 + # '$(OUTPUT)/dir' prefix to all objects
411 +-prefix := $(subst ./,,$(OUTPUT)$(dir)/)
412 +-obj-y := $(addprefix $(prefix),$(obj-y))
413 +-subdir-obj-y := $(addprefix $(prefix),$(subdir-obj-y))
414 ++objprefix := $(subst ./,,$(OUTPUT)$(dir)/)
415 ++obj-y := $(addprefix $(objprefix),$(obj-y))
416 ++subdir-obj-y := $(addprefix $(objprefix),$(subdir-obj-y))
417 +
418 + # Final '$(obj)-in.o' object
419 +-in-target := $(prefix)$(obj)-in.o
420 ++in-target := $(objprefix)$(obj)-in.o
421 +
422 + PHONY += $(subdir-y)
423 +