]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Mar 2016 07:12:21 +0000 (23:12 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Mar 2016 07:12:21 +0000 (23:12 -0800)
added patches:
async_tx-use-gfp_nowait-rather-than-gfp_io.patch
clocksource-drivers-vt8500-increase-the-minimum-delta.patch
drm-radeon-unconditionally-set-sysfs_initialized.patch
dts-vt8500-add-sdhc-node-to-dts-file-for-wm8650.patch
genirq-prevent-chip-buslock-deadlock.patch

queue-3.14/async_tx-use-gfp_nowait-rather-than-gfp_io.patch [new file with mode: 0644]
queue-3.14/clocksource-drivers-vt8500-increase-the-minimum-delta.patch [new file with mode: 0644]
queue-3.14/drm-radeon-unconditionally-set-sysfs_initialized.patch [new file with mode: 0644]
queue-3.14/dts-vt8500-add-sdhc-node-to-dts-file-for-wm8650.patch [new file with mode: 0644]
queue-3.14/genirq-prevent-chip-buslock-deadlock.patch [new file with mode: 0644]
queue-3.14/series

diff --git a/queue-3.14/async_tx-use-gfp_nowait-rather-than-gfp_io.patch b/queue-3.14/async_tx-use-gfp_nowait-rather-than-gfp_io.patch
new file mode 100644 (file)
index 0000000..ccfaaa0
--- /dev/null
@@ -0,0 +1,102 @@
+From b02bab6b0f928d49dbfb03e1e4e9dd43647623d7 Mon Sep 17 00:00:00 2001
+From: NeilBrown <neilb@suse.com>
+Date: Thu, 7 Jan 2016 11:02:34 +1100
+Subject: async_tx: use GFP_NOWAIT rather than GFP_IO
+
+From: NeilBrown <neilb@suse.com>
+
+commit b02bab6b0f928d49dbfb03e1e4e9dd43647623d7 upstream.
+
+These async_XX functions are called from md/raid5 in an atomic
+section, between get_cpu() and put_cpu(), so they must not sleep.
+So use GFP_NOWAIT rather than GFP_IO.
+
+Dan Williams writes: Longer term async_tx needs to be merged into md
+directly as we can allocate this unmap data statically per-stripe
+rather than per request.
+
+Fixed: 7476bd79fc01 ("async_pq: convert to dmaengine_unmap_data")
+Reported-and-tested-by: Stanislav Samsonov <slava@annapurnalabs.com>
+Acked-by: Dan Williams <dan.j.williams@intel.com>
+Signed-off-by: NeilBrown <neilb@suse.com>
+Signed-off-by: Vinod Koul <vinod.koul@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ crypto/async_tx/async_memcpy.c      |    2 +-
+ crypto/async_tx/async_pq.c          |    4 ++--
+ crypto/async_tx/async_raid6_recov.c |    4 ++--
+ crypto/async_tx/async_xor.c         |    4 ++--
+ 4 files changed, 7 insertions(+), 7 deletions(-)
+
+--- a/crypto/async_tx/async_memcpy.c
++++ b/crypto/async_tx/async_memcpy.c
+@@ -53,7 +53,7 @@ async_memcpy(struct page *dest, struct p
+       struct dmaengine_unmap_data *unmap = NULL;
+       if (device)
+-              unmap = dmaengine_get_unmap_data(device->dev, 2, GFP_NOIO);
++              unmap = dmaengine_get_unmap_data(device->dev, 2, GFP_NOWAIT);
+       if (unmap && is_dma_copy_aligned(device, src_offset, dest_offset, len)) {
+               unsigned long dma_prep_flags = 0;
+--- a/crypto/async_tx/async_pq.c
++++ b/crypto/async_tx/async_pq.c
+@@ -176,7 +176,7 @@ async_gen_syndrome(struct page **blocks,
+       BUG_ON(disks > 255 || !(P(blocks, disks) || Q(blocks, disks)));
+       if (device)
+-              unmap = dmaengine_get_unmap_data(device->dev, disks, GFP_NOIO);
++              unmap = dmaengine_get_unmap_data(device->dev, disks, GFP_NOWAIT);
+       if (unmap &&
+           (src_cnt <= dma_maxpq(device, 0) ||
+@@ -294,7 +294,7 @@ async_syndrome_val(struct page **blocks,
+       BUG_ON(disks < 4);
+       if (device)
+-              unmap = dmaengine_get_unmap_data(device->dev, disks, GFP_NOIO);
++              unmap = dmaengine_get_unmap_data(device->dev, disks, GFP_NOWAIT);
+       if (unmap && disks <= dma_maxpq(device, 0) &&
+           is_dma_pq_aligned(device, offset, 0, len)) {
+--- a/crypto/async_tx/async_raid6_recov.c
++++ b/crypto/async_tx/async_raid6_recov.c
+@@ -41,7 +41,7 @@ async_sum_product(struct page *dest, str
+       u8 *a, *b, *c;
+       if (dma)
+-              unmap = dmaengine_get_unmap_data(dma->dev, 3, GFP_NOIO);
++              unmap = dmaengine_get_unmap_data(dma->dev, 3, GFP_NOWAIT);
+       if (unmap) {
+               struct device *dev = dma->dev;
+@@ -105,7 +105,7 @@ async_mult(struct page *dest, struct pag
+       u8 *d, *s;
+       if (dma)
+-              unmap = dmaengine_get_unmap_data(dma->dev, 3, GFP_NOIO);
++              unmap = dmaengine_get_unmap_data(dma->dev, 3, GFP_NOWAIT);
+       if (unmap) {
+               dma_addr_t dma_dest[2];
+--- a/crypto/async_tx/async_xor.c
++++ b/crypto/async_tx/async_xor.c
+@@ -182,7 +182,7 @@ async_xor(struct page *dest, struct page
+       BUG_ON(src_cnt <= 1);
+       if (device)
+-              unmap = dmaengine_get_unmap_data(device->dev, src_cnt+1, GFP_NOIO);
++              unmap = dmaengine_get_unmap_data(device->dev, src_cnt+1, GFP_NOWAIT);
+       if (unmap && is_dma_xor_aligned(device, offset, 0, len)) {
+               struct dma_async_tx_descriptor *tx;
+@@ -278,7 +278,7 @@ async_xor_val(struct page *dest, struct
+       BUG_ON(src_cnt <= 1);
+       if (device)
+-              unmap = dmaengine_get_unmap_data(device->dev, src_cnt, GFP_NOIO);
++              unmap = dmaengine_get_unmap_data(device->dev, src_cnt, GFP_NOWAIT);
+       if (unmap && src_cnt <= device->max_xor &&
+           is_dma_xor_aligned(device, offset, 0, len)) {
diff --git a/queue-3.14/clocksource-drivers-vt8500-increase-the-minimum-delta.patch b/queue-3.14/clocksource-drivers-vt8500-increase-the-minimum-delta.patch
new file mode 100644 (file)
index 0000000..02cb813
--- /dev/null
@@ -0,0 +1,81 @@
+From f9eccf24615672896dc13251410c3f2f33a14f95 Mon Sep 17 00:00:00 2001
+From: Roman Volkov <rvolkov@v1ros.org>
+Date: Fri, 1 Jan 2016 16:24:41 +0300
+Subject: clocksource/drivers/vt8500: Increase the minimum delta
+
+From: Roman Volkov <rvolkov@v1ros.org>
+
+commit f9eccf24615672896dc13251410c3f2f33a14f95 upstream.
+
+The vt8500 clocksource driver declares itself as capable to handle the
+minimum delay of 4 cycles by passing the value into
+clockevents_config_and_register(). The vt8500_timer_set_next_event()
+requires the passed cycles value to be at least 16. The impact is that
+userspace hangs in nanosleep() calls with small delay intervals.
+
+This problem is reproducible in Linux 4.2 starting from:
+c6eb3f70d448 ('hrtimer: Get rid of hrtimer softirq')
+
+From Russell King, more detailed explanation:
+
+"It's a speciality of the StrongARM/PXA hardware. It takes a certain
+number of OSCR cycles for the value written to hit the compare registers.
+So, if a very small delta is written (eg, the compare register is written
+with a value of OSCR + 1), the OSCR will have incremented past this value
+before it hits the underlying hardware. The result is, that you end up
+waiting a very long time for the OSCR to wrap before the event fires.
+
+So, we introduce a check in set_next_event() to detect this and return
+-ETIME if the calculated delta is too small, which causes the generic
+clockevents code to retry after adding the min_delta specified in
+clockevents_config_and_register() to the current time value.
+
+min_delta must be sufficient that we don't re-trip the -ETIME check - if
+we do, we will return -ETIME, forward the next event time, try to set it,
+return -ETIME again, and basically lock the system up. So, min_delta
+must be larger than the check inside set_next_event(). A factor of two
+was chosen to ensure that this situation would never occur.
+
+The PXA code worked on PXA systems for years, and I'd suggest no one
+changes this mechanism without access to a wide range of PXA systems,
+otherwise they're risking breakage."
+
+Cc: Russell King <linux@arm.linux.org.uk>
+Acked-by: Alexey Charkov <alchark@gmail.com>
+Signed-off-by: Roman Volkov <rvolkov@v1ros.org>
+Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/clocksource/vt8500_timer.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/clocksource/vt8500_timer.c
++++ b/drivers/clocksource/vt8500_timer.c
+@@ -50,6 +50,8 @@
+ #define msecs_to_loops(t) (loops_per_jiffy / 1000 * HZ * t)
++#define MIN_OSCR_DELTA                16
++
+ static void __iomem *regbase;
+ static cycle_t vt8500_timer_read(struct clocksource *cs)
+@@ -80,7 +82,7 @@ static int vt8500_timer_set_next_event(u
+               cpu_relax();
+       writel((unsigned long)alarm, regbase + TIMER_MATCH_VAL);
+-      if ((signed)(alarm - clocksource.read(&clocksource)) <= 16)
++      if ((signed)(alarm - clocksource.read(&clocksource)) <= MIN_OSCR_DELTA)
+               return -ETIME;
+       writel(1, regbase + TIMER_IER_VAL);
+@@ -160,7 +162,7 @@ static void __init vt8500_timer_init(str
+               pr_err("%s: setup_irq failed for %s\n", __func__,
+                                                       clockevent.name);
+       clockevents_config_and_register(&clockevent, VT8500_TIMER_HZ,
+-                                      4, 0xf0000000);
++                                      MIN_OSCR_DELTA * 2, 0xf0000000);
+ }
+ CLOCKSOURCE_OF_DECLARE(vt8500, "via,vt8500-timer", vt8500_timer_init);
diff --git a/queue-3.14/drm-radeon-unconditionally-set-sysfs_initialized.patch b/queue-3.14/drm-radeon-unconditionally-set-sysfs_initialized.patch
new file mode 100644 (file)
index 0000000..8f4b212
--- /dev/null
@@ -0,0 +1,34 @@
+From 24dd2f64c5a877392925202321c7c2c46c2b0ddf Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Tue, 10 Nov 2015 13:01:35 -0500
+Subject: drm/radeon: unconditionally set sysfs_initialized
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 24dd2f64c5a877392925202321c7c2c46c2b0ddf upstream.
+
+Avoids spew on resume for systems where sysfs may
+fail even on init.
+
+bug:
+https://bugzilla.kernel.org/show_bug.cgi?id=106851
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/radeon/radeon_pm.c |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/gpu/drm/radeon/radeon_pm.c
++++ b/drivers/gpu/drm/radeon/radeon_pm.c
+@@ -1364,8 +1364,7 @@ int radeon_pm_late_init(struct radeon_de
+                               ret = device_create_file(rdev->dev, &dev_attr_power_method);
+                               if (ret)
+                                       DRM_ERROR("failed to create device file for power method\n");
+-                              if (!ret)
+-                                      rdev->pm.sysfs_initialized = true;
++                              rdev->pm.sysfs_initialized = true;
+                       }
+                       mutex_lock(&rdev->pm.mutex);
diff --git a/queue-3.14/dts-vt8500-add-sdhc-node-to-dts-file-for-wm8650.patch b/queue-3.14/dts-vt8500-add-sdhc-node-to-dts-file-for-wm8650.patch
new file mode 100644 (file)
index 0000000..375f87c
--- /dev/null
@@ -0,0 +1,40 @@
+From 0f090bf14e51e7eefb71d9d1c545807f8b627986 Mon Sep 17 00:00:00 2001
+From: Roman Volkov <rvolkov@v1ros.org>
+Date: Fri, 1 Jan 2016 16:38:11 +0300
+Subject: dts: vt8500: Add SDHC node to DTS file for WM8650
+
+From: Roman Volkov <rvolkov@v1ros.org>
+
+commit 0f090bf14e51e7eefb71d9d1c545807f8b627986 upstream.
+
+Since WM8650 has the same 'WMT' SDHC controller as WM8505, and the driver
+is already in the kernel, this node enables the controller support for
+WM8650
+
+Signed-off-by: Roman Volkov <rvolkov@v1ros.org>
+Reviewed-by: Alexey Charkov <alchark@gmail.com>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/wm8650.dtsi |    9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/arch/arm/boot/dts/wm8650.dtsi
++++ b/arch/arm/boot/dts/wm8650.dtsi
+@@ -187,6 +187,15 @@
+                       interrupts = <43>;
+               };
++              sdhc@d800a000 {
++                      compatible = "wm,wm8505-sdhc";
++                      reg = <0xd800a000 0x400>;
++                      interrupts = <20>, <21>;
++                      clocks = <&clksdhc>;
++                      bus-width = <4>;
++                      sdon-inverted;
++              };
++
+               fb: fb@d8050800 {
+                       compatible = "wm,wm8505-fb";
+                       reg = <0xd8050800 0x200>;
diff --git a/queue-3.14/genirq-prevent-chip-buslock-deadlock.patch b/queue-3.14/genirq-prevent-chip-buslock-deadlock.patch
new file mode 100644 (file)
index 0000000..646c8a6
--- /dev/null
@@ -0,0 +1,80 @@
+From abc7e40c81d113ef4bacb556f0a77ca63ac81d85 Mon Sep 17 00:00:00 2001
+From: Thomas Gleixner <tglx@linutronix.de>
+Date: Sun, 13 Dec 2015 18:12:30 +0100
+Subject: genirq: Prevent chip buslock deadlock
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Thomas Gleixner <tglx@linutronix.de>
+
+commit abc7e40c81d113ef4bacb556f0a77ca63ac81d85 upstream.
+
+If a interrupt chip utilizes chip->buslock then free_irq() can
+deadlock in the following way:
+
+CPU0                           CPU1
+                               interrupt(X) (Shared or spurious)
+free_irq(X)                    interrupt_thread(X)
+chip_bus_lock(X)
+                                  irq_finalize_oneshot(X)
+                                    chip_bus_lock(X)
+synchronize_irq(X)
+
+synchronize_irq() waits for the interrupt thread to complete,
+i.e. forever.
+
+Solution is simple: Drop chip_bus_lock() before calling
+synchronize_irq() as we do with the irq_desc lock. There is nothing to
+be protected after the point where irq_desc lock has been released.
+
+This adds chip_bus_lock/unlock() to the remove_irq() code path, but
+that's actually correct in the case where remove_irq() is called on
+such an interrupt. The current users of remove_irq() are not affected
+as none of those interrupts is on a chip which requires buslock.
+
+Reported-by: Fredrik Markström <fredrik.markstrom@gmail.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/irq/manage.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/kernel/irq/manage.c
++++ b/kernel/irq/manage.c
+@@ -1230,6 +1230,7 @@ static struct irqaction *__free_irq(unsi
+       if (!desc)
+               return NULL;
++      chip_bus_lock(desc);
+       raw_spin_lock_irqsave(&desc->lock, flags);
+       /*
+@@ -1243,7 +1244,7 @@ static struct irqaction *__free_irq(unsi
+               if (!action) {
+                       WARN(1, "Trying to free already-free IRQ %d\n", irq);
+                       raw_spin_unlock_irqrestore(&desc->lock, flags);
+-
++                      chip_bus_sync_unlock(desc);
+                       return NULL;
+               }
+@@ -1266,6 +1267,7 @@ static struct irqaction *__free_irq(unsi
+ #endif
+       raw_spin_unlock_irqrestore(&desc->lock, flags);
++      chip_bus_sync_unlock(desc);
+       unregister_handler_proc(irq, action);
+@@ -1339,9 +1341,7 @@ void free_irq(unsigned int irq, void *de
+               desc->affinity_notify = NULL;
+ #endif
+-      chip_bus_lock(desc);
+       kfree(__free_irq(irq, dev_id));
+-      chip_bus_sync_unlock(desc);
+ }
+ EXPORT_SYMBOL(free_irq);
index 329b707a5854015338c665937409de6c37359e63..e62d61b814cc9edd9649a93d46e87d545cd2b9f7 100644 (file)
@@ -46,3 +46,8 @@ sched-rt-remove-return-value-from-pull_rt_task.patch
 sched-rt-convert-switched_-from-to-_rt-prio_changed_rt-to-balance-callbacks.patch
 sched-dl-remove-return-value-from-pull_dl_task.patch
 sched-dl-convert-switched_-from-to-_dl-prio_changed_dl-to-balance-callbacks.patch
+genirq-prevent-chip-buslock-deadlock.patch
+dts-vt8500-add-sdhc-node-to-dts-file-for-wm8650.patch
+clocksource-drivers-vt8500-increase-the-minimum-delta.patch
+async_tx-use-gfp_nowait-rather-than-gfp_io.patch
+drm-radeon-unconditionally-set-sysfs_initialized.patch