]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 6 Nov 2016 12:04:19 +0000 (13:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 6 Nov 2016 12:04:19 +0000 (13:04 +0100)
added patches:
h8300-fix-syscall-restarting.patch

queue-4.4/h8300-fix-syscall-restarting.patch [new file with mode: 0644]
queue-4.4/i2c-rk3x-give-the-tuning-value-0-during-rk3x_i2c_v0_calc_timings.patch [deleted file]
queue-4.4/series

diff --git a/queue-4.4/h8300-fix-syscall-restarting.patch b/queue-4.4/h8300-fix-syscall-restarting.patch
new file mode 100644 (file)
index 0000000..a4b1be4
--- /dev/null
@@ -0,0 +1,65 @@
+From 21753583056d48a5fad964d6f272e28168426845 Mon Sep 17 00:00:00 2001
+From: Mark Rutland <mark.rutland@arm.com>
+Date: Thu, 27 Oct 2016 17:46:24 -0700
+Subject: h8300: fix syscall restarting
+
+From: Mark Rutland <mark.rutland@arm.com>
+
+commit 21753583056d48a5fad964d6f272e28168426845 upstream.
+
+Back in commit f56141e3e2d9 ("all arches, signal: move restart_block to
+struct task_struct"), all architectures and core code were changed to
+use task_struct::restart_block.  However, when h8300 support was
+subsequently restored in v4.2, it was not updated to account for this,
+and maintains thread_info::restart_block, which is not kept in sync.
+
+This patch drops the redundant restart_block from thread_info, and moves
+h8300 to the common one in task_struct, ensuring that syscall restarting
+always works as expected.
+
+Fixes: f56141e3e2d9 ("all arches, signal: move restart_block to struct task_struct")
+Link: http://lkml.kernel.org/r/1476714934-11635-1-git-send-email-mark.rutland@arm.com
+Signed-off-by: Mark Rutland <mark.rutland@arm.com>
+Cc: Andy Lutomirski <luto@amacapital.net>
+Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
+Cc: uclinux-h8-devel@lists.sourceforge.jp
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/h8300/include/asm/thread_info.h |    4 ----
+ arch/h8300/kernel/signal.c           |    2 +-
+ 2 files changed, 1 insertion(+), 5 deletions(-)
+
+--- a/arch/h8300/include/asm/thread_info.h
++++ b/arch/h8300/include/asm/thread_info.h
+@@ -31,7 +31,6 @@ struct thread_info {
+       int                cpu;                 /* cpu we're on */
+       int                preempt_count;       /* 0 => preemptable, <0 => BUG */
+       mm_segment_t            addr_limit;
+-      struct restart_block restart_block;
+ };
+ /*
+@@ -44,9 +43,6 @@ struct thread_info {
+       .cpu =          0,                      \
+       .preempt_count = INIT_PREEMPT_COUNT,    \
+       .addr_limit     = KERNEL_DS,            \
+-      .restart_block  = {                     \
+-              .fn = do_no_restart_syscall,    \
+-      },                                      \
+ }
+ #define init_thread_info      (init_thread_union.thread_info)
+--- a/arch/h8300/kernel/signal.c
++++ b/arch/h8300/kernel/signal.c
+@@ -79,7 +79,7 @@ restore_sigcontext(struct sigcontext *us
+       unsigned int er0;
+       /* Always make any pending restarted system calls return -EINTR */
+-      current_thread_info()->restart_block.fn = do_no_restart_syscall;
++      current->restart_block.fn = do_no_restart_syscall;
+       /* restore passed registers */
+ #define COPY(r)  do { err |= get_user(regs->r, &usc->sc_##r); } while (0)
diff --git a/queue-4.4/i2c-rk3x-give-the-tuning-value-0-during-rk3x_i2c_v0_calc_timings.patch b/queue-4.4/i2c-rk3x-give-the-tuning-value-0-during-rk3x_i2c_v0_calc_timings.patch
deleted file mode 100644 (file)
index 05e3ee2..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-From 399c168ab5ab5e12ed55b6c91d61c24eb84c9164 Mon Sep 17 00:00:00 2001
-From: David Wu <david.wu@rock-chips.com>
-Date: Sat, 22 Oct 2016 16:43:42 +0800
-Subject: i2c: rk3x: Give the tuning value 0 during rk3x_i2c_v0_calc_timings
-
-From: David Wu <david.wu@rock-chips.com>
-
-commit 399c168ab5ab5e12ed55b6c91d61c24eb84c9164 upstream.
-
-We found a bug that i2c transfer sometimes failed on 3066a board with
-stabel-4.8, the con register would be updated by uninitialized tuning
-value, it made the i2c transfer failed.
-
-So give the tuning value to be zero during rk3x_i2c_v0_calc_timings.
-
-Signed-off-by: David Wu <david.wu@rock-chips.com>
-Tested-by: Andy Yan <andy.yan@rock-chips.com>
-Reviewed-by: Douglas Anderson <dianders@chromium.org>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- drivers/i2c/busses/i2c-rk3x.c |    2 ++
- 1 file changed, 2 insertions(+)
-
---- a/drivers/i2c/busses/i2c-rk3x.c
-+++ b/drivers/i2c/busses/i2c-rk3x.c
-@@ -600,6 +600,8 @@ static int rk3x_i2c_calc_divs(unsigned l
-       *div_low = *div_low - 1;
-       *div_high = *div_high - 1;
-+      /* Give the tuning value 0, that would not update con register */
-+      t_calc->tuning = 0;
-       /* Maximum divider supported by hw is 0xffff */
-       if (*div_low > 0xffff) {
-               *div_low = 0xffff;
index 58db32a6891ba0bd40caf9dfe0ce63f7f2399b31..d3b964e377fdfa6f5e413091751d3c47d57619f3 100644 (file)
@@ -1,5 +1,5 @@
 i2c-imx-defer-probe-if-bus-recovery-gpios-are-not-ready.patch
-i2c-rk3x-give-the-tuning-value-0-during-rk3x_i2c_v0_calc_timings.patch
 i2c-xgene-avoid-dma_buffer-overrun.patch
 i2c-core-fix-null-pointer-dereference-under-race-condition.patch
 drm-dp-mst-clear-port-pdt-when-tearing-down-the-i2c-adapter.patch
+h8300-fix-syscall-restarting.patch