From patchwork Tue Feb 20 21:59:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128973 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp5104303ljc; Tue, 20 Feb 2018 14:00:29 -0800 (PST) X-Google-Smtp-Source: AH8x224erU6qpUfe2QHXkpDFLCx6LyfHMYvcUa5mQkl6UlTCc30q8lxg3NOF7/4lZqz0Iaw1M3wn X-Received: by 2002:a17:902:ad0a:: with SMTP id i10-v6mr976256plr.130.1519164029388; Tue, 20 Feb 2018 14:00:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519164029; cv=none; d=google.com; s=arc-20160816; b=NTlY9Y8f7axHvGajNJ+Xj25Dl1WI3InQJJJw25s6a+6tmlQhWRU8SBHmDyCrTSzojm PZ8UYlI2n0TnLcZCFJJQ/NvGEVQEqAvYzHKsTM0VwzIaOKkcGYs1FkJJdjd2yEs7x939 MBY1Nxu4M+G0jJiuW30+jv0He+ytO0DIJak4q047c3IldoCUdctXEkdOAK3VKlY5EW2c 9x9FZjrWcLi6TePFrIEU3vDKZVeGO7qk6nZgXlgdZEN2C8hcRqOCSCwrnKK6nQtD6iR/ 1OkaqrmwS99FED+4JKq0x6lRMqlFiOB+l8RZAj5kYEUQF5pE5YDF9NbVJ+vhbr9uZDAS srgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=Cw/AAiNwubFW9VdU/0r3xr8yyoxRg+83PJw8yf+RoTk=; b=i65qCDiAuJbjSSQexVXs94Cq9P5pLObatabClL+Juf+XmLAE+xTZcPsKcHR/5j1KyB VIAObcYuBPGXdvlWdHCFM36IKL7ATWin8YwPViKO1nQ1JahQoGEE1mUshbke83friauj Q2HivZmnVb3j4iBY04R/g4onxt/INc1kw3S42ha2wwJ9mNSdNIKr7/QlVjLWR7IL3Gpt spGGSp64+FIS2OJe3C4zy0l/jGaL3qUFLyS+mdVjbkoYu4qhHUWWVOWvwX0sORyd5GYl cd403HRSq0/7On92QDltRmc7dyxpuWuSz3FtmhErkvwAI/GyuQMiWc5uPDES79tT3a6M 7CRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d13si184901pgn.366.2018.02.20.14.00.28; Tue, 20 Feb 2018 14:00:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751221AbeBTWAT (ORCPT + 28 others); Tue, 20 Feb 2018 17:00:19 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:50007 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750735AbeBTWAS (ORCPT ); Tue, 20 Feb 2018 17:00:18 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0MHG5L-1f2IRx1ZmF-00E2MQ; Tue, 20 Feb 2018 22:59:58 +0100 From: Arnd Bergmann To: Nicolas Pitre Cc: Andi Kleen , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 2/7] ARM: LTO: avoid THUMB2_KERNEL+LTO Date: Tue, 20 Feb 2018 22:59:49 +0100 Message-Id: <20180220215954.4092811-3-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220215954.4092811-1-arnd@arndb.de> References: <20180220215954.4092811-1-arnd@arndb.de> X-Provags-ID: V03:K0:u3KJWzqET9ns5Lg+m/MiDFxCNf+0k3MQUUUfTn6++ORQZePXN1j mi6mz90RJHWy+PVhAkmNYeriJ35b4438nHM6SFXwhRhgsyXBB96WYGpwm3QP2TEatBilBtx IAk8ErVh57EmlAbnHvtWBTTKfMwUJ6jXq0i/gjvgIhsnhQy1UZ2TMUr7fytlRBnhbH60/zW p8KUauJSv6ARo5IvkBcuw== X-UI-Out-Filterresults: notjunk:1; V01:K0:lq2vHQPEv3M=:5SSk4VkGusr2hEy+y4tCo3 eTpGu9WiFscv9HdHREs8x0QHu5x0jy/xu3meN1t+p4LeX000RpuTf23cyvUIp9ibKnqYK8B2q jSdGvNhJpmFjIzraWeeev6C8Y6YfWP4Jv+gA7DM6FxfV/RRjG9E1Ohs3WCqwPTuAyOUZxjg+t HzudzChvronAoGTK9P8cBSygtoZNqZUb4MTPQiCPOk9hXH1m4n8tNYX8Bx+Ts7hOeF0whtDPw 4btdT87XipB+CIL/zLclhSTzN0vImmD8wnzQCtNRr7ijuitfbnykLWd5HroZQC3H0Bg8htsQL H+vsfKpZYAc/FCj2+ICIHNk9LKfjM/gdxylM3ex4QR28AKVQiXqXnvz4w7a8yXdtBJl/Q/U1q XeIUeYM3ygLyS8pzt3ELvplVHCLdRxtap9s89yHJdoGNwddES+RlcVFZFtSirOINeSq67+L3n TJdbvy+iJ26nVcF6IpcRXrDWeE6FwwO1JmOUVBBvtEIS2EA5h2eqyVzv1a90DSTpeKb9r5X26 C39dbtdxmoIxX24WTuZpWVyhXruDUeOZ8FUtn2HiHOnHUFGiQ+kAHdR8XQUoUXR5zcEHXc7rf llH0nCtFeOvORdyHS5+TKSwR6J4kkwrJ5vgRd4znffaF12JtHl6Jt1zhC8g9kIWWIVT8cuvZL scppz2aNVch0hVvKBqzPn9T3wtVM9SAVy1o/+Y4OhWwRnd9Ik+tyPmt25ZEYZBMu9PRxVT7zd wS0eSnUaP6KWOdsq8K+dGUUy4s9VIN1mxoFWpQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Trying to build an LTO-Enabled kernel with Thumb2 instructions failed horribly for me, with an endless output of things like ccVnNycO.s:2665: Error: thumb conditional instruction should be in IT block -- `bxne lr' ccVnNycO.s:7128: Error: thumb conditional instruction should be in IT block -- `strexeq r5,r2,[r3]' ccVnNycO.s:7258: Error: thumb conditional instruction should be in IT block -- `strexeq lr,r0,[r3]' ccVnNycO.s:17380: Error: thumb conditional instruction should be in IT block -- `strexeq r1,r2,[r6]' ccVnNycO.s:19163: Error: thumb conditional instruction should be in IT block -- `strexeq r8,r6,[r3]' ccVnNycO.s:22722: Error: thumb conditional instruction should be in IT block -- `strexeq r7,r1,[r0]' ccVnNycO.s:24105: conditional infixes are deprecated in unified syntax ccVnNycO.s:24105: Error: thumb conditional instruction should be in IT block -- `sbcccs r1,r1,r3' ccVnNycO.s:24105: Error: thumb conditional instruction should be in IT block -- `movcc r3,#0' ccVnNycO.s:24210: conditional infixes are deprecated in unified syntax ccVnNycO.s:24210: Error: thumb conditional instruction should be in IT block -- `sbcccs r2,r2,r3' ccVnNycO.s:24210: Error: thumb conditional instruction should be in IT block -- `movcc r3,#0' I did not investigate this too much, disabling Thumb2 support when LTO is set lets me build randconfig kernels. Since ARM_SINGLE_ARMV7M is Thumb2-only, I have to disallow LTO for V7-M targets. Signed-off-by: Arnd Bergmann --- arch/arm/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.9.0 diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 8ed0f664f86f..fbf2c3ab9a97 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -18,7 +18,7 @@ config ARM select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT if CPU_V7 select ARCH_SUPPORTS_ATOMIC_RMW - select ARCH_SUPPORTS_LTO + select ARCH_SUPPORTS_LTO if !ARM_SINGLE_ARMV7M select ARCH_USE_BUILTIN_BSWAP select ARCH_USE_CMPXCHG_LOCKREF select ARCH_WANT_IPC_PARSE_VERSION @@ -1533,6 +1533,7 @@ config SCHED_HRTICK config THUMB2_KERNEL bool "Compile the kernel in Thumb-2 mode" if !CPU_THUMBONLY depends on (CPU_V7 || CPU_V7M) && !CPU_V6 && !CPU_V6K + depends on !LTO default y if CPU_THUMBONLY select ARM_UNWIND help