]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Aug 2017 18:11:38 +0000 (11:11 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Aug 2017 18:11:38 +0000 (11:11 -0700)
added patches:
perf-x86-fix-lbr-related-crashes-on-intel-atom.patch
usb-optimize-acpi-companion-search-for-usb-port-devices.patch
usb-qmi_wwan-add-d-link-dwm-222-device-id.patch

queue-4.4/perf-x86-fix-lbr-related-crashes-on-intel-atom.patch [new file with mode: 0644]
queue-4.4/series
queue-4.4/usb-optimize-acpi-companion-search-for-usb-port-devices.patch [new file with mode: 0644]
queue-4.4/usb-qmi_wwan-add-d-link-dwm-222-device-id.patch [new file with mode: 0644]

diff --git a/queue-4.4/perf-x86-fix-lbr-related-crashes-on-intel-atom.patch b/queue-4.4/perf-x86-fix-lbr-related-crashes-on-intel-atom.patch
new file mode 100644 (file)
index 0000000..afe7cee
--- /dev/null
@@ -0,0 +1,58 @@
+From 6fc2e83077b05a061afe9b24f2fdff7a0434eb67 Mon Sep 17 00:00:00 2001
+From: Stephane Eranian <eranian@google.com>
+Date: Thu, 3 Dec 2015 23:33:17 +0100
+Subject: perf/x86: Fix LBR related crashes on Intel Atom
+
+From: Stephane Eranian <eranian@google.com>
+
+commit 6fc2e83077b05a061afe9b24f2fdff7a0434eb67 upstream.
+
+This patches fixes the LBR kernel crashes on Intel Atom.
+
+The kernel was assuming that if the CPU supports 64-bit format
+LBR, then it has an LBR_SELECT MSR. Atom uses 64-bit LBR format
+but does not have LBR_SELECT. That was causing NULL pointer
+dereferences in a couple of places.
+
+Signed-off-by: Stephane Eranian <eranian@google.com>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
+Cc: Jiri Olsa <jolsa@redhat.com>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: Vince Weaver <vincent.weaver@maine.edu>
+Cc: kan.liang@intel.com
+Fixes: 96f3eda67fcf ("perf/x86/intel: Fix static checker warning in lbr enable")
+Link: http://lkml.kernel.org/r/1449182000-31524-2-git-send-email-eranian@google.com
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Denys Zagorui <dzagorui@cisco.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/x86/kernel/cpu/perf_event_intel_lbr.c |    8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+--- a/arch/x86/kernel/cpu/perf_event_intel_lbr.c
++++ b/arch/x86/kernel/cpu/perf_event_intel_lbr.c
+@@ -153,7 +153,7 @@ static void __intel_pmu_lbr_enable(bool
+        */
+       if (cpuc->lbr_sel)
+               lbr_select = cpuc->lbr_sel->config;
+-      if (!pmi)
++      if (!pmi && cpuc->lbr_sel)
+               wrmsrl(MSR_LBR_SELECT, lbr_select);
+       rdmsrl(MSR_IA32_DEBUGCTLMSR, debugctl);
+@@ -432,8 +432,10 @@ static void intel_pmu_lbr_read_64(struct
+       int out = 0;
+       int num = x86_pmu.lbr_nr;
+-      if (cpuc->lbr_sel->config & LBR_CALL_STACK)
+-              num = tos;
++      if (cpuc->lbr_sel) {
++              if (cpuc->lbr_sel->config & LBR_CALL_STACK)
++                      num = tos;
++      }
+       for (i = 0; i < num; i++) {
+               unsigned long lbr_idx = (tos - i) & mask;
index 1ee2bff1f1c0d6c8b513b67d23fdf700bd88e047..9eebaed6503dd109e24e687eafd7519c021c7855 100644 (file)
@@ -15,3 +15,6 @@ irqchip-atmel-aic-fix-unbalanced-of_node_put-in-aic_common_irq_fixup.patch
 irqchip-atmel-aic-fix-unbalanced-refcount-in-aic_common_rtc_irq_fixup.patch
 sanitize-move_pages-permission-checks.patch
 pids-make-task_tgid_nr_ns-safe.patch
+perf-x86-fix-lbr-related-crashes-on-intel-atom.patch
+usb-optimize-acpi-companion-search-for-usb-port-devices.patch
+usb-qmi_wwan-add-d-link-dwm-222-device-id.patch
diff --git a/queue-4.4/usb-optimize-acpi-companion-search-for-usb-port-devices.patch b/queue-4.4/usb-optimize-acpi-companion-search-for-usb-port-devices.patch
new file mode 100644 (file)
index 0000000..fb93e8e
--- /dev/null
@@ -0,0 +1,90 @@
+From ed18c5fa945768a9bec994e786edbbbc7695acf6 Mon Sep 17 00:00:00 2001
+From: Mathias Nyman <mathias.nyman@linux.intel.com>
+Date: Fri, 2 Jun 2017 16:36:26 +0300
+Subject: usb: optimize acpi companion search for usb port devices
+
+From: Mathias Nyman <mathias.nyman@linux.intel.com>
+
+commit ed18c5fa945768a9bec994e786edbbbc7695acf6 upstream.
+
+This optimization significantly reduces xhci driver load time.
+
+In ACPI tables the acpi companion port devices are children of
+the hub device. The port devices are identified by their port number
+returned by the ACPI _ADR method.
+_ADR 0 is reserved for the root hub device.
+
+The current implementation to find a acpi companion port device
+loops through all acpi port devices under that parent hub, evaluating
+their _ADR method each time a new port device is added.
+
+for a xHC controller with 25 ports under its roothub it
+will end up invoking ACPI bytecode 625 times before all ports
+are ready, making it really slow.
+
+The _ADR values are already read and cached earler. So instead of
+running the bytecode again we can check the cached _ADR value first,
+and then fall back to the old way.
+
+As one of the more significant changes, the xhci load time on
+Intel kabylake reduced by 70%, (28ms) from
+initcall xhci_pci_init+0x0/0x49 returned 0 after 39537 usecs
+to
+initcall xhci_pci_init+0x0/0x49 returned 0 after 11270 usecs
+
+Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/core/usb-acpi.c |   26 +++++++++++++++++++++++---
+ 1 file changed, 23 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/core/usb-acpi.c
++++ b/drivers/usb/core/usb-acpi.c
+@@ -127,6 +127,22 @@ out:
+  */
+ #define USB_ACPI_LOCATION_VALID (1 << 31)
++static struct acpi_device *usb_acpi_find_port(struct acpi_device *parent,
++                                            int raw)
++{
++      struct acpi_device *adev;
++
++      if (!parent)
++              return NULL;
++
++      list_for_each_entry(adev, &parent->children, node) {
++              if (acpi_device_adr(adev) == raw)
++                      return adev;
++      }
++
++      return acpi_find_child_device(parent, raw, false);
++}
++
+ static struct acpi_device *usb_acpi_find_companion(struct device *dev)
+ {
+       struct usb_device *udev;
+@@ -174,8 +190,10 @@ static struct acpi_device *usb_acpi_find
+                       int raw;
+                       raw = usb_hcd_find_raw_port_number(hcd, port1);
+-                      adev = acpi_find_child_device(ACPI_COMPANION(&udev->dev),
+-                                      raw, false);
++
++                      adev = usb_acpi_find_port(ACPI_COMPANION(&udev->dev),
++                                                raw);
++
+                       if (!adev)
+                               return NULL;
+               } else {
+@@ -186,7 +204,9 @@ static struct acpi_device *usb_acpi_find
+                               return NULL;
+                       acpi_bus_get_device(parent_handle, &adev);
+-                      adev = acpi_find_child_device(adev, port1, false);
++
++                      adev = usb_acpi_find_port(adev, port1);
++
+                       if (!adev)
+                               return NULL;
+               }
diff --git a/queue-4.4/usb-qmi_wwan-add-d-link-dwm-222-device-id.patch b/queue-4.4/usb-qmi_wwan-add-d-link-dwm-222-device-id.patch
new file mode 100644 (file)
index 0000000..186c557
--- /dev/null
@@ -0,0 +1,27 @@
+From bed9ff165960921303a100228585f2d1691b42eb Mon Sep 17 00:00:00 2001
+From: Hector Martin <marcan@marcan.st>
+Date: Wed, 2 Aug 2017 00:45:44 +0900
+Subject: usb: qmi_wwan: add D-Link DWM-222 device ID
+
+From: Hector Martin <marcan@marcan.st>
+
+commit bed9ff165960921303a100228585f2d1691b42eb upstream.
+
+Signed-off-by: Hector Martin <marcan@marcan.st>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/usb/qmi_wwan.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/net/usb/qmi_wwan.c
++++ b/drivers/net/usb/qmi_wwan.c
+@@ -707,6 +707,7 @@ static const struct usb_device_id produc
+       {QMI_FIXED_INTF(0x19d2, 0x1428, 2)},    /* Telewell TW-LTE 4G v2 */
+       {QMI_FIXED_INTF(0x19d2, 0x2002, 4)},    /* ZTE (Vodafone) K3765-Z */
+       {QMI_FIXED_INTF(0x2001, 0x7e19, 4)},    /* D-Link DWM-221 B1 */
++      {QMI_FIXED_INTF(0x2001, 0x7e35, 4)},    /* D-Link DWM-222 */
+       {QMI_FIXED_INTF(0x0f3d, 0x68a2, 8)},    /* Sierra Wireless MC7700 */
+       {QMI_FIXED_INTF(0x114f, 0x68a2, 8)},    /* Sierra Wireless MC7750 */
+       {QMI_FIXED_INTF(0x1199, 0x68a2, 8)},    /* Sierra Wireless MC7710 in QMI mode */