From patchwork Fri Dec 16 09:14:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101408 Delivered-To: patch@linaro.org Received: by 10.182.112.6 with SMTP id im6csp146140obb; Fri, 16 Dec 2016 01:16:35 -0800 (PST) X-Received: by 10.99.51.76 with SMTP id z73mr2321464pgz.173.1481879795696; Fri, 16 Dec 2016 01:16:35 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id 30si6842535pgx.304.2016.12.16.01.16.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Dec 2016 01:16:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cHobw-0002Fw-0w; Fri, 16 Dec 2016 09:15:28 +0000 Received: from mout.kundenserver.de ([212.227.126.131]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cHobr-0001FJ-P7 for linux-arm-kernel@lists.infradead.org; Fri, 16 Dec 2016 09:15:24 +0000 Received: from wuerfel.lan ([78.43.21.235]) by mrelayeu.kundenserver.de (mreue003 [212.227.15.129]) with ESMTPA (Nemesis) id 0MYrLj-1c3oOd00d1-00VjVU; Fri, 16 Dec 2016 10:15:00 +0100 From: Arnd Bergmann To: Russell King Subject: [PATCH] ARM: disallow ARM_THUMB for ARMv4 builds Date: Fri, 16 Dec 2016 10:14:39 +0100 Message-Id: <20161216091457.2452987-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:AdFcutvidF/T3LYZ1yha93/r+03vq7NQxrkkmkVXXZMAF+NjpoD vT4mGyCMhKuZrJdU/I/ZDelh+Pev5addhF70vjtzo0lDFTgvWqAt4avFkELg94Qp3xdB6oh QdtMNx34RdhfabY6rQxG/03MMr1i4yZUR3AcIR6FpWdFEKg+yaEwRDGrHQILfPI2auEl9kj 7iLdTkf2y56xGuWEXykXg== X-UI-Out-Filterresults: notjunk:1; V01:K0:K0UnTOAm/lM=:r7kr2sMpSDi9FBY2/rdOZe +fuSaQqWLfS/b9Ik11WyAR4Xh8c9jwr2za2Tp/phnaPIhrV4jaqSUvbe1Yv80FbeZt3xYRFEQ NNgjlZOj4v0vIt91+KbXfMENrHHqxEs46S1lgWb077vUG8Qeraew3CAs/w8IWWEIjZu4r/NFo pQp3+Vz2ji3r6IzN8NRxRpmz4ldPw5rcwAw3KT2G5y/TjcyLlKdfm0yIN3CcePmCkouXKN0Ov SBBQug1WfMUIgnyyXLKgaUb1B/D62hjXJaxsyMiaqfZMOKfHfnw6tYvSbQihRkQApmayCKYlo iOEx2xfw6oYZSyEkshluzU7R5rExn0aJyb6SKoIUdGR51AIERQkvMwL+qijCmF+agWurk7zZM Lr9r40AKERnl2LRWDz+f60Q6iuCTpp1e9WDBSMz8QDZwGAszMSkcOZNeO1fmAg4jdbFXm+tKi eD98m4JpJKuAa0BPvYOaDwZX2pqZvZv7pi4Zic1SAx5jzdC93yV6fvDYolfD91FboNCJcqyIr NWVXuXKERMS0sSmh4XwbjkunRQp6bEkjOIF2lk5Js8axop7b01ERhht8Fq5wxS8zh1FbBxumm ZR4J9JFPvC6IwAUVt9cShw6Z2Qm2pEhcJ2IRpL+4HnvCwbFRhTfh0i14msE1mIUOIKsACBHfc TMD8c1HVAgGSpvAIIphaoK4Kg72RkvrQKf2LlFU8in4lYPnc/idlLUVhuRZJy+bTU0xI= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161216_011524_246136_CD18BFE7 X-CRM114-Status: GOOD ( 14.89 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.131 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.126.131 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicolas Pitre , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Jonas Jensen MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org With old compilers (gcc-4.3 and earlier), we run into a build error when CONFIG_ARM_THUMB is enabled in kernels that have both ARMv4 and ARMv4T/ARMv5 CPU support: arch/arm/kernel/entry-armv.S: Assembler messages: arch/arm/kernel/entry-armv.S:938: Error: selected processor does not support `bx lr' in ARM mode arch/arm/kernel/entry-armv.S:961: Error: selected processor does not support `bx lr' in ARM mode arch/arm/kernel/entry-armv.S:1004: Error: selected processor does not support `bx lr' in ARM mode The problem evidently is that 'bx' cannot work on the old CPUs, but the new ones have to use it whenever returning to THUMB user space. This was discussed a while ago without a conclusion about what the proper patch should be to solve it, and came again up now when I experimented with old toolchain versions. This sidesteps the problem by declaring that we do not support the configuration and instead have to disable CONFIG_ARM_THUMB and not use THUMB user space with a kernel that supports the FA526 CPU, which is the only one that is allowed in a multiplatform configuration together with ARMv4T/ARMv5 anyway. This is not a regression because the configuration never worked anyway. The only platform affected by this is moxart, as no other ARMv4 platforms are part of ARCH_MULTIPLATFORM. Cc: Jonas Jensen Link: http://lkml.iu.edu/hypermail/linux/kernel/1404.1/00908.html Signed-off-by: Arnd Bergmann --- arch/arm/mm/Kconfig | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) -- 2.9.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 5d4920c069f2..f7b7aa37964f 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig @@ -655,11 +655,7 @@ config ARCH_DMA_ADDR_T_64BIT config ARM_THUMB bool "Support Thumb user binaries" if !CPU_THUMBONLY - depends on CPU_ARM720T || CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || \ - CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || \ - CPU_ARM1020 || CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || \ - CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_V6 || CPU_V6K || \ - CPU_V7 || CPU_FEROCEON || CPU_V7M + depends on !(CPU_32v3 || CPU_32v4) default y help Say Y if you want to include kernel support for running user space