]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Mar 2014 18:16:57 +0000 (10:16 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Mar 2014 18:16:57 +0000 (10:16 -0800)
added patches:
alsa-hda-add-a-fixup-for-hp-folio-13-mute-led.patch
iio-gyro-bug-on-l3gd20h-gyroscope-support.patch
perf-fix-hotplug-splat.patch
staging-binder-fix-death-notifications.patch
xtensa-introduce-spill_registers_kernel-macro.patch

queue-3.10/alsa-hda-add-a-fixup-for-hp-folio-13-mute-led.patch [new file with mode: 0644]
queue-3.10/iio-gyro-bug-on-l3gd20h-gyroscope-support.patch [new file with mode: 0644]
queue-3.10/perf-fix-hotplug-splat.patch [new file with mode: 0644]
queue-3.10/series
queue-3.10/staging-binder-fix-death-notifications.patch [new file with mode: 0644]
queue-3.10/xtensa-introduce-spill_registers_kernel-macro.patch [new file with mode: 0644]

diff --git a/queue-3.10/alsa-hda-add-a-fixup-for-hp-folio-13-mute-led.patch b/queue-3.10/alsa-hda-add-a-fixup-for-hp-folio-13-mute-led.patch
new file mode 100644 (file)
index 0000000..9cf6a2a
--- /dev/null
@@ -0,0 +1,71 @@
+From 37c367ecdb9a01c9acc980e6e17913570a1788a7 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 24 Feb 2014 15:23:10 +0100
+Subject: ALSA: hda - Add a fixup for HP Folio 13 mute LED
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 37c367ecdb9a01c9acc980e6e17913570a1788a7 upstream.
+
+HP Folio 13 may have a broken BIOS that doesn't set up the mute LED
+GPIO properly, and the driver guesses it wrongly, too.  Add a new
+fixup entry for setting the GPIO pin statically for this laptop.
+
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=70991
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_sigmatel.c |   20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+--- a/sound/pci/hda/patch_sigmatel.c
++++ b/sound/pci/hda/patch_sigmatel.c
+@@ -98,6 +98,7 @@ enum {
+       STAC_92HD83XXX_HP_LED,
+       STAC_92HD83XXX_HP_INV_LED,
+       STAC_92HD83XXX_HP_MIC_LED,
++      STAC_HP_LED_GPIO10,
+       STAC_92HD83XXX_HEADSET_JACK,
+       STAC_92HD83XXX_HP,
+       STAC_HP_ENVY_BASS,
+@@ -2107,6 +2108,17 @@ static void stac92hd83xxx_fixup_hp_mic_l
+               spec->mic_mute_led_gpio = 0x08; /* GPIO3 */
+ }
++static void stac92hd83xxx_fixup_hp_led_gpio10(struct hda_codec *codec,
++                                 const struct hda_fixup *fix, int action)
++{
++      struct sigmatel_spec *spec = codec->spec;
++
++      if (action == HDA_FIXUP_ACT_PRE_PROBE) {
++              spec->gpio_led = 0x10; /* GPIO4 */
++              spec->default_polarity = 0;
++      }
++}
++
+ static void stac92hd83xxx_fixup_headset_jack(struct hda_codec *codec,
+                                  const struct hda_fixup *fix, int action)
+ {
+@@ -2173,6 +2185,12 @@ static const struct hda_fixup stac92hd83
+               .chained = true,
+               .chain_id = STAC_92HD83XXX_HP,
+       },
++      [STAC_HP_LED_GPIO10] = {
++              .type = HDA_FIXUP_FUNC,
++              .v.func = stac92hd83xxx_fixup_hp_led_gpio10,
++              .chained = true,
++              .chain_id = STAC_92HD83XXX_HP,
++      },
+       [STAC_92HD83XXX_HEADSET_JACK] = {
+               .type = HDA_FIXUP_FUNC,
+               .v.func = stac92hd83xxx_fixup_headset_jack,
+@@ -2244,6 +2262,8 @@ static const struct snd_pci_quirk stac92
+                         "HP", STAC_92HD83XXX_HP_cNB11_INTQUAD),
+       SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1888,
+                         "HP Envy Spectre", STAC_HP_ENVY_BASS),
++      SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1899,
++                        "HP Folio 13", STAC_HP_LED_GPIO10),
+       SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x18df,
+                         "HP Folio", STAC_92HD83XXX_HP_MIC_LED),
+       SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xff00, 0x1900,
diff --git a/queue-3.10/iio-gyro-bug-on-l3gd20h-gyroscope-support.patch b/queue-3.10/iio-gyro-bug-on-l3gd20h-gyroscope-support.patch
new file mode 100644 (file)
index 0000000..e59ea65
--- /dev/null
@@ -0,0 +1,85 @@
+From a0657716416f834ef7710a9044614d50a36c3bdc Mon Sep 17 00:00:00 2001
+From: Denis CIOCCA <denis.ciocca@st.com>
+Date: Fri, 14 Feb 2014 14:15:00 +0000
+Subject: iio:gyro: bug on L3GD20H gyroscope support
+
+From: Denis CIOCCA <denis.ciocca@st.com>
+
+commit a0657716416f834ef7710a9044614d50a36c3bdc upstream.
+
+The driver was not able to manage the sensor: during probe function
+and wai check, the driver stops and writes: "device name and WhoAmI mismatch."
+The correct value of L3GD20H wai is 0xd7 instead of 0xd4.
+Dropped support for the sensor.
+
+Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
+Signed-off-by: Jonathan Cameron <jic23@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/iio/gyro/Kconfig        |    2 +-
+ drivers/iio/gyro/st_gyro.h      |    1 -
+ drivers/iio/gyro/st_gyro_core.c |    9 ++++-----
+ drivers/iio/gyro/st_gyro_i2c.c  |    1 -
+ drivers/iio/gyro/st_gyro_spi.c  |    1 -
+ 5 files changed, 5 insertions(+), 9 deletions(-)
+
+--- a/drivers/iio/gyro/Kconfig
++++ b/drivers/iio/gyro/Kconfig
+@@ -50,7 +50,7 @@ config IIO_ST_GYRO_3AXIS
+       select IIO_ST_GYRO_BUFFER if (IIO_TRIGGERED_BUFFER)
+       help
+         Say yes here to build support for STMicroelectronics gyroscopes:
+-        L3G4200D, LSM330DL, L3GD20, L3GD20H, LSM330DLC, L3G4IS, LSM330.
++        L3G4200D, LSM330DL, L3GD20, LSM330DLC, L3G4IS, LSM330.
+         This driver can also be built as a module. If so, will be created
+         these modules:
+--- a/drivers/iio/gyro/st_gyro.h
++++ b/drivers/iio/gyro/st_gyro.h
+@@ -19,7 +19,6 @@
+ #define LSM330DL_GYRO_DEV_NAME                "lsm330dl_gyro"
+ #define LSM330DLC_GYRO_DEV_NAME               "lsm330dlc_gyro"
+ #define L3GD20_GYRO_DEV_NAME          "l3gd20"
+-#define L3GD20H_GYRO_DEV_NAME         "l3gd20h"
+ #define L3G4IS_GYRO_DEV_NAME          "l3g4is_ui"
+ #define LSM330_GYRO_DEV_NAME          "lsm330_gyro"
+--- a/drivers/iio/gyro/st_gyro_core.c
++++ b/drivers/iio/gyro/st_gyro_core.c
+@@ -162,11 +162,10 @@ static const struct st_sensors st_gyro_s
+               .wai = ST_GYRO_2_WAI_EXP,
+               .sensors_supported = {
+                       [0] = L3GD20_GYRO_DEV_NAME,
+-                      [1] = L3GD20H_GYRO_DEV_NAME,
+-                      [2] = LSM330D_GYRO_DEV_NAME,
+-                      [3] = LSM330DLC_GYRO_DEV_NAME,
+-                      [4] = L3G4IS_GYRO_DEV_NAME,
+-                      [5] = LSM330_GYRO_DEV_NAME,
++                      [1] = LSM330D_GYRO_DEV_NAME,
++                      [2] = LSM330DLC_GYRO_DEV_NAME,
++                      [3] = L3G4IS_GYRO_DEV_NAME,
++                      [4] = LSM330_GYRO_DEV_NAME,
+               },
+               .ch = (struct iio_chan_spec *)st_gyro_16bit_channels,
+               .odr = {
+--- a/drivers/iio/gyro/st_gyro_i2c.c
++++ b/drivers/iio/gyro/st_gyro_i2c.c
+@@ -61,7 +61,6 @@ static const struct i2c_device_id st_gyr
+       { LSM330DL_GYRO_DEV_NAME },
+       { LSM330DLC_GYRO_DEV_NAME },
+       { L3GD20_GYRO_DEV_NAME },
+-      { L3GD20H_GYRO_DEV_NAME },
+       { L3G4IS_GYRO_DEV_NAME },
+       { LSM330_GYRO_DEV_NAME },
+       {},
+--- a/drivers/iio/gyro/st_gyro_spi.c
++++ b/drivers/iio/gyro/st_gyro_spi.c
+@@ -60,7 +60,6 @@ static const struct spi_device_id st_gyr
+       { LSM330DL_GYRO_DEV_NAME },
+       { LSM330DLC_GYRO_DEV_NAME },
+       { L3GD20_GYRO_DEV_NAME },
+-      { L3GD20H_GYRO_DEV_NAME },
+       { L3G4IS_GYRO_DEV_NAME },
+       { LSM330_GYRO_DEV_NAME },
+       {},
diff --git a/queue-3.10/perf-fix-hotplug-splat.patch b/queue-3.10/perf-fix-hotplug-splat.patch
new file mode 100644 (file)
index 0000000..81baed1
--- /dev/null
@@ -0,0 +1,66 @@
+From e3703f8cdfcf39c25c4338c3ad8e68891cca3731 Mon Sep 17 00:00:00 2001
+From: Peter Zijlstra <peterz@infradead.org>
+Date: Mon, 24 Feb 2014 12:06:12 +0100
+Subject: perf: Fix hotplug splat
+
+From: Peter Zijlstra <peterz@infradead.org>
+
+commit e3703f8cdfcf39c25c4338c3ad8e68891cca3731 upstream.
+
+Drew Richardson reported that he could make the kernel go *boom* when hotplugging
+while having perf events active.
+
+It turned out that when you have a group event, the code in
+__perf_event_exit_context() fails to remove the group siblings from
+the context.
+
+We then proceed with destroying and freeing the event, and when you
+re-plug the CPU and try and add another event to that CPU, things go
+*boom* because you've still got dead entries there.
+
+Reported-by: Drew Richardson <drew.richardson@arm.com>
+Signed-off-by: Peter Zijlstra <peterz@infradead.org>
+Cc: Will Deacon <will.deacon@arm.com>
+Link: http://lkml.kernel.org/n/tip-k6v5wundvusvcseqj1si0oz0@git.kernel.org
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/events/core.c |   12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+--- a/kernel/events/core.c
++++ b/kernel/events/core.c
+@@ -7421,14 +7421,14 @@ static void perf_pmu_rotate_stop(struct
+ static void __perf_event_exit_context(void *__info)
+ {
+       struct perf_event_context *ctx = __info;
+-      struct perf_event *event, *tmp;
++      struct perf_event *event;
+       perf_pmu_rotate_stop(ctx->pmu);
+-      list_for_each_entry_safe(event, tmp, &ctx->pinned_groups, group_entry)
+-              __perf_remove_from_context(event);
+-      list_for_each_entry_safe(event, tmp, &ctx->flexible_groups, group_entry)
++      rcu_read_lock();
++      list_for_each_entry_rcu(event, &ctx->event_list, event_entry)
+               __perf_remove_from_context(event);
++      rcu_read_unlock();
+ }
+ static void perf_event_exit_cpu_context(int cpu)
+@@ -7452,11 +7452,11 @@ static void perf_event_exit_cpu(int cpu)
+ {
+       struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu);
++      perf_event_exit_cpu_context(cpu);
++
+       mutex_lock(&swhash->hlist_mutex);
+       swevent_hlist_release(swhash);
+       mutex_unlock(&swhash->hlist_mutex);
+-
+-      perf_event_exit_cpu_context(cpu);
+ }
+ #else
+ static inline void perf_event_exit_cpu(int cpu) { }
index 543f4b6e99d7b1412413954edab576f4af50de7c..8d8a592a1068acc4093a7ea73b663e7f73b3da0c 100644 (file)
@@ -72,3 +72,8 @@ usb-ftdi_sio-add-cressi-leonardo-pid.patch
 mei-set-client-s-read_cb-to-null-when-flow-control-fails.patch
 hwmon-max1668-fix-writing-the-minimum-temperature.patch
 workqueue-ensure-task-is-valid-across-kthread_stop.patch
+staging-binder-fix-death-notifications.patch
+iio-gyro-bug-on-l3gd20h-gyroscope-support.patch
+perf-fix-hotplug-splat.patch
+alsa-hda-add-a-fixup-for-hp-folio-13-mute-led.patch
+xtensa-introduce-spill_registers_kernel-macro.patch
diff --git a/queue-3.10/staging-binder-fix-death-notifications.patch b/queue-3.10/staging-binder-fix-death-notifications.patch
new file mode 100644 (file)
index 0000000..808f657
--- /dev/null
@@ -0,0 +1,49 @@
+From e194fd8a5d8e0a7eeed239a8534460724b62fe2d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= <arve@android.com>
+Date: Mon, 17 Feb 2014 13:58:29 -0800
+Subject: staging: binder: Fix death notifications
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= <arve@android.com>
+
+commit e194fd8a5d8e0a7eeed239a8534460724b62fe2d upstream.
+
+The change (008fa749e0fe5b2fffd20b7fe4891bb80d072c6a) that moved the
+node release code to a separate function broke death notifications in
+some cases. When it encountered a reference without a death
+notification request, it would skip looking at the remaining
+references, and therefore fail to send death notifications for them.
+
+Cc: Colin Cross <ccross@android.com>
+Cc: Android Kernel Team <kernel-team@android.com>
+Signed-off-by: Arve Hjønnevåg <arve@android.com>
+Signed-off-by: John Stultz <john.stultz@linaro.org>
+Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/android/binder.c |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/staging/android/binder.c
++++ b/drivers/staging/android/binder.c
+@@ -2902,7 +2902,7 @@ static int binder_node_release(struct bi
+               refs++;
+               if (!ref->death)
+-                      goto out;
++                      continue;
+               death++;
+@@ -2915,7 +2915,6 @@ static int binder_node_release(struct bi
+                       BUG();
+       }
+-out:
+       binder_debug(BINDER_DEBUG_DEAD_BINDER,
+                    "node %d now dead, refs %d, death %d\n",
+                    node->debug_id, refs, death);
diff --git a/queue-3.10/xtensa-introduce-spill_registers_kernel-macro.patch b/queue-3.10/xtensa-introduce-spill_registers_kernel-macro.patch
new file mode 100644 (file)
index 0000000..4baf237
--- /dev/null
@@ -0,0 +1,180 @@
+From e2fd1374c705abe4661df3fb6fadb3879c7c1846 Mon Sep 17 00:00:00 2001
+From: Max Filippov <jcmvbkbc@gmail.com>
+Date: Wed, 22 Jan 2014 08:04:43 +0400
+Subject: xtensa: introduce spill_registers_kernel macro
+
+From: Max Filippov <jcmvbkbc@gmail.com>
+
+commit e2fd1374c705abe4661df3fb6fadb3879c7c1846 upstream.
+
+Most in-kernel users want registers spilled on the kernel stack and
+don't require PS.EXCM to be set. That means that they don't need fixup
+routine and could reuse regular window overflow mechanism for that,
+which makes spill routine very simple.
+
+Suggested-by: Chris Zankel <chris@zankel.net>
+Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/xtensa/include/asm/traps.h |   44 ++++++++++++++++++-----------
+ arch/xtensa/kernel/entry.S      |   60 ++++++++++++++++++++++++++++++++--------
+ 2 files changed, 76 insertions(+), 28 deletions(-)
+
+--- a/arch/xtensa/include/asm/traps.h
++++ b/arch/xtensa/include/asm/traps.h
+@@ -22,25 +22,37 @@ extern void do_unhandled(struct pt_regs
+ static inline void spill_registers(void)
+ {
+-
++#if XCHAL_NUM_AREGS > 16
+       __asm__ __volatile__ (
+-              "movi   a14, "__stringify((1 << PS_EXCM_BIT) | LOCKLEVEL)"\n\t"
+-              "mov    a12, a0\n\t"
+-              "rsr    a13, sar\n\t"
+-              "xsr    a14, ps\n\t"
+-              "movi   a0, _spill_registers\n\t"
+-              "rsync\n\t"
+-              "callx0 a0\n\t"
+-              "mov    a0, a12\n\t"
+-              "wsr    a13, sar\n\t"
+-              "wsr    a14, ps\n\t"
+-              : :
+-#if defined(CONFIG_FRAME_POINTER)
+-              : "a2", "a3", "a4",       "a11", "a12", "a13", "a14", "a15",
++              "       call12  1f\n"
++              "       _j      2f\n"
++              "       retw\n"
++              "       .align  4\n"
++              "1:\n"
++              "       _entry  a1, 48\n"
++              "       addi    a12, a0, 3\n"
++#if XCHAL_NUM_AREGS > 32
++              "       .rept   (" __stringify(XCHAL_NUM_AREGS) " - 32) / 12\n"
++              "       _entry  a1, 48\n"
++              "       mov     a12, a0\n"
++              "       .endr\n"
++#endif
++              "       _entry  a1, 48\n"
++#if XCHAL_NUM_AREGS % 12 == 0
++              "       mov     a8, a8\n"
++#elif XCHAL_NUM_AREGS % 12 == 4
++              "       mov     a12, a12\n"
++#elif XCHAL_NUM_AREGS % 12 == 8
++              "       mov     a4, a4\n"
++#endif
++              "       retw\n"
++              "2:\n"
++              : : : "a12", "a13", "memory");
+ #else
+-              : "a2", "a3", "a4", "a7", "a11", "a12", "a13", "a14", "a15",
++      __asm__ __volatile__ (
++              "       mov     a12, a12\n"
++              : : : "memory");
+ #endif
+-                "memory");
+ }
+ #endif /* _XTENSA_TRAPS_H */
+--- a/arch/xtensa/kernel/entry.S
++++ b/arch/xtensa/kernel/entry.S
+@@ -1912,6 +1912,43 @@ ENTRY(system_call)
+ ENDPROC(system_call)
++/*
++ * Spill live registers on the kernel stack macro.
++ *
++ * Entry condition: ps.woe is set, ps.excm is cleared
++ * Exit condition: windowstart has single bit set
++ * May clobber: a12, a13
++ */
++      .macro  spill_registers_kernel
++
++#if XCHAL_NUM_AREGS > 16
++      call12  1f
++      _j      2f
++      retw
++      .align  4
++1:
++      _entry  a1, 48
++      addi    a12, a0, 3
++#if XCHAL_NUM_AREGS > 32
++      .rept   (XCHAL_NUM_AREGS - 32) / 12
++      _entry  a1, 48
++      mov     a12, a0
++      .endr
++#endif
++      _entry  a1, 48
++#if XCHAL_NUM_AREGS % 12 == 0
++      mov     a8, a8
++#elif XCHAL_NUM_AREGS % 12 == 4
++      mov     a12, a12
++#elif XCHAL_NUM_AREGS % 12 == 8
++      mov     a4, a4
++#endif
++      retw
++2:
++#else
++      mov     a12, a12
++#endif
++      .endm
+ /*
+  * Task switch.
+@@ -1924,21 +1961,20 @@ ENTRY(_switch_to)
+       entry   a1, 16
+-      mov     a12, a2                 # preserve 'prev' (a2)
+-      mov     a13, a3                 # and 'next' (a3)
++      mov     a10, a2                 # preserve 'prev' (a2)
++      mov     a11, a3                 # and 'next' (a3)
+       l32i    a4, a2, TASK_THREAD_INFO
+       l32i    a5, a3, TASK_THREAD_INFO
+-      save_xtregs_user a4 a6 a8 a9 a10 a11 THREAD_XTREGS_USER
++      save_xtregs_user a4 a6 a8 a9 a12 a13 THREAD_XTREGS_USER
+-      s32i    a0, a12, THREAD_RA      # save return address
+-      s32i    a1, a12, THREAD_SP      # save stack pointer
++      s32i    a0, a10, THREAD_RA      # save return address
++      s32i    a1, a10, THREAD_SP      # save stack pointer
+       /* Disable ints while we manipulate the stack pointer. */
+-      movi    a14, (1 << PS_EXCM_BIT) | LOCKLEVEL
+-      xsr     a14, ps
++      rsil    a14, LOCKLEVEL
+       rsr     a3, excsave1
+       rsync
+       s32i    a3, a3, EXC_TABLE_FIXUP /* enter critical section */
+@@ -1953,7 +1989,7 @@ ENTRY(_switch_to)
+       /* Flush register file. */
+-      call0   _spill_registers        # destroys a3, a4, and SAR
++      spill_registers_kernel
+       /* Set kernel stack (and leave critical section)
+        * Note: It's save to set it here. The stack will not be overwritten
+@@ -1969,13 +2005,13 @@ ENTRY(_switch_to)
+       /* restore context of the task 'next' */
+-      l32i    a0, a13, THREAD_RA      # restore return address
+-      l32i    a1, a13, THREAD_SP      # restore stack pointer
++      l32i    a0, a11, THREAD_RA      # restore return address
++      l32i    a1, a11, THREAD_SP      # restore stack pointer
+-      load_xtregs_user a5 a6 a8 a9 a10 a11 THREAD_XTREGS_USER
++      load_xtregs_user a5 a6 a8 a9 a12 a13 THREAD_XTREGS_USER
+       wsr     a14, ps
+-      mov     a2, a12                 # return 'prev'
++      mov     a2, a10                 # return 'prev'
+       rsync
+       retw