]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Sep 2013 15:17:36 +0000 (08:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Sep 2013 15:17:36 +0000 (08:17 -0700)
added patches:
alsa-opti9xx-fix-conflicting-driver-object-name.patch
powerpc-hvsi-increase-handshake-timeout-from-200ms-to-400ms.patch
powerpc-work-around-gcc-miscompilation-of-__pa-on-64-bit.patch
regmap-silence-gcc-warning.patch

queue-3.4/alsa-opti9xx-fix-conflicting-driver-object-name.patch [new file with mode: 0644]
queue-3.4/powerpc-hvsi-increase-handshake-timeout-from-200ms-to-400ms.patch [new file with mode: 0644]
queue-3.4/powerpc-work-around-gcc-miscompilation-of-__pa-on-64-bit.patch [new file with mode: 0644]
queue-3.4/regmap-silence-gcc-warning.patch [new file with mode: 0644]
queue-3.4/series

diff --git a/queue-3.4/alsa-opti9xx-fix-conflicting-driver-object-name.patch b/queue-3.4/alsa-opti9xx-fix-conflicting-driver-object-name.patch
new file mode 100644 (file)
index 0000000..6566018
--- /dev/null
@@ -0,0 +1,55 @@
+From fb615499f0ad28ed74201c1cdfddf9e64e205424 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Tue, 27 Aug 2013 12:03:01 +0200
+Subject: ALSA: opti9xx: Fix conflicting driver object name
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit fb615499f0ad28ed74201c1cdfddf9e64e205424 upstream.
+
+The recent commit to delay the release of kobject triggered NULL
+dereferences of opti9xx drivers.  The cause is that all
+snd-opti92x-ad1848, snd-opti92x-cs4231 and snd-opti93x drivers
+register the PnP card driver with the very same name, and also
+snd-opti92x-ad1848 and -cs4231 drivers register the ISA driver with
+the same name, too.  When these drivers are built in, quick
+"register-release-and-re-register" actions occur, and this results in
+Oops because of the same name is assigned to the kobject.
+
+The fix is simply to assign individual names.  As a bonus, by using
+KBUILD_MODNAME, the patch reduces more lines than it adds.
+
+The fix is based on the suggestion by Russell King.
+
+Reported-and-tested-by: Fengguang Wu <fengguang.wu@intel.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/isa/opti9xx/opti92x-ad1848.c |    8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+--- a/sound/isa/opti9xx/opti92x-ad1848.c
++++ b/sound/isa/opti9xx/opti92x-ad1848.c
+@@ -173,11 +173,7 @@ MODULE_DEVICE_TABLE(pnp_card, snd_opti9x
+ #endif        /* CONFIG_PNP */
+-#ifdef OPTi93X
+-#define DEV_NAME "opti93x"
+-#else
+-#define DEV_NAME "opti92x"
+-#endif
++#define DEV_NAME KBUILD_MODNAME
+ static char * snd_opti9xx_names[] = {
+       "unknown",
+@@ -1126,7 +1122,7 @@ static void __devexit snd_opti9xx_pnp_re
+ static struct pnp_card_driver opti9xx_pnpc_driver = {
+       .flags          = PNP_DRIVER_RES_DISABLE,
+-      .name           = "opti9xx",
++      .name           = DEV_NAME,
+       .id_table       = snd_opti9xx_pnpids,
+       .probe          = snd_opti9xx_pnp_probe,
+       .remove         = __devexit_p(snd_opti9xx_pnp_remove),
diff --git a/queue-3.4/powerpc-hvsi-increase-handshake-timeout-from-200ms-to-400ms.patch b/queue-3.4/powerpc-hvsi-increase-handshake-timeout-from-200ms-to-400ms.patch
new file mode 100644 (file)
index 0000000..a4e67c6
--- /dev/null
@@ -0,0 +1,40 @@
+From d220980b701d838560a70de691b53be007e99e78 Mon Sep 17 00:00:00 2001
+From: Eugene Surovegin <ebs@ebshome.net>
+Date: Mon, 26 Aug 2013 11:53:32 -0700
+Subject: powerpc/hvsi: Increase handshake timeout from 200ms to 400ms.
+
+From: Eugene Surovegin <ebs@ebshome.net>
+
+commit d220980b701d838560a70de691b53be007e99e78 upstream.
+
+This solves a problem observed in kexec'ed kernel where 200ms timeout is
+too short and bootconsole fails to initialize. Console did eventually
+become workable but much later into the boot process.
+
+Observed timeout was around 260ms, but I decided to make it a little bigger
+for more reliability.
+
+This has been tested on Power7 machine with Petitboot as a primary
+bootloader and PowerNV firmware.
+
+Signed-off-by: Eugene Surovegin <surovegin@google.com>
+Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/tty/hvc/hvsi_lib.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/tty/hvc/hvsi_lib.c
++++ b/drivers/tty/hvc/hvsi_lib.c
+@@ -341,8 +341,8 @@ void hvsilib_establish(struct hvsi_priv
+       pr_devel("HVSI@%x:   ... waiting handshake\n", pv->termno);
+-      /* Try for up to 200s */
+-      for (timeout = 0; timeout < 20; timeout++) {
++      /* Try for up to 400ms */
++      for (timeout = 0; timeout < 40; timeout++) {
+               if (pv->established)
+                       goto established;
+               if (!hvsi_get_packet(pv))
diff --git a/queue-3.4/powerpc-work-around-gcc-miscompilation-of-__pa-on-64-bit.patch b/queue-3.4/powerpc-work-around-gcc-miscompilation-of-__pa-on-64-bit.patch
new file mode 100644 (file)
index 0000000..2b7f327
--- /dev/null
@@ -0,0 +1,67 @@
+From bdbc29c19b2633b1d9c52638fb732bcde7a2031a Mon Sep 17 00:00:00 2001
+From: Paul Mackerras <paulus@samba.org>
+Date: Tue, 27 Aug 2013 16:07:49 +1000
+Subject: powerpc: Work around gcc miscompilation of __pa() on 64-bit
+
+From: Paul Mackerras <paulus@samba.org>
+
+commit bdbc29c19b2633b1d9c52638fb732bcde7a2031a upstream.
+
+On 64-bit, __pa(&static_var) gets miscompiled by recent versions of
+gcc as something like:
+
+        addis 3,2,.LANCHOR1+4611686018427387904@toc@ha
+        addi 3,3,.LANCHOR1+4611686018427387904@toc@l
+
+This ends up effectively ignoring the offset, since its bottom 32 bits
+are zero, and means that the result of __pa() still has 0xC in the top
+nibble.  This happens with gcc 4.8.1, at least.
+
+To work around this, for 64-bit we make __pa() use an AND operator,
+and for symmetry, we make __va() use an OR operator.  Using an AND
+operator rather than a subtraction ends up with slightly shorter code
+since it can be done with a single clrldi instruction, whereas it
+takes three instructions to form the constant (-PAGE_OFFSET) and add
+it on.  (Note that MEMORY_START is always 0 on 64-bit.)
+
+Signed-off-by: Paul Mackerras <paulus@samba.org>
+Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/powerpc/Kconfig            |    1 +
+ arch/powerpc/include/asm/page.h |   10 ++++++++++
+ 2 files changed, 11 insertions(+)
+
+--- a/arch/powerpc/Kconfig
++++ b/arch/powerpc/Kconfig
+@@ -979,6 +979,7 @@ config RELOCATABLE
+         must live at a different physical address than the primary
+         kernel.
++# This value must have zeroes in the bottom 60 bits otherwise lots will break
+ config PAGE_OFFSET
+       hex
+       default "0xc000000000000000"
+--- a/arch/powerpc/include/asm/page.h
++++ b/arch/powerpc/include/asm/page.h
+@@ -211,9 +211,19 @@ extern long long virt_phys_offset;
+ #define __va(x) ((void *)(unsigned long)((phys_addr_t)(x) + VIRT_PHYS_OFFSET))
+ #define __pa(x) ((unsigned long)(x) - VIRT_PHYS_OFFSET)
+ #else
++#ifdef CONFIG_PPC64
++/*
++ * gcc miscompiles (unsigned long)(&static_var) - PAGE_OFFSET
++ * with -mcmodel=medium, so we use & and | instead of - and + on 64-bit.
++ */
++#define __va(x) ((void *)(unsigned long)((phys_addr_t)(x) | PAGE_OFFSET))
++#define __pa(x) ((unsigned long)(x) & 0x0fffffffffffffffUL)
++
++#else /* 32-bit, non book E */
+ #define __va(x) ((void *)(unsigned long)((phys_addr_t)(x) + PAGE_OFFSET - MEMORY_START))
+ #define __pa(x) ((unsigned long)(x) - PAGE_OFFSET + MEMORY_START)
+ #endif
++#endif
+ /*
+  * Unfortunately the PLT is in the BSS in the PPC32 ELF ABI,
diff --git a/queue-3.4/regmap-silence-gcc-warning.patch b/queue-3.4/regmap-silence-gcc-warning.patch
new file mode 100644 (file)
index 0000000..208f6b7
--- /dev/null
@@ -0,0 +1,37 @@
+From a8f28cfad8cd44d7c34b166d0e5ace1125dbee1f Mon Sep 17 00:00:00 2001
+From: Paul Bolle <pebolle@tiscali.nl>
+Date: Mon, 8 Oct 2012 22:06:30 +0200
+Subject: regmap: silence GCC warning
+
+From: Paul Bolle <pebolle@tiscali.nl>
+
+commit a8f28cfad8cd44d7c34b166d0e5ace1125dbee1f upstream.
+
+Building regmap.o triggers this GCC warning:
+    drivers/base/regmap/regmap.c: In function ‘regmap_raw_read’:
+    drivers/base/regmap/regmap.c:1172:6: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized]
+
+Long story short: Jakub Jelinek pointed out that there is a type
+mismatch between 'num' in regmap_volatile_range() and 'val_count' in
+regmap_raw_read(). And indeed, converting 'num' to the type of
+'val_count' (ie, size_t) makes this warning go away.
+
+Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/base/regmap/regmap.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/base/regmap/regmap.c
++++ b/drivers/base/regmap/regmap.c
+@@ -69,7 +69,7 @@ bool regmap_precious(struct regmap *map,
+ }
+ static bool regmap_volatile_range(struct regmap *map, unsigned int reg,
+-      unsigned int num)
++      size_t num)
+ {
+       unsigned int i;
index 16b7aef0ae5f1687d91798bfa38591ba3164a870..4da2ac984091845e3357a903b588b43f19a393ff 100644 (file)
@@ -1 +1,5 @@
 jfs-fix-readdir-cookie-incompatibility-with-nfsv4.patch
+alsa-opti9xx-fix-conflicting-driver-object-name.patch
+powerpc-work-around-gcc-miscompilation-of-__pa-on-64-bit.patch
+powerpc-hvsi-increase-handshake-timeout-from-200ms-to-400ms.patch
+regmap-silence-gcc-warning.patch