From: Greg Kroah-Hartman Date: Sat, 4 Jun 2016 18:40:35 +0000 (-0700) Subject: 3.14-stable patches X-Git-Tag: v3.14.72~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1490a58d719a3eaf3312964dd94365db45ee865b;p=thirdparty%2Fkernel%2Fstable-queue.git 3.14-stable patches added patches: mips-ath79-make-bootconsole-wait-for-both-thre-and-temt.patch mips-fix-siginfo.h-to-use-strict-posix-types.patch --- diff --git a/queue-3.14/mips-ath79-make-bootconsole-wait-for-both-thre-and-temt.patch b/queue-3.14/mips-ath79-make-bootconsole-wait-for-both-thre-and-temt.patch new file mode 100644 index 00000000000..55c8b08069d --- /dev/null +++ b/queue-3.14/mips-ath79-make-bootconsole-wait-for-both-thre-and-temt.patch @@ -0,0 +1,54 @@ +From f5b556c94c8490d42fea79d7b4ae0ecbc291e69d Mon Sep 17 00:00:00 2001 +From: Matthias Schiffer +Date: Thu, 24 Mar 2016 16:02:52 +0100 +Subject: MIPS: ath79: make bootconsole wait for both THRE and TEMT + +From: Matthias Schiffer + +commit f5b556c94c8490d42fea79d7b4ae0ecbc291e69d upstream. + +This makes the ath79 bootconsole behave the same way as the generic 8250 +bootconsole. + +Also waiting for TEMT (transmit buffer is empty) instead of just THRE +(transmit buffer is not full) ensures that all characters have been +transmitted before the real serial driver starts reconfiguring the serial +controller (which would sometimes result in garbage being transmitted.) +This change does not cause a visible performance loss. + +In addition, this seems to fix a hang observed in certain configurations on +many AR7xxx/AR9xxx SoCs during autoconfig of the real serial driver. + +A more complete follow-up patch will disable 8250 autoconfig for ath79 +altogether (the serial controller is detected as a 16550A, which is not +fully compatible with the ath79 serial, and the autoconfig may lead to +undefined behavior on ath79.) + +Signed-off-by: Matthias Schiffer +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Greg Kroah-Hartman + +--- + arch/mips/ath79/early_printk.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/arch/mips/ath79/early_printk.c ++++ b/arch/mips/ath79/early_printk.c +@@ -31,13 +31,15 @@ static inline void prom_putchar_wait(voi + } while (1); + } + ++#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) ++ + static void prom_putchar_ar71xx(unsigned char ch) + { + void __iomem *base = (void __iomem *)(KSEG1ADDR(AR71XX_UART_BASE)); + +- prom_putchar_wait(base + UART_LSR * 4, UART_LSR_THRE, UART_LSR_THRE); ++ prom_putchar_wait(base + UART_LSR * 4, BOTH_EMPTY, BOTH_EMPTY); + __raw_writel(ch, base + UART_TX * 4); +- prom_putchar_wait(base + UART_LSR * 4, UART_LSR_THRE, UART_LSR_THRE); ++ prom_putchar_wait(base + UART_LSR * 4, BOTH_EMPTY, BOTH_EMPTY); + } + + static void prom_putchar_ar933x(unsigned char ch) diff --git a/queue-3.14/mips-fix-siginfo.h-to-use-strict-posix-types.patch b/queue-3.14/mips-fix-siginfo.h-to-use-strict-posix-types.patch new file mode 100644 index 00000000000..bd9573be2ee --- /dev/null +++ b/queue-3.14/mips-fix-siginfo.h-to-use-strict-posix-types.patch @@ -0,0 +1,83 @@ +From 5daebc477da4dfeb31ae193d83084def58fd2697 Mon Sep 17 00:00:00 2001 +From: James Hogan +Date: Mon, 8 Feb 2016 18:43:49 +0000 +Subject: MIPS: Fix siginfo.h to use strict posix types + +From: James Hogan + +commit 5daebc477da4dfeb31ae193d83084def58fd2697 upstream. + +Commit 85efde6f4e0d ("make exported headers use strict posix types") +changed the asm-generic siginfo.h to use the __kernel_* types, and +commit 3a471cbc081b ("remove __KERNEL_STRICT_NAMES") make the internal +types accessible only to the kernel, but the MIPS implementation hasn't +been updated to match. + +Switch to proper types now so that the exported asm/siginfo.h won't +produce quite so many compiler errors when included alone by a user +program. + +Signed-off-by: James Hogan +Cc: Christopher Ferris +Cc: linux-mips@linux-mips.org +Cc: linux-kernel@vger.kernel.org +Patchwork: https://patchwork.linux-mips.org/patch/12477/ +Signed-off-by: Ralf Baechle +Signed-off-by: Greg Kroah-Hartman + +--- + arch/mips/include/uapi/asm/siginfo.h | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +--- a/arch/mips/include/uapi/asm/siginfo.h ++++ b/arch/mips/include/uapi/asm/siginfo.h +@@ -48,13 +48,13 @@ typedef struct siginfo { + + /* kill() */ + struct { +- pid_t _pid; /* sender's pid */ ++ __kernel_pid_t _pid; /* sender's pid */ + __ARCH_SI_UID_T _uid; /* sender's uid */ + } _kill; + + /* POSIX.1b timers */ + struct { +- timer_t _tid; /* timer id */ ++ __kernel_timer_t _tid; /* timer id */ + int _overrun; /* overrun count */ + char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)]; + sigval_t _sigval; /* same as below */ +@@ -63,26 +63,26 @@ typedef struct siginfo { + + /* POSIX.1b signals */ + struct { +- pid_t _pid; /* sender's pid */ ++ __kernel_pid_t _pid; /* sender's pid */ + __ARCH_SI_UID_T _uid; /* sender's uid */ + sigval_t _sigval; + } _rt; + + /* SIGCHLD */ + struct { +- pid_t _pid; /* which child */ ++ __kernel_pid_t _pid; /* which child */ + __ARCH_SI_UID_T _uid; /* sender's uid */ + int _status; /* exit code */ +- clock_t _utime; +- clock_t _stime; ++ __kernel_clock_t _utime; ++ __kernel_clock_t _stime; + } _sigchld; + + /* IRIX SIGCHLD */ + struct { +- pid_t _pid; /* which child */ +- clock_t _utime; ++ __kernel_pid_t _pid; /* which child */ ++ __kernel_clock_t _utime; + int _status; /* exit code */ +- clock_t _stime; ++ __kernel_clock_t _stime; + } _irix_sigchld; + + /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ diff --git a/queue-3.14/series b/queue-3.14/series index d78fb401836..374d6561f01 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -1 +1,3 @@ mips-math-emu-fix-jalr-emulation-when-rd-0.patch +mips-fix-siginfo.h-to-use-strict-posix-types.patch +mips-ath79-make-bootconsole-wait-for-both-thre-and-temt.patch