]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Feb 2012 21:56:53 +0000 (13:56 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Feb 2012 21:56:53 +0000 (13:56 -0800)
added patches:
asoc-wm8962-fix-sidetone-enumeration-texts.patch
ath9k-stop-on-rates-with-idx-1-in-ath9k-rate-control-s-.tx_status.patch
hwmon-ads1015-fix-file-leak-in-probe-function.patch
hwmon-max6639-fix-fan_from_reg-calculation.patch
hwmon-max6639-fix-ppr-register-initialization-to-set-both-channels.patch
nommu-lock-i_mmap_mutex-for-access-to-the-vma-prio-list.patch
x86-amd-fix-l1i-and-l2-cache-sharing-information-for-amd-family-15h-processors.patch

queue-3.0/asoc-wm8962-fix-sidetone-enumeration-texts.patch [new file with mode: 0644]
queue-3.0/ath9k-stop-on-rates-with-idx-1-in-ath9k-rate-control-s-.tx_status.patch [new file with mode: 0644]
queue-3.0/hwmon-ads1015-fix-file-leak-in-probe-function.patch [new file with mode: 0644]
queue-3.0/hwmon-max6639-fix-fan_from_reg-calculation.patch [new file with mode: 0644]
queue-3.0/hwmon-max6639-fix-ppr-register-initialization-to-set-both-channels.patch [new file with mode: 0644]
queue-3.0/nommu-lock-i_mmap_mutex-for-access-to-the-vma-prio-list.patch [new file with mode: 0644]
queue-3.0/series
queue-3.0/x86-amd-fix-l1i-and-l2-cache-sharing-information-for-amd-family-15h-processors.patch [new file with mode: 0644]

diff --git a/queue-3.0/asoc-wm8962-fix-sidetone-enumeration-texts.patch b/queue-3.0/asoc-wm8962-fix-sidetone-enumeration-texts.patch
new file mode 100644 (file)
index 0000000..9c2a7fa
--- /dev/null
@@ -0,0 +1,29 @@
+From 31794bc37bf2db84f085da52b72bfba65739b2d2 Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Mon, 13 Feb 2012 22:00:47 -0800
+Subject: ASoC: wm8962: Fix sidetone enumeration texts
+
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+
+commit 31794bc37bf2db84f085da52b72bfba65739b2d2 upstream.
+
+The sidetone enumeration texts have left and right swapped.
+
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/soc/codecs/wm8962.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/soc/codecs/wm8962.c
++++ b/sound/soc/codecs/wm8962.c
+@@ -2373,7 +2373,7 @@ static int out_pga_event(struct snd_soc_
+       }
+ }
+-static const char *st_text[] = { "None", "Right", "Left" };
++static const char *st_text[] = { "None", "Left", "Right" };
+ static const struct soc_enum str_enum =
+       SOC_ENUM_SINGLE(WM8962_DAC_DSP_MIXING_1, 2, 3, st_text);
diff --git a/queue-3.0/ath9k-stop-on-rates-with-idx-1-in-ath9k-rate-control-s-.tx_status.patch b/queue-3.0/ath9k-stop-on-rates-with-idx-1-in-ath9k-rate-control-s-.tx_status.patch
new file mode 100644 (file)
index 0000000..78673a7
--- /dev/null
@@ -0,0 +1,38 @@
+From 2504a6423b9ab4c36df78227055995644de19edb Mon Sep 17 00:00:00 2001
+From: Pavel Roskin <proski@gnu.org>
+Date: Sat, 11 Feb 2012 10:01:53 -0500
+Subject: ath9k: stop on rates with idx -1 in ath9k rate control's .tx_status
+
+From: Pavel Roskin <proski@gnu.org>
+
+commit 2504a6423b9ab4c36df78227055995644de19edb upstream.
+
+Rate control algorithms are supposed to stop processing when they
+encounter a rate with the index -1.  Checking for rate->count not being
+zero is not enough.
+
+Allowing a rate with negative index leads to memory corruption in
+ath_debug_stat_rc().
+
+One consequence of the bug is discussed at
+https://bugzilla.redhat.com/show_bug.cgi?id=768639
+
+Signed-off-by: Pavel Roskin <proski@gnu.org>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/ath/ath9k/rc.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/wireless/ath/ath9k/rc.c
++++ b/drivers/net/wireless/ath/ath9k/rc.c
+@@ -1328,7 +1328,7 @@ static void ath_tx_status(void *priv, st
+       fc = hdr->frame_control;
+       for (i = 0; i < sc->hw->max_rates; i++) {
+               struct ieee80211_tx_rate *rate = &tx_info->status.rates[i];
+-              if (!rate->count)
++              if (rate->idx < 0 || !rate->count)
+                       break;
+               final_ts_idx = i;
diff --git a/queue-3.0/hwmon-ads1015-fix-file-leak-in-probe-function.patch b/queue-3.0/hwmon-ads1015-fix-file-leak-in-probe-function.patch
new file mode 100644 (file)
index 0000000..58cc84c
--- /dev/null
@@ -0,0 +1,41 @@
+From 363434b5dc352464ac7601547891e5fc9105f124 Mon Sep 17 00:00:00 2001
+From: Guenter Roeck <guenter.roeck@ericsson.com>
+Date: Wed, 22 Feb 2012 08:13:52 -0800
+Subject: hwmon: (ads1015) Fix file leak in probe function
+
+From: Guenter Roeck <guenter.roeck@ericsson.com>
+
+commit 363434b5dc352464ac7601547891e5fc9105f124 upstream.
+
+An error while creating sysfs attribute files in the driver's probe function
+results in an error abort, but already created files are not removed. This patch
+fixes the problem.
+
+Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
+Cc: Dirk Eibach <eibach@gdsys.de>
+Acked-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hwmon/ads1015.c |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/hwmon/ads1015.c
++++ b/drivers/hwmon/ads1015.c
+@@ -284,7 +284,7 @@ static int ads1015_probe(struct i2c_clie
+                       continue;
+               err = device_create_file(&client->dev, &ads1015_in[k].dev_attr);
+               if (err)
+-                      goto exit_free;
++                      goto exit_remove;
+       }
+       data->hwmon_dev = hwmon_device_register(&client->dev);
+@@ -298,7 +298,6 @@ static int ads1015_probe(struct i2c_clie
+ exit_remove:
+       for (k = 0; k < ADS1015_CHANNELS; ++k)
+               device_remove_file(&client->dev, &ads1015_in[k].dev_attr);
+-exit_free:
+       kfree(data);
+ exit:
+       return err;
diff --git a/queue-3.0/hwmon-max6639-fix-fan_from_reg-calculation.patch b/queue-3.0/hwmon-max6639-fix-fan_from_reg-calculation.patch
new file mode 100644 (file)
index 0000000..c73e540
--- /dev/null
@@ -0,0 +1,44 @@
+From b63d97a36edb1aecf8c13e5f5783feff4d64c24b Mon Sep 17 00:00:00 2001
+From: Chris D Schimp <silverchris@gmail.com>
+Date: Mon, 20 Feb 2012 16:59:24 -0500
+Subject: hwmon: (max6639) Fix FAN_FROM_REG calculation
+
+From: Chris D Schimp <silverchris@gmail.com>
+
+commit b63d97a36edb1aecf8c13e5f5783feff4d64c24b upstream.
+
+RPM calculation from tachometer value does not depend on PPR.
+Also, do not report negative RPM values.
+
+Signed-off-by: Chris D Schimp <silverchris@gmail.com>
+[guenter.roeck@ericsson.com: do not report negative RPM values]
+Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
+Acked-by: Roland Stigge <stigge@antcom.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hwmon/max6639.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/hwmon/max6639.c
++++ b/drivers/hwmon/max6639.c
+@@ -72,8 +72,8 @@ static unsigned short normal_i2c[] = { 0
+ static const int rpm_ranges[] = { 2000, 4000, 8000, 16000 };
+-#define FAN_FROM_REG(val, div, rpm_range)     ((val) == 0 ? -1 : \
+-      (val) == 255 ? 0 : (rpm_ranges[rpm_range] * 30) / ((div + 1) * (val)))
++#define FAN_FROM_REG(val, rpm_range)  ((val) == 0 || (val) == 255 ? \
++                              0 : (rpm_ranges[rpm_range] * 30) / (val))
+ #define TEMP_LIMIT_TO_REG(val)        SENSORS_LIMIT((val) / 1000, 0, 255)
+ /*
+@@ -333,7 +333,7 @@ static ssize_t show_fan_input(struct dev
+               return PTR_ERR(data);
+       return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan[attr->index],
+-                     data->ppr, data->rpm_range));
++                     data->rpm_range));
+ }
+ static ssize_t show_alarm(struct device *dev,
diff --git a/queue-3.0/hwmon-max6639-fix-ppr-register-initialization-to-set-both-channels.patch b/queue-3.0/hwmon-max6639-fix-ppr-register-initialization-to-set-both-channels.patch
new file mode 100644 (file)
index 0000000..e3403b3
--- /dev/null
@@ -0,0 +1,62 @@
+From 2f2da1ac0ba5b6cc6e1957c4da5ff20e67d8442b Mon Sep 17 00:00:00 2001
+From: Chris D Schimp <silverchris@gmail.com>
+Date: Mon, 20 Feb 2012 17:44:59 -0500
+Subject: hwmon: (max6639) Fix PPR register initialization to set both channels
+
+From: Chris D Schimp <silverchris@gmail.com>
+
+commit 2f2da1ac0ba5b6cc6e1957c4da5ff20e67d8442b upstream.
+
+Initialize PPR register for both channels, and set correct PPR register bits.
+Also remove unnecessary variable initializations.
+
+Signed-off-by: Chris D Schimp <silverchris@gmail.com>
+[guenter.roeck@ericsson.com: Merged two patches into one]
+Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
+Acked-by: Roland Stigge <stigge@antcom.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hwmon/max6639.c |   16 +++++++++-------
+ 1 file changed, 9 insertions(+), 7 deletions(-)
+
+--- a/drivers/hwmon/max6639.c
++++ b/drivers/hwmon/max6639.c
+@@ -429,9 +429,9 @@ static int max6639_init_client(struct i2
+       struct max6639_data *data = i2c_get_clientdata(client);
+       struct max6639_platform_data *max6639_info =
+               client->dev.platform_data;
+-      int i = 0;
++      int i;
+       int rpm_range = 1; /* default: 4000 RPM */
+-      int err = 0;
++      int err;
+       /* Reset chip to default values, see below for GCONFIG setup */
+       err = i2c_smbus_write_byte_data(client, MAX6639_REG_GCONFIG,
+@@ -446,11 +446,6 @@ static int max6639_init_client(struct i2
+       else
+               data->ppr = 2;
+       data->ppr -= 1;
+-      err = i2c_smbus_write_byte_data(client,
+-                      MAX6639_REG_FAN_PPR(i),
+-                      data->ppr << 5);
+-      if (err)
+-              goto exit;
+       if (max6639_info)
+               rpm_range = rpm_range_to_reg(max6639_info->rpm_range);
+@@ -458,6 +453,13 @@ static int max6639_init_client(struct i2
+       for (i = 0; i < 2; i++) {
++              /* Set Fan pulse per revolution */
++              err = i2c_smbus_write_byte_data(client,
++                              MAX6639_REG_FAN_PPR(i),
++                              data->ppr << 6);
++              if (err)
++                      goto exit;
++
+               /* Fans config PWM, RPM */
+               err = i2c_smbus_write_byte_data(client,
+                       MAX6639_REG_FAN_CONFIG1(i),
diff --git a/queue-3.0/nommu-lock-i_mmap_mutex-for-access-to-the-vma-prio-list.patch b/queue-3.0/nommu-lock-i_mmap_mutex-for-access-to-the-vma-prio-list.patch
new file mode 100644 (file)
index 0000000..28f5f7e
--- /dev/null
@@ -0,0 +1,73 @@
+From 918e556ec214ed2f584e4cac56d7b29e4bb6bf27 Mon Sep 17 00:00:00 2001
+From: David Howells <dhowells@redhat.com>
+Date: Thu, 23 Feb 2012 13:50:35 +0000
+Subject: NOMMU: Lock i_mmap_mutex for access to the VMA prio list
+
+From: David Howells <dhowells@redhat.com>
+
+commit 918e556ec214ed2f584e4cac56d7b29e4bb6bf27 upstream.
+
+Lock i_mmap_mutex for access to the VMA prio list to prevent concurrent
+access.  Currently, certain parts of the mmap handling are protected by
+the region mutex, but not all.
+
+Reported-by: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: David Howells <dhowells@redhat.com>
+Acked-by: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ mm/nommu.c |    7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/mm/nommu.c
++++ b/mm/nommu.c
+@@ -697,9 +697,11 @@ static void add_vma_to_mm(struct mm_stru
+       if (vma->vm_file) {
+               mapping = vma->vm_file->f_mapping;
++              mutex_lock(&mapping->i_mmap_mutex);
+               flush_dcache_mmap_lock(mapping);
+               vma_prio_tree_insert(vma, &mapping->i_mmap);
+               flush_dcache_mmap_unlock(mapping);
++              mutex_unlock(&mapping->i_mmap_mutex);
+       }
+       /* add the VMA to the tree */
+@@ -761,9 +763,11 @@ static void delete_vma_from_mm(struct vm
+       if (vma->vm_file) {
+               mapping = vma->vm_file->f_mapping;
++              mutex_lock(&mapping->i_mmap_mutex);
+               flush_dcache_mmap_lock(mapping);
+               vma_prio_tree_remove(vma, &mapping->i_mmap);
+               flush_dcache_mmap_unlock(mapping);
++              mutex_unlock(&mapping->i_mmap_mutex);
+       }
+       /* remove from the MM's tree and list */
+@@ -2061,6 +2065,7 @@ int nommu_shrink_inode_mappings(struct i
+       high = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
+       down_write(&nommu_region_sem);
++      mutex_lock(&inode->i_mapping->i_mmap_mutex);
+       /* search for VMAs that fall within the dead zone */
+       vma_prio_tree_foreach(vma, &iter, &inode->i_mapping->i_mmap,
+@@ -2068,6 +2073,7 @@ int nommu_shrink_inode_mappings(struct i
+               /* found one - only interested if it's shared out of the page
+                * cache */
+               if (vma->vm_flags & VM_SHARED) {
++                      mutex_unlock(&inode->i_mapping->i_mmap_mutex);
+                       up_write(&nommu_region_sem);
+                       return -ETXTBSY; /* not quite true, but near enough */
+               }
+@@ -2095,6 +2101,7 @@ int nommu_shrink_inode_mappings(struct i
+               }
+       }
++      mutex_unlock(&inode->i_mapping->i_mmap_mutex);
+       up_write(&nommu_region_sem);
+       return 0;
+ }
index 3465959c2810a578ee7c0b2142637ac4f137f58f..d490c75989bcd86951b4782ee4af189c91aaefde 100644 (file)
@@ -1,3 +1,8 @@
+asoc-wm8962-fix-sidetone-enumeration-texts.patch
+nommu-lock-i_mmap_mutex-for-access-to-the-vma-prio-list.patch
+hwmon-max6639-fix-fan_from_reg-calculation.patch
+hwmon-max6639-fix-ppr-register-initialization-to-set-both-channels.patch
+hwmon-ads1015-fix-file-leak-in-probe-function.patch
 powerpc-perf-power_pmu_start-restores-incorrect-values-breaking-frequency-events.patch
 drm-radeon-kms-fix-msi-re-arm-on-rv370.patch
 pci-workaround-hard-wired-bus-number-v2.patch
@@ -50,3 +55,5 @@ i387-move-ts_usedfpu-flag-from-thread_info-to-task_struct.patch
 i387-re-introduce-fpu-state-preloading-at-context-switch-time.patch
 usb-storage-fix-freezing-of-the-scanning-thread.patch
 usb-don-t-fail-usb3-probe-on-missing-legacy-pci-irq.patch
+x86-amd-fix-l1i-and-l2-cache-sharing-information-for-amd-family-15h-processors.patch
+ath9k-stop-on-rates-with-idx-1-in-ath9k-rate-control-s-.tx_status.patch
diff --git a/queue-3.0/x86-amd-fix-l1i-and-l2-cache-sharing-information-for-amd-family-15h-processors.patch b/queue-3.0/x86-amd-fix-l1i-and-l2-cache-sharing-information-for-amd-family-15h-processors.patch
new file mode 100644 (file)
index 0000000..062f45d
--- /dev/null
@@ -0,0 +1,97 @@
+From 32c3233885eb10ac9cb9410f2f8cd64b8df2b2a1 Mon Sep 17 00:00:00 2001
+From: Andreas Herrmann <andreas.herrmann3@amd.com>
+Date: Wed, 8 Feb 2012 20:52:29 +0100
+Subject: x86/amd: Fix L1i and L2 cache sharing information for AMD family 15h processors
+
+From: Andreas Herrmann <andreas.herrmann3@amd.com>
+
+commit 32c3233885eb10ac9cb9410f2f8cd64b8df2b2a1 upstream.
+
+For L1 instruction cache and L2 cache the shared CPU information
+is wrong. On current AMD family 15h CPUs those caches are shared
+between both cores of a compute unit.
+
+This fixes https://bugzilla.kernel.org/show_bug.cgi?id=42607
+
+Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
+Cc: Petkov Borislav <Borislav.Petkov@amd.com>
+Cc: Dave Jones <davej@redhat.com>
+Link: http://lkml.kernel.org/r/20120208195229.GA17523@alberich.amd.com
+Signed-off-by: Ingo Molnar <mingo@elte.hu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kernel/cpu/intel_cacheinfo.c |   44 +++++++++++++++++++++++++++-------
+ 1 file changed, 36 insertions(+), 8 deletions(-)
+
+--- a/arch/x86/kernel/cpu/intel_cacheinfo.c
++++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
+@@ -330,8 +330,7 @@ static void __cpuinit amd_calc_l3_indice
+       l3->indices = (max(max3(sc0, sc1, sc2), sc3) << 10) - 1;
+ }
+-static void __cpuinit amd_init_l3_cache(struct _cpuid4_info_regs *this_leaf,
+-                                      int index)
++static void __cpuinit amd_init_l3_cache(struct _cpuid4_info_regs *this_leaf, int index)
+ {
+       static struct amd_l3_cache *__cpuinitdata l3_caches;
+       int node;
+@@ -748,14 +747,16 @@ static DEFINE_PER_CPU(struct _cpuid4_inf
+ #define CPUID4_INFO_IDX(x, y) (&((per_cpu(ici_cpuid4_info, x))[y]))
+ #ifdef CONFIG_SMP
+-static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index)
++
++static int __cpuinit cache_shared_amd_cpu_map_setup(unsigned int cpu, int index)
+ {
+-      struct _cpuid4_info     *this_leaf, *sibling_leaf;
+-      unsigned long num_threads_sharing;
+-      int index_msb, i, sibling;
++      struct _cpuid4_info *this_leaf;
++      int ret, i, sibling;
+       struct cpuinfo_x86 *c = &cpu_data(cpu);
+-      if ((index == 3) && (c->x86_vendor == X86_VENDOR_AMD)) {
++      ret = 0;
++      if (index == 3) {
++              ret = 1;
+               for_each_cpu(i, cpu_llc_shared_mask(cpu)) {
+                       if (!per_cpu(ici_cpuid4_info, i))
+                               continue;
+@@ -766,8 +767,35 @@ static void __cpuinit cache_shared_cpu_m
+                               set_bit(sibling, this_leaf->shared_cpu_map);
+                       }
+               }
+-              return;
++      } else if ((c->x86 == 0x15) && ((index == 1) || (index == 2))) {
++              ret = 1;
++              for_each_cpu(i, cpu_sibling_mask(cpu)) {
++                      if (!per_cpu(ici_cpuid4_info, i))
++                              continue;
++                      this_leaf = CPUID4_INFO_IDX(i, index);
++                      for_each_cpu(sibling, cpu_sibling_mask(cpu)) {
++                              if (!cpu_online(sibling))
++                                      continue;
++                              set_bit(sibling, this_leaf->shared_cpu_map);
++                      }
++              }
+       }
++
++      return ret;
++}
++
++static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index)
++{
++      struct _cpuid4_info *this_leaf, *sibling_leaf;
++      unsigned long num_threads_sharing;
++      int index_msb, i;
++      struct cpuinfo_x86 *c = &cpu_data(cpu);
++
++      if (c->x86_vendor == X86_VENDOR_AMD) {
++              if (cache_shared_amd_cpu_map_setup(cpu, index))
++                      return;
++      }
++
+       this_leaf = CPUID4_INFO_IDX(cpu, index);
+       num_threads_sharing = 1 + this_leaf->eax.split.num_threads_sharing;