]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.5-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Aug 2012 23:05:35 +0000 (16:05 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Aug 2012 23:05:35 +0000 (16:05 -0700)
added patches:
dma-imx-dma-fix-kernel-crash-due-to-missing-clock-conversion.patch
drm-mgag200-fix-g200er-pll-picking-algorithm.patch
nouveau-fixup-scanout-enable-in-nvc0_pm.patch
s390-compat-fix-compat-wrappers-for-process_vm-system-calls.patch
s390-compat-fix-mmap-compat-system-calls.patch

queue-3.5/dma-imx-dma-fix-kernel-crash-due-to-missing-clock-conversion.patch [new file with mode: 0644]
queue-3.5/drm-mgag200-fix-g200er-pll-picking-algorithm.patch [new file with mode: 0644]
queue-3.5/nouveau-fixup-scanout-enable-in-nvc0_pm.patch [new file with mode: 0644]
queue-3.5/s390-compat-fix-compat-wrappers-for-process_vm-system-calls.patch [new file with mode: 0644]
queue-3.5/s390-compat-fix-mmap-compat-system-calls.patch [new file with mode: 0644]
queue-3.5/series [new file with mode: 0644]

diff --git a/queue-3.5/dma-imx-dma-fix-kernel-crash-due-to-missing-clock-conversion.patch b/queue-3.5/dma-imx-dma-fix-kernel-crash-due-to-missing-clock-conversion.patch
new file mode 100644 (file)
index 0000000..7beaa30
--- /dev/null
@@ -0,0 +1,148 @@
+From a2367db2ec5e7fc6fe93e221e0fcdee81b053daf Mon Sep 17 00:00:00 2001
+From: Fabio Estevam <festevam@gmail.com>
+Date: Tue, 3 Jul 2012 15:33:29 -0300
+Subject: dma: imx-dma: Fix kernel crash due to missing clock conversion
+
+From: Fabio Estevam <festevam@gmail.com>
+
+commit a2367db2ec5e7fc6fe93e221e0fcdee81b053daf upstream.
+
+With the new i.MX clock infrastructure we need to request the dma clocks
+seperately: ahb and ipg clocks.
+
+This fixes the following kernel crash and make audio to be functional again:
+
+root@freescale /home$ aplay audio48k16S.wav
+Playing WAVE 'audio48k16S.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
+Unable to handle kernel NULL pointer dereference at virtual address 00000000
+pgd = c7b74000
+[00000000] *pgd=a7bb5831, *pte=00000000, *ppte=00000000
+Internal error: Oops: 17 [#1] PREEMPT ARM
+Modules linked in:
+CPU: 0    Not tainted  (3.5.0-rc5-next-20120702-00007-g3028b64 #1128)
+PC is at snd_dmaengine_pcm_get_chan+0x8/0x10
+LR is at snd_imx_pcm_hw_params+0x18/0xdc
+pc : [<c02d3cf8>]    lr : [<c02e95ec>]    psr: a0000013
+sp : c7b45e30  ip : ffffffff  fp : c7ae58e0
+r10: 00000000  r9 : c7ae981c  r8 : c7b88800
+r7 : c7ae5a60  r6 : c7ae5b20  r5 : c7ae9810  r4 : c7afa060
+r3 : 00000000  r2 : 00000001  r1 : c7b88800  r0 : c7afa060
+Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
+Control: 0005317f  Table: a7b74000  DAC: 00000015
+Process aplay (pid: 701, stack limit = 0xc7b44270)
+Stack: (0xc7b45e30 to 0xc7b46000)
+5e20:                                     00100000 00000029 c7b88800 c02db870
+5e40: c7ae5a60 c02d4594 00000010 01ae5a60 c7ae5a60 c7ae9810 c7ae9810 c7afa060
+5e60: c7ae5b20 c7ae5a60 c7b88800 c02e3ef0 c02e3e08 c7b1e400 c7afa060 c7b88800
+5e80: 00000000 c0014da8 c7b44000 00000000 bec566ac c02cd400 c7afa060 c7afa060
+5ea0: bec56800 c7b88800 c0014da8 c02cdd7c c04ee710 c04ee7b8 00000003 c005fc74
+5ec0: 00000000 7fffffff c7b45f00 c7afa060 c7b67420 c7ba3070 00000004 c0014da8
+5ee0: c7b44000 00000000 bec566ac c02ced88 c04e95f8 b6f5ab04 c7b45fb0 0145a468
+5f00: 0145a600 bec566bc bec56800 c7b67420 c7ba3070 c00d499c c7b45f18 c7b45f18
+5f20: 0000001a 00000004 00000001 c7b44000 c0527f40 00000009 00000008 00000000
+5f40: c7b44000 c002c9ec 00000001 c04f0ab0 c04ebec0 00000101 00000000 0000000a
+5f60: 60000093 c7b67420 bec56800 c25c4111 00000004 c0014da8 c7b44000 00000000
+5f80: bec566ac c00d4f38 b6ffb658 00000000 c0522d80 0145a468 b6fd5000 0145a418
+5fa0: 00000036 c0014c00 0145a468 b6fd5000 00000004 c25c4111 bec56800 00020001
+5fc0: 0145a468 b6fd5000 0145a418 00000036 0145a468 0145a600 bec566bc bec566ac
+5fe0: 0145a468 bec56388 b6f65ce4 b6dcebec 20000010 00000004 00000000 00000000
+[<c02d3cf8>] (snd_dmaengine_pcm_get_chan+0x8/0x10) from [<c02e95ec>] (snd_imx_pcm_hw_params+0x18/0xdc)
+[<c02e95ec>] (snd_imx_pcm_hw_params+0x18/0xdc) from [<c02e3ef0>] (soc_pcm_hw_params+0xe8/0x1f0)
+[<c02e3ef0>] (soc_pcm_hw_params+0xe8/0x1f0) from [<c02cd400>] (snd_pcm_hw_params+0x124/0x474)
+[<c02cd400>] (snd_pcm_hw_params+0x124/0x474) from [<c02cdd7c>] (snd_pcm_common_ioctl1+0x4b4/0xf74)
+[<c02cdd7c>] (snd_pcm_common_ioctl1+0x4b4/0xf74) from [<c02ced88>] (snd_pcm_playback_ioctl1+0x30/0x510)
+[<c02ced88>] (snd_pcm_playback_ioctl1+0x30/0x510) from [<c00d499c>] (do_vfs_ioctl+0x80/0x5e4)
+[<c00d499c>] (do_vfs_ioctl+0x80/0x5e4) from [<c00d4f38>] (sys_ioctl+0x38/0x60)
+[<c00d4f38>] (sys_ioctl+0x38/0x60) from [<c0014c00>] (ret_fast_syscall+0x0/0x2c)
+Code: e593000c e12fff1e e59030a0 e59330bc (e5930000)
+---[ end trace fa518c8ba3a74e97 ]--
+
+Reported-by: Javier Martin <javier.martin@vista-silicon.com>
+Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
+Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
+Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/dma/imx-dma.c |   36 +++++++++++++++++++++++++-----------
+ 1 file changed, 25 insertions(+), 11 deletions(-)
+
+--- a/drivers/dma/imx-dma.c
++++ b/drivers/dma/imx-dma.c
+@@ -172,7 +172,8 @@ struct imxdma_engine {
+       struct device_dma_parameters    dma_parms;
+       struct dma_device               dma_device;
+       void __iomem                    *base;
+-      struct clk                      *dma_clk;
++      struct clk                      *dma_ahb;
++      struct clk                      *dma_ipg;
+       spinlock_t                      lock;
+       struct imx_dma_2d_config        slots_2d[IMX_DMA_2D_SLOTS];
+       struct imxdma_channel           channel[IMX_DMA_CHANNELS];
+@@ -976,10 +977,20 @@ static int __init imxdma_probe(struct pl
+               return 0;
+       }
+-      imxdma->dma_clk = clk_get(NULL, "dma");
+-      if (IS_ERR(imxdma->dma_clk))
+-              return PTR_ERR(imxdma->dma_clk);
+-      clk_enable(imxdma->dma_clk);
++      imxdma->dma_ipg = devm_clk_get(&pdev->dev, "ipg");
++      if (IS_ERR(imxdma->dma_ipg)) {
++              ret = PTR_ERR(imxdma->dma_ipg);
++              goto err_clk;
++      }
++
++      imxdma->dma_ahb = devm_clk_get(&pdev->dev, "ahb");
++      if (IS_ERR(imxdma->dma_ahb)) {
++              ret = PTR_ERR(imxdma->dma_ahb);
++              goto err_clk;
++      }
++
++      clk_prepare_enable(imxdma->dma_ipg);
++      clk_prepare_enable(imxdma->dma_ahb);
+       /* reset DMA module */
+       imx_dmav1_writel(imxdma, DCR_DRST, DMA_DCR);
+@@ -988,16 +999,14 @@ static int __init imxdma_probe(struct pl
+               ret = request_irq(MX1_DMA_INT, dma_irq_handler, 0, "DMA", imxdma);
+               if (ret) {
+                       dev_warn(imxdma->dev, "Can't register IRQ for DMA\n");
+-                      kfree(imxdma);
+-                      return ret;
++                      goto err_enable;
+               }
+               ret = request_irq(MX1_DMA_ERR, imxdma_err_handler, 0, "DMA", imxdma);
+               if (ret) {
+                       dev_warn(imxdma->dev, "Can't register ERRIRQ for DMA\n");
+                       free_irq(MX1_DMA_INT, NULL);
+-                      kfree(imxdma);
+-                      return ret;
++                      goto err_enable;
+               }
+       }
+@@ -1094,7 +1103,10 @@ err_init:
+               free_irq(MX1_DMA_INT, NULL);
+               free_irq(MX1_DMA_ERR, NULL);
+       }
+-
++err_enable:
++      clk_disable_unprepare(imxdma->dma_ipg);
++      clk_disable_unprepare(imxdma->dma_ahb);
++err_clk:
+       kfree(imxdma);
+       return ret;
+ }
+@@ -1114,7 +1126,9 @@ static int __exit imxdma_remove(struct p
+               free_irq(MX1_DMA_ERR, NULL);
+       }
+-        kfree(imxdma);
++      clk_disable_unprepare(imxdma->dma_ipg);
++      clk_disable_unprepare(imxdma->dma_ahb);
++      kfree(imxdma);
+         return 0;
+ }
diff --git a/queue-3.5/drm-mgag200-fix-g200er-pll-picking-algorithm.patch b/queue-3.5/drm-mgag200-fix-g200er-pll-picking-algorithm.patch
new file mode 100644 (file)
index 0000000..c843e7c
--- /dev/null
@@ -0,0 +1,59 @@
+From 9830605d4c070b16ec5c24a75503877cc7698409 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@gmail.com>
+Date: Thu, 9 Aug 2012 15:00:15 +1000
+Subject: drm/mgag200: fix G200ER pll picking algorithm
+
+From: Dave Airlie <airlied@gmail.com>
+
+commit 9830605d4c070b16ec5c24a75503877cc7698409 upstream.
+
+The original code was misported from the X driver,
+
+a) an int went to unsigned int, breaking the downward counting testm code
+b) the port did the vco/computed clock bits completely wrong.
+
+This fixes an infinite loop on modprobe on some Dell servers with the G200ER
+chipset variant.
+
+Found in internal testing.
+
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/mgag200/mgag200_mode.c |   12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
++++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
+@@ -468,10 +468,11 @@ static int mga_g200er_set_plls(struct mg
+ {
+       unsigned int vcomax, vcomin, pllreffreq;
+       unsigned int delta, tmpdelta;
+-      unsigned int testr, testn, testm, testo;
++      int testr, testn, testm, testo;
+       unsigned int p, m, n;
+-      unsigned int computed;
++      unsigned int computed, vco;
+       int tmp;
++      const unsigned int m_div_val[] = { 1, 2, 4, 8 };
+       m = n = p = 0;
+       vcomax = 1488000;
+@@ -490,12 +491,13 @@ static int mga_g200er_set_plls(struct mg
+                               if (delta == 0)
+                                       break;
+                               for (testo = 5; testo < 33; testo++) {
+-                                      computed = pllreffreq * (testn + 1) /
++                                      vco = pllreffreq * (testn + 1) /
+                                               (testr + 1);
+-                                      if (computed < vcomin)
++                                      if (vco < vcomin)
+                                               continue;
+-                                      if (computed > vcomax)
++                                      if (vco > vcomax)
+                                               continue;
++                                      computed = vco / (m_div_val[testm] * (testo + 1));
+                                       if (computed > clock)
+                                               tmpdelta = computed - clock;
+                                       else
diff --git a/queue-3.5/nouveau-fixup-scanout-enable-in-nvc0_pm.patch b/queue-3.5/nouveau-fixup-scanout-enable-in-nvc0_pm.patch
new file mode 100644 (file)
index 0000000..95ab2a9
--- /dev/null
@@ -0,0 +1,30 @@
+From 44b9f44e111c1e4a50bff66a642cc7c5cb59af4e Mon Sep 17 00:00:00 2001
+From: Maarten Lankhorst <maarten.lankhorst@canonical.com>
+Date: Mon, 30 Jul 2012 12:03:30 +0200
+Subject: nouveau: fixup scanout enable in nvc0_pm
+
+From: Maarten Lankhorst <maarten.lankhorst@canonical.com>
+
+commit 44b9f44e111c1e4a50bff66a642cc7c5cb59af4e upstream.
+
+Fixes screen being black after changing performance level.
+
+Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
+Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/nouveau/nvc0_pm.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/nouveau/nvc0_pm.c
++++ b/drivers/gpu/drm/nouveau/nvc0_pm.c
+@@ -557,7 +557,7 @@ prog_mem(struct drm_device *dev, struct
+       nouveau_mem_exec(&exec, info->perflvl);
+       if (dev_priv->chipset < 0xd0)
+-              nv_wr32(dev, 0x611200, 0x00003300);
++              nv_wr32(dev, 0x611200, 0x00003330);
+       else
+               nv_wr32(dev, 0x62c000, 0x03030300);
+ }
diff --git a/queue-3.5/s390-compat-fix-compat-wrappers-for-process_vm-system-calls.patch b/queue-3.5/s390-compat-fix-compat-wrappers-for-process_vm-system-calls.patch
new file mode 100644 (file)
index 0000000..bcb8f35
--- /dev/null
@@ -0,0 +1,37 @@
+From 82aabdb6f1eb61e0034ec23901480f5dd23db7c4 Mon Sep 17 00:00:00 2001
+From: Heiko Carstens <heiko.carstens@de.ibm.com>
+Date: Tue, 7 Aug 2012 09:48:13 +0200
+Subject: s390/compat: fix compat wrappers for process_vm system calls
+
+From: Heiko Carstens <heiko.carstens@de.ibm.com>
+
+commit 82aabdb6f1eb61e0034ec23901480f5dd23db7c4 upstream.
+
+The compat wrappers incorrectly called the non compat versions of
+the system process_vm system calls.
+
+Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
+Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/s390/kernel/compat_wrapper.S |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/s390/kernel/compat_wrapper.S
++++ b/arch/s390/kernel/compat_wrapper.S
+@@ -1636,7 +1636,7 @@ ENTRY(compat_sys_process_vm_readv_wrappe
+       llgfr   %r6,%r6                 # unsigned long
+       llgf    %r0,164(%r15)           # unsigned long
+       stg     %r0,160(%r15)
+-      jg      sys_process_vm_readv
++      jg      compat_sys_process_vm_readv
+ ENTRY(compat_sys_process_vm_writev_wrapper)
+       lgfr    %r2,%r2                 # compat_pid_t
+@@ -1646,4 +1646,4 @@ ENTRY(compat_sys_process_vm_writev_wrapp
+       llgfr   %r6,%r6                 # unsigned long
+       llgf    %r0,164(%r15)           # unsigned long
+       stg     %r0,160(%r15)
+-      jg      sys_process_vm_writev
++      jg      compat_sys_process_vm_writev
diff --git a/queue-3.5/s390-compat-fix-mmap-compat-system-calls.patch b/queue-3.5/s390-compat-fix-mmap-compat-system-calls.patch
new file mode 100644 (file)
index 0000000..79aeb46
--- /dev/null
@@ -0,0 +1,52 @@
+From e85871218513c54f7dfdb6009043cb638f2fecbe Mon Sep 17 00:00:00 2001
+From: Heiko Carstens <heiko.carstens@de.ibm.com>
+Date: Wed, 8 Aug 2012 09:32:20 +0200
+Subject: s390/compat: fix mmap compat system calls
+
+From: Heiko Carstens <heiko.carstens@de.ibm.com>
+
+commit e85871218513c54f7dfdb6009043cb638f2fecbe upstream.
+
+The native 31 bit and the compat behaviour for the mmap system calls differ:
+
+In native 31 bit mode the passed in address for the mmap system call will be
+unmodified passed to sys_mmap_pgoff().
+In compat mode however the passed in address will be modified with
+compat_ptr() which masks out the most significant bit.
+
+The result is that in native 31 bit mode each mmap request (with MAP_FIXED)
+will fail where the most significat bit is set, while in compat mode it
+may succeed.
+
+This odd behaviour was introduced with d3815898 "[S390] mmap: add missing
+compat_ptr conversion to both mmap compat syscalls".
+
+To restore a consistent behaviour accross native and compat mode this
+patch functionally reverts the above mentioned commit.
+
+Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
+Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/s390/kernel/compat_linux.c |    2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/arch/s390/kernel/compat_linux.c
++++ b/arch/s390/kernel/compat_linux.c
+@@ -622,7 +622,6 @@ asmlinkage unsigned long old32_mmap(stru
+               return -EFAULT;
+       if (a.offset & ~PAGE_MASK)
+               return -EINVAL;
+-      a.addr = (unsigned long) compat_ptr(a.addr);
+       return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd,
+                             a.offset >> PAGE_SHIFT);
+ }
+@@ -633,7 +632,6 @@ asmlinkage long sys32_mmap2(struct mmap_
+       if (copy_from_user(&a, arg, sizeof(a)))
+               return -EFAULT;
+-      a.addr = (unsigned long) compat_ptr(a.addr);
+       return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, a.offset);
+ }
diff --git a/queue-3.5/series b/queue-3.5/series
new file mode 100644 (file)
index 0000000..4b10195
--- /dev/null
@@ -0,0 +1,5 @@
+s390-compat-fix-compat-wrappers-for-process_vm-system-calls.patch
+s390-compat-fix-mmap-compat-system-calls.patch
+nouveau-fixup-scanout-enable-in-nvc0_pm.patch
+drm-mgag200-fix-g200er-pll-picking-algorithm.patch
+dma-imx-dma-fix-kernel-crash-due-to-missing-clock-conversion.patch