]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Feb 2015 03:53:24 +0000 (19:53 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Feb 2015 03:53:24 +0000 (19:53 -0800)
added patches:
hid-rmi-check-for-additional-acm-registers-appended-to-f11.patch
memcg-remove-extra-newlines-from-memcg-oom-kill-log.patch
perf-rapl-fix-crash-in-rapl_scale.patch
perf-x86-intel-add-model-number-for-airmont.patch

queue-3.18/hid-rmi-check-for-additional-acm-registers-appended-to-f11.patch [new file with mode: 0644]
queue-3.18/memcg-remove-extra-newlines-from-memcg-oom-kill-log.patch [new file with mode: 0644]
queue-3.18/perf-rapl-fix-crash-in-rapl_scale.patch [new file with mode: 0644]
queue-3.18/perf-x86-intel-add-model-number-for-airmont.patch [new file with mode: 0644]
queue-3.18/series

diff --git a/queue-3.18/hid-rmi-check-for-additional-acm-registers-appended-to-f11.patch b/queue-3.18/hid-rmi-check-for-additional-acm-registers-appended-to-f11.patch
new file mode 100644 (file)
index 0000000..9625cb3
--- /dev/null
@@ -0,0 +1,149 @@
+From 8414947a2018a98cf3adc975dc279f41ba30ab11 Mon Sep 17 00:00:00 2001
+From: Andrew Duggan <aduggan@synaptics.com>
+Date: Mon, 8 Dec 2014 15:01:59 -0800
+Subject: HID: rmi: Check for additional ACM registers appended to F11
+ data report
+
+From: Andrew Duggan <aduggan@synaptics.com>
+
+commit 8414947a2018a98cf3adc975dc279f41ba30ab11 upstream.
+
+If a touchpad reports the F11 data40 register then this indicates that the touchpad reports
+additional ACM (Accidental Contact Mitigation) data after the F11 data in the HID attention
+report. These additional bytes shift the position of the F30 button data causing the driver
+to incorrectly report button state when this functionality is present. This patch accounts
+for the additional data in the report.
+
+Fixes:
+https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1398533
+
+Signed-off-by: Andrew Duggan <aduggan@synaptics.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Cc: Joseph Salisbury <joseph.salisbury@canonical.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hid/hid-rmi.c |   61 ++++++++++++++++++++++++++++++++++++++++++--------
+ 1 file changed, 52 insertions(+), 9 deletions(-)
+
+--- a/drivers/hid/hid-rmi.c
++++ b/drivers/hid/hid-rmi.c
+@@ -584,11 +584,15 @@ static int rmi_populate_f11(struct hid_d
+       bool has_query10 = false;
+       bool has_query11;
+       bool has_query12;
++      bool has_query27;
++      bool has_query28;
++      bool has_query36 = false;
+       bool has_physical_props;
+       bool has_gestures;
+       bool has_rel;
++      bool has_data40 = false;
+       unsigned x_size, y_size;
+-      u16 query12_offset;
++      u16 query_offset;
+       if (!data->f11.query_base_addr) {
+               hid_err(hdev, "No 2D sensor found, giving up.\n");
+@@ -604,6 +608,8 @@ static int rmi_populate_f11(struct hid_d
+       has_query9 = !!(buf[0] & BIT(3));
+       has_query11 = !!(buf[0] & BIT(4));
+       has_query12 = !!(buf[0] & BIT(5));
++      has_query27 = !!(buf[0] & BIT(6));
++      has_query28 = !!(buf[0] & BIT(7));
+       /* query 1 to get the max number of fingers */
+       ret = rmi_read(hdev, data->f11.query_base_addr + 1, buf);
+@@ -642,27 +648,27 @@ static int rmi_populate_f11(struct hid_d
+        * +1 for query 5 which is present since absolute events are
+        * reported and +1 for query 12.
+        */
+-      query12_offset = 6;
++      query_offset = 6;
+       if (has_rel)
+-              ++query12_offset; /* query 6 is present */
++              ++query_offset; /* query 6 is present */
+       if (has_gestures)
+-              query12_offset += 2; /* query 7 and 8 are present */
++              query_offset += 2; /* query 7 and 8 are present */
+       if (has_query9)
+-              ++query12_offset;
++              ++query_offset;
+       if (has_query10)
+-              ++query12_offset;
++              ++query_offset;
+       if (has_query11)
+-              ++query12_offset;
++              ++query_offset;
+       /* query 12 to know if the physical properties are reported */
+       if (has_query12) {
+               ret = rmi_read(hdev, data->f11.query_base_addr
+-                              + query12_offset, buf);
++                              + query_offset, buf);
+               if (ret) {
+                       hid_err(hdev, "can not get query 12: %d.\n", ret);
+                       return ret;
+@@ -670,9 +676,10 @@ static int rmi_populate_f11(struct hid_d
+               has_physical_props = !!(buf[0] & BIT(5));
+               if (has_physical_props) {
++                      query_offset += 1;
+                       ret = rmi_read_block(hdev,
+                                       data->f11.query_base_addr
+-                                              + query12_offset + 1, buf, 4);
++                                              + query_offset, buf, 4);
+                       if (ret) {
+                               hid_err(hdev, "can not read query 15-18: %d.\n",
+                                       ret);
+@@ -687,9 +694,45 @@ static int rmi_populate_f11(struct hid_d
+                       hid_info(hdev, "%s: size in mm: %d x %d\n",
+                                __func__, data->x_size_mm, data->y_size_mm);
++
++                      /*
++                       * query 15 - 18 contain the size of the sensor
++                       * and query 19 - 26 contain bezel dimensions
++                       */
++                      query_offset += 12;
++              }
++      }
++
++      if (has_query27)
++              ++query_offset;
++
++      if (has_query28) {
++              ret = rmi_read(hdev, data->f11.query_base_addr
++                              + query_offset, buf);
++              if (ret) {
++                      hid_err(hdev, "can not get query 28: %d.\n", ret);
++                      return ret;
++              }
++
++              has_query36 = !!(buf[0] & BIT(6));
++      }
++
++      if (has_query36) {
++              query_offset += 2;
++              ret = rmi_read(hdev, data->f11.query_base_addr
++                              + query_offset, buf);
++              if (ret) {
++                      hid_err(hdev, "can not get query 36: %d.\n", ret);
++                      return ret;
+               }
++
++              has_data40 = !!(buf[0] & BIT(5));
+       }
++
++      if (has_data40)
++              data->f11.report_size += data->max_fingers * 2;
++
+       /*
+        * retrieve the ctrl registers
+        * the ctrl register has a size of 20 but a fw bug split it into 16 + 4,
diff --git a/queue-3.18/memcg-remove-extra-newlines-from-memcg-oom-kill-log.patch b/queue-3.18/memcg-remove-extra-newlines-from-memcg-oom-kill-log.patch
new file mode 100644 (file)
index 0000000..1458cb2
--- /dev/null
@@ -0,0 +1,52 @@
+From 0346dadbf041a2606bcb5bd27828b0d105897f4a Mon Sep 17 00:00:00 2001
+From: Greg Thelen <gthelen@google.com>
+Date: Mon, 26 Jan 2015 12:58:38 -0800
+Subject: memcg: remove extra newlines from memcg oom kill log
+
+From: Greg Thelen <gthelen@google.com>
+
+commit 0346dadbf041a2606bcb5bd27828b0d105897f4a upstream.
+
+Commit e61734c55c24 ("cgroup: remove cgroup->name") added two extra
+newlines to memcg oom kill log messages.  This makes dmesg hard to read
+and parse.  The issue affects 3.15+.
+
+Example:
+
+  Task in /t                          <<< extra #1
+   killed as a result of limit of /t
+                                      <<< extra #2
+  memory: usage 102400kB, limit 102400kB, failcnt 274712
+
+Remove the extra newlines from memcg oom kill messages, so the messages
+look like:
+
+  Task in /t killed as a result of limit of /t
+  memory: usage 102400kB, limit 102400kB, failcnt 240649
+
+Fixes: e61734c55c24 ("cgroup: remove cgroup->name")
+Signed-off-by: Greg Thelen <gthelen@google.com>
+Acked-by: Michal Hocko <mhocko@suse.cz>
+Acked-by: Johannes Weiner <hannes@cmpxchg.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ mm/memcontrol.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/mm/memcontrol.c
++++ b/mm/memcontrol.c
+@@ -1638,9 +1638,9 @@ void mem_cgroup_print_oom_info(struct me
+       pr_info("Task in ");
+       pr_cont_cgroup_path(task_cgroup(p, memory_cgrp_id));
+-      pr_info(" killed as a result of limit of ");
++      pr_cont(" killed as a result of limit of ");
+       pr_cont_cgroup_path(memcg->css.cgroup);
+-      pr_info("\n");
++      pr_cont("\n");
+       rcu_read_unlock();
diff --git a/queue-3.18/perf-rapl-fix-crash-in-rapl_scale.patch b/queue-3.18/perf-rapl-fix-crash-in-rapl_scale.patch
new file mode 100644 (file)
index 0000000..edd420e
--- /dev/null
@@ -0,0 +1,48 @@
+From 98b008dff8452653909d9263efda925873e8d8bb Mon Sep 17 00:00:00 2001
+From: Stephane Eranian <eranian@google.com>
+Date: Thu, 22 Jan 2015 21:38:34 +0100
+Subject: perf/rapl: Fix crash in rapl_scale()
+
+From: Stephane Eranian <eranian@google.com>
+
+commit 98b008dff8452653909d9263efda925873e8d8bb upstream.
+
+This patch fixes a systematic crash in rapl_scale()
+due to an invalid pointer.
+
+The bug was introduced by commit:
+
+  89cbc76768c2 ("x86: Replace __get_cpu_var uses")
+
+The fix is simple. Just put the parenthesis where it needs
+to be, i.e., around rapl_pmu. To my surprise, the compiler
+was not complaining about passing an integer instead of a
+pointer.
+
+Reported-by: Vince Weaver <vincent.weaver@maine.edu>
+Tested-by: Vince Weaver <vincent.weaver@maine.edu>
+Fixes: 89cbc76768c2 ("x86: Replace __get_cpu_var uses")
+Signed-off-by: Stephane Eranian <eranian@google.com>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
+Cc: cl@linux.com
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Link: http://lkml.kernel.org/r/20150122203834.GA10228@thinkpad
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kernel/cpu/perf_event_intel_rapl.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/x86/kernel/cpu/perf_event_intel_rapl.c
++++ b/arch/x86/kernel/cpu/perf_event_intel_rapl.c
+@@ -135,7 +135,7 @@ static inline u64 rapl_scale(u64 v)
+        * or use ldexp(count, -32).
+        * Watts = Joules/Time delta
+        */
+-      return v << (32 - __this_cpu_read(rapl_pmu->hw_unit));
++      return v << (32 - __this_cpu_read(rapl_pmu)->hw_unit);
+ }
+ static u64 rapl_event_update(struct perf_event *event)
diff --git a/queue-3.18/perf-x86-intel-add-model-number-for-airmont.patch b/queue-3.18/perf-x86-intel-add-model-number-for-airmont.patch
new file mode 100644 (file)
index 0000000..208de76
--- /dev/null
@@ -0,0 +1,34 @@
+From ef454caeb740ee4e1b89aeb7f7692d5ddffb6830 Mon Sep 17 00:00:00 2001
+From: Kan Liang <kan.liang@intel.com>
+Date: Thu, 22 Jan 2015 07:50:53 +0000
+Subject: perf/x86/intel: Add model number for Airmont
+
+From: Kan Liang <kan.liang@intel.com>
+
+commit ef454caeb740ee4e1b89aeb7f7692d5ddffb6830 upstream.
+
+Intel Airmont supports the same architectural and non-architectural
+performance monitoring events as Silvermont.
+
+Signed-off-by: Kan Liang <kan.liang@intel.com>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Link: http://lkml.kernel.org/r/1421913053-99803-1-git-send-email-kan.liang@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_intel.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/x86/kernel/cpu/perf_event_intel.c
++++ b/arch/x86/kernel/cpu/perf_event_intel.c
+@@ -2431,6 +2431,7 @@ __init int intel_pmu_init(void)
+               break;
+       case 55: /* 22nm Atom "Silvermont"                */
++      case 76: /* 14nm Atom "Airmont"                   */
+       case 77: /* 22nm Atom "Silvermont Avoton/Rangely" */
+               memcpy(hw_cache_event_ids, slm_hw_cache_event_ids,
+                       sizeof(hw_cache_event_ids));
index d7f0ccb798a92dc2a02cbc0575dec70f38a2721b..992cd49a724e263e35be7c86e700b43ae4e14c1c 100644 (file)
@@ -48,3 +48,7 @@ drm-i915-bdw-fix-halo-pci-ids-marked-as-ult.patch
 drm-i915-init-ppgtt-before-context-enable.patch
 drm-i915-fix-inconsistent-brightness-after-resume.patch
 quota-switch-get_dqblk-and-set_dqblk-to-use-bytes-as-space-units.patch
+memcg-remove-extra-newlines-from-memcg-oom-kill-log.patch
+perf-x86-intel-add-model-number-for-airmont.patch
+perf-rapl-fix-crash-in-rapl_scale.patch
+hid-rmi-check-for-additional-acm-registers-appended-to-f11.patch