From patchwork Wed Feb 10 14:11:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 12080935 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 809D5C433DB for ; Wed, 10 Feb 2021 14:13:45 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2DCCB64D9E for ; Wed, 10 Feb 2021 14:13:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2DCCB64D9E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1h/LHvYbRaWR6Zf8PUU8yw/lFTQWqvWYGMewl3BZoXM=; b=yCaDB2CGuzR+6sdOzWNH5Q32D 6nNcbPgWwF817oS6PdpRy/oyBgaFoIW2Z1yiFu+PIBIhME40MH4A+iiFiudSrmfEQeGIo5w+uuiF3 zaA6gfGVuaUmtYy4D8VfiDYyG4LR254aQsq2xbs8XGfqa3eNQCuPVUIJQiXR2ox4ou1wlk3+5ZjTU vsKbRkgZDIRHBP7HL2YsecVpIdWNzLZ4ychvMr+0ApQAm3/GfItdfbPWbBIWNLTWS+Dd+vdew0ntS z5v8mKqXWE5c1LPbyuem72/psWj49n6QsL8ks6hLjeN0flD9mAXCviwuukqa5e83wTh4DlCRFn5Gt aXA8wrtEA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9qDv-0007KB-NS; Wed, 10 Feb 2021 14:12:09 +0000 Received: from xavier.telenet-ops.be ([2a02:1800:120:4::f00:14]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9qDZ-0007Bq-5i for linux-arm-kernel@lists.infradead.org; Wed, 10 Feb 2021 14:11:46 +0000 Received: from ramsan.of.borg ([84.195.186.194]) by xavier.telenet-ops.be with bizsmtp id TSBj2400Y4C55Sk01SBjrX; Wed, 10 Feb 2021 15:11:43 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1l9qDX-005Hsx-5S; Wed, 10 Feb 2021 15:11:43 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1l9qDW-006Jqe-Qh; Wed, 10 Feb 2021 15:11:42 +0100 From: Geert Uytterhoeven To: Russell King , Michal Simek , Arnd Bergmann Subject: [PATCH 1/4] ARM: div64: Remove always-true __div64_const32_is_OK() duplicate Date: Wed, 10 Feb 2021 15:11:37 +0100 Message-Id: <20210210141140.1506212-2-geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210210141140.1506212-1-geert+renesas@glider.be> References: <20210210141140.1506212-1-geert+renesas@glider.be> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210210_091145_427333_C3C8ED29 X-CRM114-Status: GOOD ( 11.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Geert Uytterhoeven , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since commit cafa0010cd51fb71 ("Raise the minimum required gcc version to 4.6"), the kernel can no longer be compiled using gcc-3. Hence __div64_const32_is_OK() is always true. Moreover, __div64_const32_is_OK() is defined in the same way in include/asm-generic/div64.h, so the ARM-specific definition can be removed regardless. Signed-off-by: Geert Uytterhoeven --- arch/arm/include/asm/div64.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/arch/arm/include/asm/div64.h b/arch/arm/include/asm/div64.h index 595e538f5bfb5055..4b69cf850451b076 100644 --- a/arch/arm/include/asm/div64.h +++ b/arch/arm/include/asm/div64.h @@ -52,17 +52,6 @@ static inline uint32_t __div64_32(uint64_t *n, uint32_t base) #else -/* - * gcc versions earlier than 4.0 are simply too problematic for the - * __div64_const32() code in asm-generic/div64.h. First there is - * gcc PR 15089 that tend to trig on more complex constructs, spurious - * .global __udivsi3 are inserted even if none of those symbols are - * referenced in the generated code, and those gcc versions are not able - * to do constant propagation on long long values anyway. - */ - -#define __div64_const32_is_OK (__GNUC__ >= 4) - static inline uint64_t __arch_xprod_64(uint64_t m, uint64_t n, bool bias) { unsigned long long res; From patchwork Wed Feb 10 14:11:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 12080937 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 850FAC433E6 for ; Wed, 10 Feb 2021 14:13:45 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3C1EC64E7D for ; Wed, 10 Feb 2021 14:13:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C1EC64E7D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KEYNvYhdoeFDPlVTFc/geFpP3NWZ9rwRdb71ocdWtg0=; b=CJVMontFMwNpLbU8A9yMT3xb0 CuHtzF2pMO9E1yMyqE6IuW23b4hcTPgCMKC10xRwNJo4yZxVlcYo+Rf681Hk2gkVsy7xvPwZ4Q4Hz 5d8JWzn9Z1w3INu9f1WSCFJLPtrFwu5wzX3WWBDpHcIsNasT4ZsyehP6haHJkKYKpP4oOLAK05FK/ /kMHqRjFfvKOM7piubnFTKIBeFglDZpVnk9JGHGo6zfPXgEO6lOSmEYtAeHSnSEQzB22YT/QNsKT5 PNqkfDnamYD1uKDeUdl5t+nX0lP8STfXuZ9h70d34z2+9oNXpVzvT8jDtVtWfgIbU8AkSYYmVrqFM hAakjIxKQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9qE1-0007So-UP; Wed, 10 Feb 2021 14:12:13 +0000 Received: from baptiste.telenet-ops.be ([2a02:1800:120:4::f00:13]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9qDb-0007Ce-OE for linux-arm-kernel@lists.infradead.org; Wed, 10 Feb 2021 14:11:49 +0000 Received: from ramsan.of.borg ([84.195.186.194]) by baptiste.telenet-ops.be with bizsmtp id TSBk240074C55Sk01SBkC7; Wed, 10 Feb 2021 15:11:44 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1l9qDX-005Hsy-Lj; Wed, 10 Feb 2021 15:11:43 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1l9qDW-006Jqh-RT; Wed, 10 Feb 2021 15:11:42 +0100 From: Geert Uytterhoeven To: Russell King , Michal Simek , Arnd Bergmann Subject: [PATCH 2/4] ARM: unified: Remove check for gcc < 4 Date: Wed, 10 Feb 2021 15:11:38 +0100 Message-Id: <20210210141140.1506212-3-geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210210141140.1506212-1-geert+renesas@glider.be> References: <20210210141140.1506212-1-geert+renesas@glider.be> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210210_091147_984799_8CCCC510 X-CRM114-Status: UNSURE ( 9.83 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Geert Uytterhoeven , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since commit cafa0010cd51fb71 ("Raise the minimum required gcc version to 4.6"), the kernel can no longer be compiled using gcc-3. Hence this condition is never true, and the check can thus be removed. Signed-off-by: Geert Uytterhoeven --- arch/arm/include/asm/unified.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/arm/include/asm/unified.h b/arch/arm/include/asm/unified.h index 1e2c3eb043535f7b..ce9689118dbb945b 100644 --- a/arch/arm/include/asm/unified.h +++ b/arch/arm/include/asm/unified.h @@ -24,10 +24,6 @@ __asm__(".syntax unified"); #ifdef CONFIG_THUMB2_KERNEL -#if __GNUC__ < 4 -#error Thumb-2 kernel requires gcc >= 4 -#endif - /* The CPSR bit describing the instruction set (Thumb) */ #define PSR_ISETSTATE PSR_T_BIT From patchwork Wed Feb 10 14:11:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 12080941 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A958C433DB for ; Wed, 10 Feb 2021 14:14:24 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 206A164E65 for ; Wed, 10 Feb 2021 14:14:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 206A164E65 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=iO6KP9D30iBLbZ2iU4xyXqchDBTfEMVbh55M1Hsb/cU=; b=uSlYQJ7aEM+gTRob6y3m+Wt6L tqBY/AWMsys/X0HjdKT4cuzqhbyhf1WPWZeEkDdMo5qn4quYw/DTrpELtB1cjzEVm+bpGk1jkvPG+ p5DVpJ10PbEIqjXhuebYgFNWoIKIvB5BCnY3s8irF0uP3hzgJFDTFW73kJRCM7VKM9m8SgIlL7aAH UGMMuaHJ003j8XzW96g156gr1md1IzuKa849f2l0KuilTUZsaZLcB3AfTdqDYlQ785kZCex6mv0tF wouof4iNUMk28taeQ9xKWRcRrEp1CsPSw8AXfFFJm5n7iR9rKFstkyccCTpg+v9hB4ka5zAhC1mK4 8OE5RYJJw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9qEN-0007dq-H5; Wed, 10 Feb 2021 14:12:35 +0000 Received: from andre.telenet-ops.be ([2a02:1800:120:4::f00:15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9qDd-0007Ea-Lw for linux-arm-kernel@lists.infradead.org; Wed, 10 Feb 2021 14:11:51 +0000 Received: from ramsan.of.borg ([84.195.186.194]) by andre.telenet-ops.be with bizsmtp id TSBj2401F4C55Sk01SBjmq; Wed, 10 Feb 2021 15:11:44 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1l9qDX-005Hsz-DM; Wed, 10 Feb 2021 15:11:43 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1l9qDW-006Jqm-SB; Wed, 10 Feb 2021 15:11:42 +0100 From: Geert Uytterhoeven To: Russell King , Michal Simek , Arnd Bergmann Subject: [PATCH 3/4] asm-generic: div64: Remove always-true __div64_const32_is_OK() Date: Wed, 10 Feb 2021 15:11:39 +0100 Message-Id: <20210210141140.1506212-4-geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210210141140.1506212-1-geert+renesas@glider.be> References: <20210210141140.1506212-1-geert+renesas@glider.be> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210210_091149_928500_635C55CE X-CRM114-Status: GOOD ( 12.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Geert Uytterhoeven , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since commit cafa0010cd51fb71 ("Raise the minimum required gcc version to 4.6"), the kernel can no longer be compiled using gcc-3. Hence __div64_const32_is_OK() is always true, and the corresponding check can thus be removed. While at it, remove the whitespace error that hurts my eyes, and add the missing curly braces for the final else statement, as per coding style. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann --- include/asm-generic/div64.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/include/asm-generic/div64.h b/include/asm-generic/div64.h index a3b98c86f077482d..10a8b1342fb0387b 100644 --- a/include/asm-generic/div64.h +++ b/include/asm-generic/div64.h @@ -55,17 +55,11 @@ /* * If the divisor happens to be constant, we determine the appropriate * inverse at compile time to turn the division into a few inline - * multiplications which ought to be much faster. And yet only if compiling - * with a sufficiently recent gcc version to perform proper 64-bit constant - * propagation. + * multiplications which ought to be much faster. * * (It is unfortunate that gcc doesn't perform all this internally.) */ -#ifndef __div64_const32_is_OK -#define __div64_const32_is_OK (__GNUC__ >= 4) -#endif - #define __div64_const32(n, ___b) \ ({ \ /* \ @@ -228,8 +222,7 @@ extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor); is_power_of_2(__base)) { \ __rem = (n) & (__base - 1); \ (n) >>= ilog2(__base); \ - } else if (__div64_const32_is_OK && \ - __builtin_constant_p(__base) && \ + } else if (__builtin_constant_p(__base) && \ __base != 0) { \ uint32_t __res_lo, __n_lo = (n); \ (n) = __div64_const32(n, __base); \ @@ -239,8 +232,9 @@ extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor); } else if (likely(((n) >> 32) == 0)) { \ __rem = (uint32_t)(n) % __base; \ (n) = (uint32_t)(n) / __base; \ - } else \ + } else { \ __rem = __div64_32(&(n), __base); \ + } \ __rem; \ }) From patchwork Wed Feb 10 14:11:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 12080943 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B238FC433E0 for ; Wed, 10 Feb 2021 14:14:37 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 62AAD64E7C for ; Wed, 10 Feb 2021 14:14:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 62AAD64E7C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3FQ9RS3wBm0enKXZfJGDqQN+ZUL3GvZmPcfJ/Mexps0=; b=r2E7Gwta/ZKiyW0jOBQ3cT/8n rb7xJZNKkgEY2r1zTM741MZ0e2Xt2zQOi5Of1w5EAdJ3tFk3t8tKtVgsVY7Ku6otB4W2gYOph7H7X OolfhTMOVpFcS5hmfY+AEO2NN+9M+lxRIp5k4t1PVoKGTdJXCFWBfP5wcExl5G3a7nJQtOP6i4nk6 5u5mkglxXPXRnGxfF5DiVemoskdhNwk3r/UZKxlJlOYPSiHI887gl5hTRp9p7WOjrZiPxmwB2EXpO rVO6BkYT0tFca5Na5TAwFU3DmFX0TNaX/Te7KfpZiaFAB1jPCJToe4zp3O+0wsxAIJjcZkUdZWzuM FyuSRya1Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9qEl-0007t4-L9; Wed, 10 Feb 2021 14:12:59 +0000 Received: from andre.telenet-ops.be ([2a02:1800:120:4::f00:15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9qDd-0007EZ-Lw for linux-arm-kernel@lists.infradead.org; Wed, 10 Feb 2021 14:11:51 +0000 Received: from ramsan.of.borg ([84.195.186.194]) by andre.telenet-ops.be with bizsmtp id TSBj2400s4C55Sk01SBjmn; Wed, 10 Feb 2021 15:11:44 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1l9qDX-005Ht0-8l; Wed, 10 Feb 2021 15:11:43 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1l9qDW-006Jqr-Sp; Wed, 10 Feb 2021 15:11:42 +0100 From: Geert Uytterhoeven To: Russell King , Michal Simek , Arnd Bergmann Subject: [PATCH 4/4] microblaze: Remove support for gcc < 4 Date: Wed, 10 Feb 2021 15:11:40 +0100 Message-Id: <20210210141140.1506212-5-geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210210141140.1506212-1-geert+renesas@glider.be> References: <20210210141140.1506212-1-geert+renesas@glider.be> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210210_091149_938114_D66AC208 X-CRM114-Status: GOOD ( 10.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Geert Uytterhoeven , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since commit cafa0010cd51fb71 ("Raise the minimum required gcc version to 4.6") , the kernel can no longer be compiled using gcc-3. Hence drop support code for gcc-3. Signed-off-by: Geert Uytterhoeven --- arch/microblaze/kernel/module.c | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/arch/microblaze/kernel/module.c b/arch/microblaze/kernel/module.c index 9f12e3c2bb42a319..e5db3a57b9e30d9e 100644 --- a/arch/microblaze/kernel/module.c +++ b/arch/microblaze/kernel/module.c @@ -24,9 +24,6 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, Elf32_Sym *sym; unsigned long int *location; unsigned long int value; -#if __GNUC__ < 4 - unsigned long int old_value; -#endif pr_debug("Applying add relocation section %u to %u\n", relsec, sechdrs[relsec].sh_info); @@ -49,40 +46,17 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, */ case R_MICROBLAZE_32: -#if __GNUC__ < 4 - old_value = *location; - *location = value + old_value; - - pr_debug("R_MICROBLAZE_32 (%08lx->%08lx)\n", - old_value, value); -#else *location = value; -#endif break; case R_MICROBLAZE_64: -#if __GNUC__ < 4 - /* Split relocs only required/used pre gcc4.1.1 */ - old_value = ((location[0] & 0x0000FFFF) << 16) | - (location[1] & 0x0000FFFF); - value += old_value; -#endif location[0] = (location[0] & 0xFFFF0000) | (value >> 16); location[1] = (location[1] & 0xFFFF0000) | (value & 0xFFFF); -#if __GNUC__ < 4 - pr_debug("R_MICROBLAZE_64 (%08lx->%08lx)\n", - old_value, value); -#endif break; case R_MICROBLAZE_64_PCREL: -#if __GNUC__ < 4 - old_value = (location[0] & 0xFFFF) << 16 | - (location[1] & 0xFFFF); - value -= old_value; -#endif value -= (unsigned long int)(location) + 4; location[0] = (location[0] & 0xFFFF0000) | (value >> 16);