]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jun 2015 04:24:07 +0000 (21:24 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jun 2015 04:24:07 +0000 (21:24 -0700)
added patches:
ath3k-add-support-of-0489-e076-ar3012-device.patch
ath3k-add-support-of-13d3-3474-ar3012-device.patch
b43-fix-support-for-14e4-4321-pci-dev-with-bcm4321-chipset.patch
bluetooth-ath3k-add-support-of-04ca-300d-ar3012-device.patch
perf-fix-ring_buffer_attach-rcu-sync-again.patch
perf-tools-fix-build-breakage-if-prefix-is-specified.patch
perf-x86-add-more-broadwell-model-numbers.patch
perf-x86-honor-the-architectural-performance-monitoring-version.patch
perf-x86-intel-bts-fix-ds-area-sharing-with-x86_pmu-events.patch

queue-4.1/ath3k-add-support-of-0489-e076-ar3012-device.patch [new file with mode: 0644]
queue-4.1/ath3k-add-support-of-13d3-3474-ar3012-device.patch [new file with mode: 0644]
queue-4.1/b43-fix-support-for-14e4-4321-pci-dev-with-bcm4321-chipset.patch [new file with mode: 0644]
queue-4.1/bluetooth-ath3k-add-support-of-04ca-300d-ar3012-device.patch [new file with mode: 0644]
queue-4.1/perf-fix-ring_buffer_attach-rcu-sync-again.patch [new file with mode: 0644]
queue-4.1/perf-tools-fix-build-breakage-if-prefix-is-specified.patch [new file with mode: 0644]
queue-4.1/perf-x86-add-more-broadwell-model-numbers.patch [new file with mode: 0644]
queue-4.1/perf-x86-honor-the-architectural-performance-monitoring-version.patch [new file with mode: 0644]
queue-4.1/perf-x86-intel-bts-fix-ds-area-sharing-with-x86_pmu-events.patch [new file with mode: 0644]
queue-4.1/series

diff --git a/queue-4.1/ath3k-add-support-of-0489-e076-ar3012-device.patch b/queue-4.1/ath3k-add-support-of-0489-e076-ar3012-device.patch
new file mode 100644 (file)
index 0000000..afd04e8
--- /dev/null
@@ -0,0 +1,79 @@
+From 692c062e7c282164fd7cda68077f79dafd176eaf Mon Sep 17 00:00:00 2001
+From: Dmitry Tunin <hanipouspilot@gmail.com>
+Date: Sat, 6 Jun 2015 20:25:40 +0300
+Subject: ath3k: Add support of 0489:e076 AR3012 device
+
+From: Dmitry Tunin <hanipouspilot@gmail.com>
+
+commit 692c062e7c282164fd7cda68077f79dafd176eaf upstream.
+
+BugLink: https://bugs.launchpad.net/bugs/1462614
+
+This device requires new firmware files
+ AthrBT_0x11020100.dfu and ramps_0x11020100_40.dfu added to
+/lib/firmware/ar3k/ that are not included in linux-firmware yet.
+
+T: Bus=03 Lev=01 Prnt=01 Port=09 Cnt=06 Dev#= 7 Spd=12 MxCh= 0
+D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
+P: Vendor=0489 ProdID=e076 Rev= 0.01
+C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
+I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
+E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms
+E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
+E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
+I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
+E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms
+E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms
+I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
+E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms
+E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms
+I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
+E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms
+E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms
+I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
+E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms
+E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms
+I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
+E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms
+E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms
+I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
+E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms
+E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms
+
+Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/bluetooth/ath3k.c |    2 ++
+ drivers/bluetooth/btusb.c |    1 +
+ 2 files changed, 3 insertions(+)
+
+--- a/drivers/bluetooth/ath3k.c
++++ b/drivers/bluetooth/ath3k.c
+@@ -80,6 +80,7 @@ static const struct usb_device_id ath3k_
+       { USB_DEVICE(0x0489, 0xe057) },
+       { USB_DEVICE(0x0489, 0xe056) },
+       { USB_DEVICE(0x0489, 0xe05f) },
++      { USB_DEVICE(0x0489, 0xe076) },
+       { USB_DEVICE(0x0489, 0xe078) },
+       { USB_DEVICE(0x04c5, 0x1330) },
+       { USB_DEVICE(0x04CA, 0x3004) },
+@@ -138,6 +139,7 @@ static const struct usb_device_id ath3k_
+       { USB_DEVICE(0x0489, 0xe056), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x0489, 0xe05f), .driver_info = BTUSB_ATH3012 },
++      { USB_DEVICE(0x0489, 0xe076), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x0489, 0xe078), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x04c5, 0x1330), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 },
+--- a/drivers/bluetooth/btusb.c
++++ b/drivers/bluetooth/btusb.c
+@@ -178,6 +178,7 @@ static const struct usb_device_id blackl
+       { USB_DEVICE(0x0489, 0xe056), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x0489, 0xe05f), .driver_info = BTUSB_ATH3012 },
++      { USB_DEVICE(0x0489, 0xe076), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x0489, 0xe078), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x04c5, 0x1330), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 },
diff --git a/queue-4.1/ath3k-add-support-of-13d3-3474-ar3012-device.patch b/queue-4.1/ath3k-add-support-of-13d3-3474-ar3012-device.patch
new file mode 100644 (file)
index 0000000..f0fceb4
--- /dev/null
@@ -0,0 +1,59 @@
+From 0d0cef6183aec0fb6d0c9f00a09ff51ee086bbe2 Mon Sep 17 00:00:00 2001
+From: Dmitry Tunin <hanipouspilot@gmail.com>
+Date: Sat, 6 Jun 2015 20:29:25 +0300
+Subject: ath3k: add support of 13d3:3474 AR3012 device
+
+From: Dmitry Tunin <hanipouspilot@gmail.com>
+
+commit 0d0cef6183aec0fb6d0c9f00a09ff51ee086bbe2 upstream.
+
+BugLink: https://bugs.launchpad.net/bugs/1427680
+
+This device requires new firmware files
+ AthrBT_0x11020100.dfu and ramps_0x11020100_40.dfu added to
+/lib/firmware/ar3k/ that are not included in linux-firmware yet.
+
+T: Bus=01 Lev=01 Prnt=01 Port=04 Cnt=01 Dev#= 4 Spd=12 MxCh= 0
+D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
+P: Vendor=13d3 ProdID=3474 Rev=00.01
+C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
+I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+
+Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/bluetooth/ath3k.c |    2 ++
+ drivers/bluetooth/btusb.c |    1 +
+ 2 files changed, 3 insertions(+)
+
+--- a/drivers/bluetooth/ath3k.c
++++ b/drivers/bluetooth/ath3k.c
+@@ -115,6 +115,7 @@ static const struct usb_device_id ath3k_
+       { USB_DEVICE(0x13d3, 0x3408) },
+       { USB_DEVICE(0x13d3, 0x3423) },
+       { USB_DEVICE(0x13d3, 0x3432) },
++      { USB_DEVICE(0x13d3, 0x3474) },
+       /* Atheros AR5BBU12 with sflash firmware */
+       { USB_DEVICE(0x0489, 0xE02C) },
+@@ -174,6 +175,7 @@ static const struct usb_device_id ath3k_
+       { USB_DEVICE(0x13d3, 0x3408), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x13d3, 0x3423), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x13d3, 0x3432), .driver_info = BTUSB_ATH3012 },
++      { USB_DEVICE(0x13d3, 0x3474), .driver_info = BTUSB_ATH3012 },
+       /* Atheros AR5BBU22 with sflash firmware */
+       { USB_DEVICE(0x0489, 0xE036), .driver_info = BTUSB_ATH3012 },
+--- a/drivers/bluetooth/btusb.c
++++ b/drivers/bluetooth/btusb.c
+@@ -213,6 +213,7 @@ static const struct usb_device_id blackl
+       { USB_DEVICE(0x13d3, 0x3408), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x13d3, 0x3423), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x13d3, 0x3432), .driver_info = BTUSB_ATH3012 },
++      { USB_DEVICE(0x13d3, 0x3474), .driver_info = BTUSB_ATH3012 },
+       /* Atheros AR5BBU12 with sflash firmware */
+       { USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },
diff --git a/queue-4.1/b43-fix-support-for-14e4-4321-pci-dev-with-bcm4321-chipset.patch b/queue-4.1/b43-fix-support-for-14e4-4321-pci-dev-with-bcm4321-chipset.patch
new file mode 100644 (file)
index 0000000..a846808
--- /dev/null
@@ -0,0 +1,41 @@
+From 90f91b129810c3f169e443252be30ed7c0130326 Mon Sep 17 00:00:00 2001
+From: Rafał Miłecki <zajec5@gmail.com>
+Date: Sat, 6 Jun 2015 22:45:59 +0200
+Subject: b43: fix support for 14e4:4321 PCI dev with BCM4321 chipset
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Rafał Miłecki <zajec5@gmail.com>
+
+commit 90f91b129810c3f169e443252be30ed7c0130326 upstream.
+
+It seems Broadcom released two devices with conflicting device id. There
+are for sure 14e4:4321 PCI devices with BCM4321 (N-PHY) chipset, they
+can be found in routers, e.g. Netgear WNR834Bv2. However, according to
+Broadcom public sources 0x4321 is also used for 5 GHz BCM4306 (G-PHY).
+It's unsure if they meant PCI device id, or "virtual" id (from SPROM).
+To distinguish these devices lets check PHY type (G vs. N).
+
+Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
+Cc: <stable@vger.kernel.org> # 3.16+
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/b43/main.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/net/wireless/b43/main.c
++++ b/drivers/net/wireless/b43/main.c
+@@ -5365,6 +5365,10 @@ static void b43_supported_bands(struct b
+               *have_5ghz_phy = true;
+               return;
+       case 0x4321: /* BCM4306 */
++              /* There are 14e4:4321 PCI devs with 2.4 GHz BCM4321 (N-PHY) */
++              if (dev->phy.type != B43_PHYTYPE_G)
++                      break;
++              /* fall through */
+       case 0x4313: /* BCM4311 */
+       case 0x431a: /* BCM4318 */
+       case 0x432a: /* BCM4321 */
diff --git a/queue-4.1/bluetooth-ath3k-add-support-of-04ca-300d-ar3012-device.patch b/queue-4.1/bluetooth-ath3k-add-support-of-04ca-300d-ar3012-device.patch
new file mode 100644 (file)
index 0000000..2fb1607
--- /dev/null
@@ -0,0 +1,79 @@
+From 7e730c7f3d1f39c25cf5f7cf70c0ff4c28d7bec7 Mon Sep 17 00:00:00 2001
+From: Dmitry Tunin <hanipouspilot@gmail.com>
+Date: Thu, 18 Jun 2015 20:41:51 +0300
+Subject: Bluetooth: ath3k: Add support of 04ca:300d AR3012 device
+
+From: Dmitry Tunin <hanipouspilot@gmail.com>
+
+commit 7e730c7f3d1f39c25cf5f7cf70c0ff4c28d7bec7 upstream.
+
+BugLink: https://bugs.launchpad.net/bugs/1394368
+
+This device requires new firmware files
+ AthrBT_0x11020100.dfu and ramps_0x11020100_40.dfu added to
+/lib/firmware/ar3k/ that are not included in linux-firmware yet.
+
+T: Bus=02 Lev=01 Prnt=01 Port=04 Cnt=03 Dev#= 5 Spd=12 MxCh= 0
+D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
+P: Vendor=04ca ProdID=300d Rev= 0.01
+C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
+I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms
+E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
+E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
+I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms
+E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms
+I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms
+E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms
+I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms
+E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms
+I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms
+E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms
+I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms
+E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms
+I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms
+E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms
+
+Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/bluetooth/ath3k.c |    2 ++
+ drivers/bluetooth/btusb.c |    1 +
+ 2 files changed, 3 insertions(+)
+
+--- a/drivers/bluetooth/ath3k.c
++++ b/drivers/bluetooth/ath3k.c
+@@ -88,6 +88,7 @@ static const struct usb_device_id ath3k_
+       { USB_DEVICE(0x04CA, 0x3007) },
+       { USB_DEVICE(0x04CA, 0x3008) },
+       { USB_DEVICE(0x04CA, 0x300b) },
++      { USB_DEVICE(0x04CA, 0x300d) },
+       { USB_DEVICE(0x04CA, 0x300f) },
+       { USB_DEVICE(0x04CA, 0x3010) },
+       { USB_DEVICE(0x0930, 0x0219) },
+@@ -145,6 +146,7 @@ static const struct usb_device_id ath3k_
+       { USB_DEVICE(0x04ca, 0x3007), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x04ca, 0x300b), .driver_info = BTUSB_ATH3012 },
++      { USB_DEVICE(0x04ca, 0x300d), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x04ca, 0x300f), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x04ca, 0x3010), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 },
+--- a/drivers/bluetooth/btusb.c
++++ b/drivers/bluetooth/btusb.c
+@@ -186,6 +186,7 @@ static const struct usb_device_id blackl
+       { USB_DEVICE(0x04ca, 0x3007), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x04ca, 0x300b), .driver_info = BTUSB_ATH3012 },
++      { USB_DEVICE(0x04ca, 0x300d), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x04ca, 0x300f), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x04ca, 0x3010), .driver_info = BTUSB_ATH3012 },
+       { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 },
diff --git a/queue-4.1/perf-fix-ring_buffer_attach-rcu-sync-again.patch b/queue-4.1/perf-fix-ring_buffer_attach-rcu-sync-again.patch
new file mode 100644 (file)
index 0000000..c8ca0bd
--- /dev/null
@@ -0,0 +1,80 @@
+From 2f993cf093643b98477c421fa2b9a98dcc940323 Mon Sep 17 00:00:00 2001
+From: Oleg Nesterov <oleg@redhat.com>
+Date: Sat, 30 May 2015 22:04:25 +0200
+Subject: perf: Fix ring_buffer_attach() RCU sync, again
+
+From: Oleg Nesterov <oleg@redhat.com>
+
+commit 2f993cf093643b98477c421fa2b9a98dcc940323 upstream.
+
+While looking for other users of get_state/cond_sync. I Found
+ring_buffer_attach() and it looks obviously buggy?
+
+Don't we need to ensure that we have "synchronize" _between_
+list_del() and list_add() ?
+
+IOW. Suppose that ring_buffer_attach() preempts right_after
+get_state_synchronize_rcu() and gp completes before spin_lock().
+
+In this case cond_synchronize_rcu() does nothing and we reuse
+->rb_entry without waiting for gp in between?
+
+It also moves the ->rcu_pending check under "if (rb)", to make it
+more readable imo.
+
+Signed-off-by: Oleg Nesterov <oleg@redhat.com>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Cc: Andy Lutomirski <luto@amacapital.net>
+Cc: Borislav Petkov <bp@alien8.de>
+Cc: Brian Gerst <brgerst@gmail.com>
+Cc: Denys Vlasenko <dvlasenk@redhat.com>
+Cc: H. Peter Anvin <hpa@zytor.com>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: dave@stgolabs.net
+Cc: der.herr@hofr.at
+Cc: josh@joshtriplett.org
+Cc: tj@kernel.org
+Fixes: b69cf53640da ("perf: Fix a race between ring_buffer_detach() and ring_buffer_attach()")
+Link: http://lkml.kernel.org/r/20150530200425.GA15748@redhat.com
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/events/core.c |   14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+--- a/kernel/events/core.c
++++ b/kernel/events/core.c
+@@ -4331,20 +4331,20 @@ static void ring_buffer_attach(struct pe
+               WARN_ON_ONCE(event->rcu_pending);
+               old_rb = event->rb;
+-              event->rcu_batches = get_state_synchronize_rcu();
+-              event->rcu_pending = 1;
+-
+               spin_lock_irqsave(&old_rb->event_lock, flags);
+               list_del_rcu(&event->rb_entry);
+               spin_unlock_irqrestore(&old_rb->event_lock, flags);
+-      }
+-      if (event->rcu_pending && rb) {
+-              cond_synchronize_rcu(event->rcu_batches);
+-              event->rcu_pending = 0;
++              event->rcu_batches = get_state_synchronize_rcu();
++              event->rcu_pending = 1;
+       }
+       if (rb) {
++              if (event->rcu_pending) {
++                      cond_synchronize_rcu(event->rcu_batches);
++                      event->rcu_pending = 0;
++              }
++
+               spin_lock_irqsave(&rb->event_lock, flags);
+               list_add_rcu(&event->rb_entry, &rb->event_list);
+               spin_unlock_irqrestore(&rb->event_lock, flags);
diff --git a/queue-4.1/perf-tools-fix-build-breakage-if-prefix-is-specified.patch b/queue-4.1/perf-tools-fix-build-breakage-if-prefix-is-specified.patch
new file mode 100644 (file)
index 0000000..a594ec4
--- /dev/null
@@ -0,0 +1,49 @@
+From 75e84ab906ef8935cff3df3d8929f1bafea81599 Mon Sep 17 00:00:00 2001
+From: Lukas Wunner <lukas@wunner.de>
+Date: Thu, 18 Jun 2015 13:00:32 +0200
+Subject: perf tools: Fix build breakage if prefix= is specified
+
+From: Lukas Wunner <lukas@wunner.de>
+
+commit 75e84ab906ef8935cff3df3d8929f1bafea81599 upstream.
+
+Invoking Makefile.perf with prefix= breaks the build since Makefile.perf
+hands that variable down to Makefile.build where it overrides
+
+    prefix       := $(subst ./,,$(OUTPUT)$(dir)/)
+
+leading to errors like this:
+
+    No rule to make target '/usrabspath.o', needed by '/usrlibperf-in.o'
+
+Signed-off-by: Lukas Wunner <lukas@wunner.de>
+Acked-by: Jiri Olsa <jolsa@kernel.org>
+Cc: David Ahern <dsahern@gmail.com>
+Fixes: c819e2cf2eb6f65d3208d195d7a0edef6108d5
+Link: http://lkml.kernel.org/r/5582c48a.84a22b0a.a918.5285SMTPIN_ADDED_MISSING@mx.google.com
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ tools/build/Makefile.build |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/tools/build/Makefile.build
++++ b/tools/build/Makefile.build
+@@ -94,12 +94,12 @@ obj-y        := $(patsubst %/, %/$(obj)-
+ subdir-obj-y := $(filter %/$(obj)-in.o, $(obj-y))
+ # '$(OUTPUT)/dir' prefix to all objects
+-prefix       := $(subst ./,,$(OUTPUT)$(dir)/)
+-obj-y        := $(addprefix $(prefix),$(obj-y))
+-subdir-obj-y := $(addprefix $(prefix),$(subdir-obj-y))
++objprefix    := $(subst ./,,$(OUTPUT)$(dir)/)
++obj-y        := $(addprefix $(objprefix),$(obj-y))
++subdir-obj-y := $(addprefix $(objprefix),$(subdir-obj-y))
+ # Final '$(obj)-in.o' object
+-in-target := $(prefix)$(obj)-in.o
++in-target := $(objprefix)$(obj)-in.o
+ PHONY += $(subdir-y)
diff --git a/queue-4.1/perf-x86-add-more-broadwell-model-numbers.patch b/queue-4.1/perf-x86-add-more-broadwell-model-numbers.patch
new file mode 100644 (file)
index 0000000..f693edf
--- /dev/null
@@ -0,0 +1,44 @@
+From 4b36f1a4139c9284df74c0f5d7655603d67807df Mon Sep 17 00:00:00 2001
+From: Andi Kleen <ak@linux.intel.com>
+Date: Thu, 11 Jun 2015 13:52:22 -0700
+Subject: perf/x86: Add more Broadwell model numbers
+
+From: Andi Kleen <ak@linux.intel.com>
+
+commit 4b36f1a4139c9284df74c0f5d7655603d67807df upstream.
+
+This patch adds additional model numbers for Broadwell to perf.
+Support for Broadwell with Iris Pro (Intel Core i7-57xxC)
+and support for Broadwell Server Xeon.
+
+Signed-off-by: Andi Kleen <ak@linux.intel.com>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Cc: Andy Lutomirski <luto@amacapital.net>
+Cc: Borislav Petkov <bp@alien8.de>
+Cc: Brian Gerst <brgerst@gmail.com>
+Cc: Denys Vlasenko <dvlasenk@redhat.com>
+Cc: H. Peter Anvin <hpa@zytor.com>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Oleg Nesterov <oleg@redhat.com>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Link: http://lkml.kernel.org/r/1434055942-28253-1-git-send-email-andi@firstfloor.org
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kernel/cpu/perf_event_intel.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/arch/x86/kernel/cpu/perf_event_intel.c
++++ b/arch/x86/kernel/cpu/perf_event_intel.c
+@@ -3253,6 +3253,8 @@ __init int intel_pmu_init(void)
+       case 61: /* 14nm Broadwell Core-M */
+       case 86: /* 14nm Broadwell Xeon D */
++      case 71: /* 14nm Broadwell + GT3e (Intel Iris Pro graphics) */
++      case 79: /* 14nm Broadwell Server */
+               x86_pmu.late_ack = true;
+               memcpy(hw_cache_event_ids, hsw_hw_cache_event_ids, sizeof(hw_cache_event_ids));
+               memcpy(hw_cache_extra_regs, hsw_hw_cache_extra_regs, sizeof(hw_cache_extra_regs));
diff --git a/queue-4.1/perf-x86-honor-the-architectural-performance-monitoring-version.patch b/queue-4.1/perf-x86-honor-the-architectural-performance-monitoring-version.patch
new file mode 100644 (file)
index 0000000..881f843
--- /dev/null
@@ -0,0 +1,66 @@
+From 2c33645d366d13b969d936b68b9f4875b1fdddea Mon Sep 17 00:00:00 2001
+From: "Palik, Imre" <imrep@amazon.de>
+Date: Mon, 8 Jun 2015 14:46:49 +0200
+Subject: perf/x86: Honor the architectural performance monitoring version
+
+From: "Palik, Imre" <imrep@amazon.de>
+
+commit 2c33645d366d13b969d936b68b9f4875b1fdddea upstream.
+
+Architectural performance monitoring, version 1, doesn't support fixed counters.
+
+Currently, even if a hypervisor advertises support for architectural
+performance monitoring version 1, perf may still try to use the fixed
+counters, as the constraints are set up based on the CPU model.
+
+This patch ensures that perf honors the architectural performance monitoring
+version returned by CPUID, and it only uses the fixed counters for version 2
+and above.
+
+(Some of the ideas in this patch came from Peter Zijlstra.)
+
+Signed-off-by: Imre Palik <imrep@amazon.de>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Cc: Andy Lutomirski <luto@amacapital.net>
+Cc: Anthony Liguori <aliguori@amazon.com>
+Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
+Cc: Borislav Petkov <bp@alien8.de>
+Cc: Brian Gerst <brgerst@gmail.com>
+Cc: Denys Vlasenko <dvlasenk@redhat.com>
+Cc: H. Peter Anvin <hpa@zytor.com>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Oleg Nesterov <oleg@redhat.com>
+Cc: Paul Mackerras <paulus@samba.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Link: http://lkml.kernel.org/r/1433767609-1039-1-git-send-email-imrep.amz@gmail.com
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kernel/cpu/perf_event_intel.c |   12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+--- a/arch/x86/kernel/cpu/perf_event_intel.c
++++ b/arch/x86/kernel/cpu/perf_event_intel.c
+@@ -3324,13 +3324,13 @@ __init int intel_pmu_init(void)
+                * counter, so do not extend mask to generic counters
+                */
+               for_each_event_constraint(c, x86_pmu.event_constraints) {
+-                      if (c->cmask != FIXED_EVENT_FLAGS
+-                          || c->idxmsk64 == INTEL_PMC_MSK_FIXED_REF_CYCLES) {
+-                              continue;
++                      if (c->cmask == FIXED_EVENT_FLAGS
++                          && c->idxmsk64 != INTEL_PMC_MSK_FIXED_REF_CYCLES) {
++                              c->idxmsk64 |= (1ULL << x86_pmu.num_counters) - 1;
+                       }
+-
+-                      c->idxmsk64 |= (1ULL << x86_pmu.num_counters) - 1;
+-                      c->weight += x86_pmu.num_counters;
++                      c->idxmsk64 &=
++                              ~(~0UL << (INTEL_PMC_IDX_FIXED + x86_pmu.num_counters_fixed));
++                      c->weight = hweight64(c->idxmsk64);
+               }
+       }
diff --git a/queue-4.1/perf-x86-intel-bts-fix-ds-area-sharing-with-x86_pmu-events.patch b/queue-4.1/perf-x86-intel-bts-fix-ds-area-sharing-with-x86_pmu-events.patch
new file mode 100644 (file)
index 0000000..c360032
--- /dev/null
@@ -0,0 +1,170 @@
+From 6b099d9b040b0f3d0aec05b560d7caf879af5077 Mon Sep 17 00:00:00 2001
+From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
+Date: Thu, 11 Jun 2015 15:13:56 +0300
+Subject: perf/x86/intel/bts: Fix DS area sharing with x86_pmu events
+
+From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
+
+commit 6b099d9b040b0f3d0aec05b560d7caf879af5077 upstream.
+
+Currently, the intel_bts driver relies on the DS area allocated by the x86_pmu
+code in its event_init() path, which is a bug: creating a BTS event while
+no x86_pmu events are present results in a NULL pointer dereference.
+
+The same DS area is also used by PEBS sampling, which makes it quite a bit
+trickier to have a separate one for intel_bts' purposes.
+
+This patch makes intel_bts driver use the same DS allocation and reference
+counting code as x86_pmu to make sure it is always present when either
+intel_bts or x86_pmu need it.
+
+Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Cc: Andy Lutomirski <luto@amacapital.net>
+Cc: Borislav Petkov <bp@alien8.de>
+Cc: Brian Gerst <brgerst@gmail.com>
+Cc: Denys Vlasenko <dvlasenk@redhat.com>
+Cc: H. Peter Anvin <hpa@zytor.com>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Oleg Nesterov <oleg@redhat.com>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: acme@infradead.org
+Cc: adrian.hunter@intel.com
+Link: http://lkml.kernel.org/r/1434024837-9916-2-git-send-email-alexander.shishkin@linux.intel.com
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kernel/cpu/perf_event.c           |   52 ++++++++++++++++++-----------
+ arch/x86/kernel/cpu/perf_event.h           |    4 ++
+ arch/x86/kernel/cpu/perf_event_intel_bts.c |    9 +++++
+ 3 files changed, 46 insertions(+), 19 deletions(-)
+
+--- a/arch/x86/kernel/cpu/perf_event.c
++++ b/arch/x86/kernel/cpu/perf_event.c
+@@ -270,11 +270,7 @@ msr_fail:
+ static void hw_perf_event_destroy(struct perf_event *event)
+ {
+-      if (atomic_dec_and_mutex_lock(&active_events, &pmc_reserve_mutex)) {
+-              release_pmc_hardware();
+-              release_ds_buffers();
+-              mutex_unlock(&pmc_reserve_mutex);
+-      }
++      x86_release_hardware();
+ }
+ void hw_perf_lbr_event_destroy(struct perf_event *event)
+@@ -324,6 +320,35 @@ set_ext_hw_attr(struct hw_perf_event *hw
+       return x86_pmu_extra_regs(val, event);
+ }
++int x86_reserve_hardware(void)
++{
++      int err = 0;
++
++      if (!atomic_inc_not_zero(&active_events)) {
++              mutex_lock(&pmc_reserve_mutex);
++              if (atomic_read(&active_events) == 0) {
++                      if (!reserve_pmc_hardware())
++                              err = -EBUSY;
++                      else
++                              reserve_ds_buffers();
++              }
++              if (!err)
++                      atomic_inc(&active_events);
++              mutex_unlock(&pmc_reserve_mutex);
++      }
++
++      return err;
++}
++
++void x86_release_hardware(void)
++{
++      if (atomic_dec_and_mutex_lock(&active_events, &pmc_reserve_mutex)) {
++              release_pmc_hardware();
++              release_ds_buffers();
++              mutex_unlock(&pmc_reserve_mutex);
++      }
++}
++
+ /*
+  * Check if we can create event of a certain type (that no conflicting events
+  * are present).
+@@ -336,9 +361,10 @@ int x86_add_exclusive(unsigned int what)
+               return 0;
+       mutex_lock(&pmc_reserve_mutex);
+-      for (i = 0; i < ARRAY_SIZE(x86_pmu.lbr_exclusive); i++)
++      for (i = 0; i < ARRAY_SIZE(x86_pmu.lbr_exclusive); i++) {
+               if (i != what && atomic_read(&x86_pmu.lbr_exclusive[i]))
+                       goto out;
++      }
+       atomic_inc(&x86_pmu.lbr_exclusive[what]);
+       ret = 0;
+@@ -527,19 +553,7 @@ static int __x86_pmu_event_init(struct p
+       if (!x86_pmu_initialized())
+               return -ENODEV;
+-      err = 0;
+-      if (!atomic_inc_not_zero(&active_events)) {
+-              mutex_lock(&pmc_reserve_mutex);
+-              if (atomic_read(&active_events) == 0) {
+-                      if (!reserve_pmc_hardware())
+-                              err = -EBUSY;
+-                      else
+-                              reserve_ds_buffers();
+-              }
+-              if (!err)
+-                      atomic_inc(&active_events);
+-              mutex_unlock(&pmc_reserve_mutex);
+-      }
++      err = x86_reserve_hardware();
+       if (err)
+               return err;
+--- a/arch/x86/kernel/cpu/perf_event.h
++++ b/arch/x86/kernel/cpu/perf_event.h
+@@ -703,6 +703,10 @@ int x86_add_exclusive(unsigned int what)
+ void x86_del_exclusive(unsigned int what);
++int x86_reserve_hardware(void);
++
++void x86_release_hardware(void);
++
+ void hw_perf_lbr_event_destroy(struct perf_event *event);
+ int x86_setup_perfctr(struct perf_event *event);
+--- a/arch/x86/kernel/cpu/perf_event_intel_bts.c
++++ b/arch/x86/kernel/cpu/perf_event_intel_bts.c
+@@ -483,17 +483,26 @@ static int bts_event_add(struct perf_eve
+ static void bts_event_destroy(struct perf_event *event)
+ {
++      x86_release_hardware();
+       x86_del_exclusive(x86_lbr_exclusive_bts);
+ }
+ static int bts_event_init(struct perf_event *event)
+ {
++      int ret;
++
+       if (event->attr.type != bts_pmu.type)
+               return -ENOENT;
+       if (x86_add_exclusive(x86_lbr_exclusive_bts))
+               return -EBUSY;
++      ret = x86_reserve_hardware();
++      if (ret) {
++              x86_del_exclusive(x86_lbr_exclusive_bts);
++              return ret;
++      }
++
+       event->destroy = bts_event_destroy;
+       return 0;
index 9fc8b70ffbb8ed352e591eb3abd3290b67b42d1b..8553f1080ecdc2d28240987eab12ebee228d0ea5 100644 (file)
@@ -1 +1,10 @@
 x86-boot-fix-overflow-warning-with-32-bit-binutils.patch
+perf-fix-ring_buffer_attach-rcu-sync-again.patch
+perf-x86-add-more-broadwell-model-numbers.patch
+perf-x86-intel-bts-fix-ds-area-sharing-with-x86_pmu-events.patch
+perf-x86-honor-the-architectural-performance-monitoring-version.patch
+perf-tools-fix-build-breakage-if-prefix-is-specified.patch
+bluetooth-ath3k-add-support-of-04ca-300d-ar3012-device.patch
+ath3k-add-support-of-0489-e076-ar3012-device.patch
+ath3k-add-support-of-13d3-3474-ar3012-device.patch
+b43-fix-support-for-14e4-4321-pci-dev-with-bcm4321-chipset.patch