From patchwork Thu May 4 21:33:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 98585 Delivered-To: patch@linaro.org Received: by 10.140.89.200 with SMTP id v66csp822892qgd; Thu, 4 May 2017 14:33:31 -0700 (PDT) X-Received: by 10.99.2.84 with SMTP id 81mr46885024pgc.17.1493933611250; Thu, 04 May 2017 14:33:31 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si3145399pgi.120.2017.05.04.14.33.30; Thu, 04 May 2017 14:33:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751580AbdEDVda (ORCPT + 6 others); Thu, 4 May 2017 17:33:30 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:50561 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752275AbdEDVd3 (ORCPT ); Thu, 4 May 2017 17:33:29 -0400 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0MbgsX-1dOsjF4Asf-00J3aK; Thu, 04 May 2017 23:33:13 +0200 From: Arnd Bergmann To: gregkh@linuxfoundation.org Cc: stable@vger.kernel.org, Arnd Bergmann , Lars-Peter Clausen Subject: [PATCH 1/3] [3.18-stable] MIPS: jz4740: fix build error in irq.h Date: Thu, 4 May 2017 23:33:04 +0200 Message-Id: <20170504213306.645281-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170504213306.645281-1-arnd@arndb.de> References: <20170504213306.645281-1-arnd@arndb.de> X-Provags-ID: V03:K0:kaooEIYli47E3qt396AaIv6wJ3eGuep25QOOXzNR/hMVFFZKqY8 +FKuu2dXX35rPq/WQr0dDifRRxL6/JS+tYNtfKRwWM7perMs7rwXQ8B16AH0RY+Q5DjwZ55 upIDiogbw3j3Gc++SfV7NTn/Byu4xtomQ4xSiVQzWzAA6aaz1pjAgStiyaMYadGgTr01hjH gGUxf1WZXOsG+WYdBR7zg== X-UI-Out-Filterresults: notjunk:1; V01:K0:Dhs90VTIdl0=:dKCtrdbPPIINr2yH0kEuhh Jne5GyM3nMz+9TCQTV0+l9KDJ2p84wAwpwj9L+9Sg8rCT+W1G1/p4YGpvhnRyFz5XKFvwvAxi HKeXmVpZvLnv0TGhrqgUAHDk16oPWo4gceNmOr+7U8jkZ4IBZbTIofOsG92XLwMW+KOTHJkFD ft33rr2ygltx8xjvovdgbRL4fcuXVYQD6WDLN+HsBbwWPlJXHfmAHpE8gqnH3ZICfIw9W6dWM gr4QQzEu+kHIUgBo3H1BfLeIB4gOWDrHyl9Ctk7f0G1bfIzyDp/O8lX06fOgslkBtToj16zC2 13C+4qHzBfu17xSjsnSt/QFQk3Vv5ZJje17iCFmIEgWBKH5+ceAW/4JL5pIsmkgIeAbM/qV8z Z3wI41nsAjv8kTaa10tjAZuWCLBxfA4d802dDGIhTJmf8lAPydO0Jx0spXVjmh6OMINFN/Km+ 3lCqKfAaj6mCbfjjTMD2Txd9tfIvJv9NBkUGyID5QPbWLQDv0WCllBULBdKf/1lfYzDIDrHXd tPpXCC1wVnf/G0u+mHHEeWvBKCVjA6W2L5zCz/PrR1WKoHXJ72aNy8XFpcD0k9d1yww5O6wub cHCfGx0u9M70gPY2w9mPJgFKP6zertFAH4m8UP9L+gMrjnLtMdbaumqbk/9jiJjg5KcsK4uV9 8yocCvfBi6fCz1FYoL1+UPXgV7P9zYn+VlmbRorcJyiNQbU7kg678rj8l7SqqBs+kxwY= Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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 --- arch/mips/jz4740/irq.h | 2 ++ 1 file changed, 2 insertions(+) -- 2.9.0 diff --git a/arch/mips/jz4740/irq.h b/arch/mips/jz4740/irq.h index 0f48720b5b63..486db78808cc 100644 --- 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); From patchwork Thu May 4 21:33:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 98583 Delivered-To: patch@linaro.org Received: by 10.140.89.200 with SMTP id v66csp822834qgd; Thu, 4 May 2017 14:33:20 -0700 (PDT) X-Received: by 10.84.211.136 with SMTP id c8mr32612351pli.115.1493933599979; Thu, 04 May 2017 14:33:19 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si3145399pgi.120.2017.05.04.14.33.19; Thu, 04 May 2017 14:33:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752246AbdEDVdS (ORCPT + 6 others); Thu, 4 May 2017 17:33:18 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:50586 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752227AbdEDVdR (ORCPT ); Thu, 4 May 2017 17:33:17 -0400 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0LhvGc-1ds7KN2FV4-00n94Z; Thu, 04 May 2017 23:33:13 +0200 From: Arnd Bergmann To: gregkh@linuxfoundation.org Cc: stable@vger.kernel.org, Ralf Baechle , Arnd Bergmann Subject: [PATCH 2/3] [3.18-stable] MIPS: elf2ecoff: Ignore PT_MIPS_ABIFLAGS program headers. Date: Thu, 4 May 2017 23:33:05 +0200 Message-Id: <20170504213306.645281-3-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170504213306.645281-1-arnd@arndb.de> References: <20170504213306.645281-1-arnd@arndb.de> X-Provags-ID: V03:K0:en6+N1xLpSx2MbZhj35QzZJp3/4p2NtlJJyfPpde/pWuv86BUWE OgCQqDvfUaSt8z/JkwBDMNdnstv/MaZInRbDANledZ/5gkxXYqpC1NNmsC0NrixUd9DoixG WRgj+rvtXxEEUzjBD+2XRO0tza1bXhnxBtg5EiUdFBuNh1YmlGCP6HSrISjx6mn2xtbhT8N LvttGWs4GuFZId3LSgOlg== X-UI-Out-Filterresults: notjunk:1; V01:K0:UK4f8uoRnwI=:lpljmXV3xjisZ2aTBLSV4x tODRWhZIrRVDJe9Aszj7zI/RnF2A11ftSNrQbQUfEDF4Ehs6TCLZBIqEPCNmcuvIsKu6XnWwK dniTQfS0wr09B8bSDwrg9Ar2SvIDObRLfxDAlQygYGcpEqm1FGMXAC9JgCHn/L/m6VtammKqY ZeXLWS5vp74T4MUkuh3E+5/HrC8NG9VBJahtf/K10sU1Nikt76ivWQqTUnSB053YBGv6cwYbL zwQvH9S4OZvoUovHaiV7RljFqLUneZmWFomqPai3a6WS2yBagU2tpwmlH1lffUpp5csd9nNgx 3XAvC2dtoheUAsi+f/XAuAJSh3RMX+haJJbQU8PZxs1dOmt9vtJLaYKfqpqM1Kz5AQM4pM3ZH ZkQf/GutaESgvgTkkBsXZHPgswLJj3F4D8EIvIg+YuiIDl5AP1lzdE6xiOv//aODgvHU3GlAQ WWkTGQsDxX0wsaKDCLCWWLuCP32PH3P4GavTdXNYtq0QMYnwxqZMPR8/LOUP9IdebeBfJaQdi 4JctjUAzj24SB90evs1cegyaC6b3dYk+9Ag7G5HNDnOZwWLhYzik1AMGPCUqpAqrs4dkZz/+b Fzaiy12V0l/f8I0/+95I0sayich+MlFxvpyoQztwYRmXMMfmBUi+3KcIuyWAcAlvo0n2CQxxH q3EcVKA1IEnQaAM6pXCgeVGoM+Z14y9XY3cuFzP9N5oD7R67KKU0g3kU+/pG6tElQdWc= Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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 --- arch/mips/boot/elf2ecoff.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.9.0 diff --git a/arch/mips/boot/elf2ecoff.c b/arch/mips/boot/elf2ecoff.c index 8585078ae50e..51f2ed03a36a 100644 --- 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) { From patchwork Thu May 4 21:33:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 98584 Delivered-To: patch@linaro.org Received: by 10.140.89.200 with SMTP id v66csp822836qgd; Thu, 4 May 2017 14:33:20 -0700 (PDT) X-Received: by 10.84.208.102 with SMTP id f35mr60904380plh.19.1493933600254; Thu, 04 May 2017 14:33:20 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si3145399pgi.120.2017.05.04.14.33.20; Thu, 04 May 2017 14:33:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752258AbdEDVdT (ORCPT + 6 others); Thu, 4 May 2017 17:33:19 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:55338 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752230AbdEDVdR (ORCPT ); Thu, 4 May 2017 17:33:17 -0400 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0MLyNI-1d9f5Z3RJk-007iuH; Thu, 04 May 2017 23:33:13 +0200 From: Arnd Bergmann To: gregkh@linuxfoundation.org Cc: stable@vger.kernel.org, Ralf Baechle , Arnd Bergmann Subject: [PATCH 3/3] [3.18-stable] MIPS: elf2ecoff: Fix warning due to dead code. Date: Thu, 4 May 2017 23:33:06 +0200 Message-Id: <20170504213306.645281-4-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170504213306.645281-1-arnd@arndb.de> References: <20170504213306.645281-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K0:gaRU6SUFH5MGdmiemtchj9bW66FP8czaaWVMhj+ccBannplgdRj iDLmdrKK8aE5spHqA12JZPxtLE2zsUDEDALs/qc96/RZLMoUPLGXs5kmidqJUpI/4zgxANn 7BhE4FLt7qOoudm4oGRUEV9YK+ErAY9ZwhzLOaGLihqzPUCVKhSyc4tY521SXs1P2H722aA gF/TCVo3z6n9l2tUGEzow== X-UI-Out-Filterresults: notjunk:1; V01:K0:4DCG5bQKr8s=:gtJvJYzD+jNc7aOAYUxyxk paqMg+WZF6NPueaMFkOOPGYEE21tSAoghb9o4lxMp23UE2OB9t2wKZdwuOOsbllOuHSneq1ZW WuU6yee+XXK8RcEoj8jtFiPFYpvQeMftTLElTXDsFnQh9Luc1W06EM92rIRfNEQSgWTagaFP0 lUkPT9zkVzSjUmTClf8A/KBN1iOYxdP+obifrdxdaYxz2QdoPnGrPPVOyR0cs7bRBZMoXycdn l3IiJalay2gYX8MZn2Xhtny8FC5Z3mCNIM9MvVE28j+6KYmANXM1dw532NBAHJVcvJ2c0MA3D ypTD15zQZ9U6O0LTPYTmc3BWO6MB1MQdgOiWVuPvyEYhGcs74pOxBnN7JPTMzDCgjVVUjnoTY s1ZsV8hpCEhNw1NEGLG8oTMe7A67QOel1H1ZdSMkkncHvYEcTCaSlI3fprA/uXDFLJdLjNzhX /dQg+i+xDUhFQL+PK5BK5OrLbXXAbx/QljgPcPScP8vhylXWbSd1WA0ynjTCCeEmKvUc6qM5N 92AWCQXwO2IODb3SQmeWYGaZJ6su31q6umlt6ixIlabCsWtHRLy+ssAGNDnrLIX6qwj3SGiO0 HswJGj1/09DFDuML5RjVNw4MI8fuwr1TRd3Mb1gSLW0RtiV7UWO4uz2lA3lHDGB4U6zWdADB3 JPJV/NDDUQZjtF4etKDMGvTGUMmTVWe0zocChDkK1e5OzhmqNwiKhiNpXr3bdc8kmlGJ72E+I P96KzyDTCdt/AQ5g Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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 --- arch/mips/boot/elf2ecoff.c | 4 ---- 1 file changed, 4 deletions(-) -- 2.9.0 diff --git a/arch/mips/boot/elf2ecoff.c b/arch/mips/boot/elf2ecoff.c index 51f2ed03a36a..6950fee4576c 100644 --- 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