From: Greg Kroah-Hartman Date: Thu, 4 May 2017 22:58:51 +0000 (-0700) Subject: 3.18-stable patches X-Git-Tag: v3.18.52~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=54b1ad501ee2ef878d30a136301e2023160ac6c9;p=thirdparty%2Fkernel%2Fstable-queue.git 3.18-stable patches added patches: mips-elf2ecoff-fix-warning-due-to-dead-code.patch mips-elf2ecoff-ignore-pt_mips_abiflags-program-headers.patch mips-jz4740-fix-build-error-in-irq.h.patch staging-unisys-fix-build-warning-in-periodic_work.patch --- diff --git a/queue-3.18/mips-elf2ecoff-fix-warning-due-to-dead-code.patch b/queue-3.18/mips-elf2ecoff-fix-warning-due-to-dead-code.patch new file mode 100644 index 00000000000..b528239d812 --- /dev/null +++ b/queue-3.18/mips-elf2ecoff-fix-warning-due-to-dead-code.patch @@ -0,0 +1,45 @@ +From 2d76e9633b572ae5a64150b638eed77f4afc12db Mon Sep 17 00:00:00 2001 +From: Ralf Baechle +Date: Wed, 4 Feb 2015 13:04:03 +0100 +Subject: MIPS: elf2ecoff: Fix warning due to dead code. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Ralf Baechle + +commit 2d76e9633b572ae5a64150b638eed77f4afc12db upstream. + + HOSTCC arch/mips/boot/elf2ecoff +arch/mips/boot/elf2ecoff.c: In function ‘main’: +arch/mips/boot/elf2ecoff.c:271:8: warning: variable ‘shstrtab’ set but not used [-Wunused-but-set-variable] + char *shstrtab; + +Signed-off-by: Ralf Baechle +Signed-off-by: Arnd Bergmann +Signed-off-by: Greg Kroah-Hartman + +--- + arch/mips/boot/elf2ecoff.c | 4 ---- + 1 file changed, 4 deletions(-) + +--- a/arch/mips/boot/elf2ecoff.c ++++ b/arch/mips/boot/elf2ecoff.c +@@ -268,7 +268,6 @@ int main(int argc, char *argv[]) + Elf32_Ehdr ex; + Elf32_Phdr *ph; + Elf32_Shdr *sh; +- char *shstrtab; + int i, pad; + struct sect text, data, bss; + struct filehdr efh; +@@ -336,9 +335,6 @@ int main(int argc, char *argv[]) + "sh"); + if (must_convert_endian) + convert_elf_shdrs(sh, ex.e_shnum); +- /* Read in the section string table. */ +- shstrtab = saveRead(infile, sh[ex.e_shstrndx].sh_offset, +- sh[ex.e_shstrndx].sh_size, "shstrtab"); + + /* Figure out if we can cram the program header into an ECOFF + header... Basically, we can't handle anything but loadable diff --git a/queue-3.18/mips-elf2ecoff-ignore-pt_mips_abiflags-program-headers.patch b/queue-3.18/mips-elf2ecoff-ignore-pt_mips_abiflags-program-headers.patch new file mode 100644 index 00000000000..a925b016ea5 --- /dev/null +++ b/queue-3.18/mips-elf2ecoff-ignore-pt_mips_abiflags-program-headers.patch @@ -0,0 +1,41 @@ +From 26f7c4bd05cf34e63a4a794150ab66a40a5a84a9 Mon Sep 17 00:00:00 2001 +From: Ralf Baechle +Date: Wed, 4 Feb 2015 12:59:43 +0100 +Subject: MIPS: elf2ecoff: Ignore PT_MIPS_ABIFLAGS program headers. + +From: Ralf Baechle + +commit 26f7c4bd05cf34e63a4a794150ab66a40a5a84a9 upstream. + +These are generated by very recent toolchains and result in an error +message when attenpting to convert a kernel from ELF to ECOFF. + +Signed-off-by: Ralf Baechle +Signed-off-by: Arnd Bergmann +Signed-off-by: Greg Kroah-Hartman +--- + arch/mips/boot/elf2ecoff.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/arch/mips/boot/elf2ecoff.c ++++ b/arch/mips/boot/elf2ecoff.c +@@ -49,7 +49,8 @@ + /* + * Some extra ELF definitions + */ +-#define PT_MIPS_REGINFO 0x70000000 /* Register usage information */ ++#define PT_MIPS_REGINFO 0x70000000 /* Register usage information */ ++#define PT_MIPS_ABIFLAGS 0x70000003 /* Records ABI related flags */ + + /* -------------------------------------------------------------------- */ + +@@ -351,7 +352,8 @@ int main(int argc, char *argv[]) + /* Section types we can ignore... */ + if (ph[i].p_type == PT_NULL || ph[i].p_type == PT_NOTE || + ph[i].p_type == PT_PHDR +- || ph[i].p_type == PT_MIPS_REGINFO) ++ || ph[i].p_type == PT_MIPS_REGINFO ++ || ph[i].p_type == PT_MIPS_ABIFLAGS) + continue; + /* Section types we can't handle... */ + else if (ph[i].p_type != PT_LOAD) { diff --git a/queue-3.18/mips-jz4740-fix-build-error-in-irq.h.patch b/queue-3.18/mips-jz4740-fix-build-error-in-irq.h.patch new file mode 100644 index 00000000000..2902a42934e --- /dev/null +++ b/queue-3.18/mips-jz4740-fix-build-error-in-irq.h.patch @@ -0,0 +1,57 @@ +From arnd@arndb.de Thu May 4 15:37:28 2017 +From: Arnd Bergmann +Date: Thu, 4 May 2017 23:33:04 +0200 +Subject: MIPS: jz4740: fix build error in irq.h +To: gregkh@linuxfoundation.org +Cc: stable@vger.kernel.org, Arnd Bergmann , Lars-Peter Clausen +Message-ID: <20170504213306.645281-2-arnd@arndb.de> + +From: Arnd Bergmann + +kernelci found build error on the 3.18 stable tree that don't +show up in later versions: + +arch/mips/jz4740/irq.h:21:38: error: 'struct irq_data' declared inside parameter list will not be visible outside of this definition or declaration [-Werror] +arch/mips/jz4740/irq.h:20:39: error: 'struct irq_data' declared inside parameter list will not be visible outside of this definition or declaration [-Werror] +include/linux/irqdesc.h:92:33: error: 'NR_IRQS' undeclared here (not in a function) +arch/mips/jz4740/irq.c:91:41: error: 'JZ4740_IRQ_BASE' undeclared (first use in this function) +arch/mips/jz4740/irq.c:68:6: error: conflicting types for 'jz4740_irq_resume' +arch/mips/jz4740/irq.c:62:6: error: conflicting types for 'jz4740_irq_suspend' +arch/mips/jz4740/irq.c:49:39: error: 'JZ4740_IRQ_BASE' undeclared (first use in this function) +arch/mips/jz4740/gpio.c:47:32: error: initializer element is not constant +arch/mips/jz4740/gpio.c:46:32: error: initializer element is not constant +arch/mips/jz4740/gpio.c:45:32: error: initializer element is not constant +arch/mips/jz4740/gpio.c:44:32: error: initializer element is not constant +arch/mips/jz4740/gpio.c:447:22: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types] +arch/mips/jz4740/gpio.c:446:23: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types] +arch/mips/jz4740/gpio.c:427:14: error: implicit declaration of function 'JZ4740_IRQ_INTC_GPIO' [-Werror=implicit-function-declaration] +arch/mips/jz4740/gpio.c:269:9: error: implicit declaration of function 'JZ4740_IRQ_GPIO' [-Werror=implicit-function-declaration] + +The problem seems to be caused by commit 83bc76920080 ("MIPS: JZ4740: Use +generic irq chip") from linux-3.2, but only showed up in a defconfig +build when qi_lb60_defconfig was added in linux-3.13 and that configuration +never successfully built. + +The code has changed in a number of ways before 4.4, which builds fine. +While I did not bisect the problem to a specific change, I found a simple +fix by including the obviously missing header. + +Cc: Lars-Peter Clausen +Signed-off-by: Arnd Bergmann +Signed-off-by: Greg Kroah-Hartman +--- + arch/mips/jz4740/irq.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/mips/jz4740/irq.h ++++ b/arch/mips/jz4740/irq.h +@@ -16,7 +16,9 @@ + #define __MIPS_JZ4740_IRQ_H__ + + #include ++#include + ++struct irq_data; + extern void jz4740_irq_suspend(struct irq_data *data); + extern void jz4740_irq_resume(struct irq_data *data); + diff --git a/queue-3.18/series b/queue-3.18/series index 1820a8ce56c..87b89f1e160 100644 --- a/queue-3.18/series +++ b/queue-3.18/series @@ -54,3 +54,7 @@ ips-remove-pointless-warning.patch misdn-avoid-arch-specific-__builtin_return_address-call.patch arm64-build-vdso-without-libgcov.patch mm-cma-silence-warnings-due-to-max-usage.patch +mips-jz4740-fix-build-error-in-irq.h.patch +mips-elf2ecoff-ignore-pt_mips_abiflags-program-headers.patch +mips-elf2ecoff-fix-warning-due-to-dead-code.patch +staging-unisys-fix-build-warning-in-periodic_work.patch diff --git a/queue-3.18/staging-unisys-fix-build-warning-in-periodic_work.patch b/queue-3.18/staging-unisys-fix-build-warning-in-periodic_work.patch new file mode 100644 index 00000000000..579608c34c7 --- /dev/null +++ b/queue-3.18/staging-unisys-fix-build-warning-in-periodic_work.patch @@ -0,0 +1,39 @@ +From foo@baz Thu May 4 15:57:02 PDT 2017 +Date: Thu, 04 May 2017 15:57:02 -0700 +To: Greg KH +From: Greg Kroah-Hartman +Subject: staging: unisys: fix build warning in periodic_work + +This code is long gone in mainline, so the build warning about trying to compare a bool to a value less than 0 isn't there. But fix it in 3.18 to get the build warning list down to a small number. + +Cc: Arnd Bergmann +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/unisys/visorutil/periodic_work.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/drivers/staging/unisys/visorutil/periodic_work.c ++++ b/drivers/staging/unisys/visorutil/periodic_work.c +@@ -98,8 +98,8 @@ BOOL visor_periodic_work_nextperiod(stru + pw->want_to_stop = FALSE; + rc = TRUE; /* yes, TRUE; see visor_periodic_work_stop() */ + goto unlock; +- } else if (queue_delayed_work(pw->workqueue, &pw->work, +- pw->jiffy_interval) < 0) { ++ } else if (!queue_delayed_work(pw->workqueue, &pw->work, ++ pw->jiffy_interval)) { + ERRDEV(pw->devnam, "queue_delayed_work failed!"); + pw->is_scheduled = FALSE; + rc = FALSE; +@@ -134,8 +134,8 @@ BOOL visor_periodic_work_start(struct pe + goto unlock; + } + INIT_DELAYED_WORK(&pw->work, &periodic_work_func); +- if (queue_delayed_work(pw->workqueue, &pw->work, +- pw->jiffy_interval) < 0) { ++ if (!queue_delayed_work(pw->workqueue, &pw->work, ++ pw->jiffy_interval)) { + ERRDEV(pw->devnam, "%s queue_delayed_work failed!", __func__); + rc = FALSE; + goto unlock;