Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1570910rwe; Sat, 27 Aug 2022 10:59:16 -0700 (PDT) X-Google-Smtp-Source: AA6agR6FSmUJ/lhZwiu0Eg5/YotN85y5KV6NxDX/vcgjNq/G+AeJR7tIaMh6ylCUoKEsP5a0FssJ X-Received: by 2002:a17:907:7fa1:b0:73d:8326:cd5 with SMTP id qk33-20020a1709077fa100b0073d83260cd5mr8393824ejc.522.1661623155767; Sat, 27 Aug 2022 10:59:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661623155; cv=none; d=google.com; s=arc-20160816; b=yYV8P8aeuzfWI55a8bAvoVPE6Vc+y/G9qLK8vai4Sc2inyPvFrq3laQKecPnPzVEvm /RTnsadrFbtcIxA/avblPxfU+XcD5mEGKAkMH9tdGs7nuI7J04FjTfO83h3U1ab4cR51 1mGv/hx/t5+X88GyFw5lnVRW1Ifu8JYfAXaMMG2K6/+sd7HaXsQS4Nbaf+F1Stt/e1iw OgGdJF33D/h717F6+GVt9dRDmuk+8NIk0iep0lV9POGcU+dZPSR0OS1EjDWAxFLFTd2w nH5w4FDc+SbzIIwMOdRtNLi8A9menqVKQJysrMWcDAiIHkD1sMdhQNJQ7Yw2Mx9ZYsE8 OOXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cIfBjBf5m4n8F9mukR6/tv6Zj8BT5AeGEHvAf+qUxj4=; b=ejkYJooSiVhnxUcKSJqSbR+Whr5i7/GJNx+mvavKcQDmuoVprMj8bFUptLQ02iCHWc A2NiQ9ogC7Db/GlHBCdGSNhDeM1AUVFaSgMxZQo4mNFauZWPn/dYSGWpmt3Vdjfe2XjX LfVGeRk2HaJ1qwGehhSZNYnE97swiBaSYuhFDBL/snXPCC5ZLPDpdcmP1joQUkODHD1p qQRASYr3C2k4wszC/Y+fK/ZJ0RW5S0kC494eg6yY1UNSAaTX67RDUmtycEL/m0PL8tyK N15nL3ROygK9292am6x8Gat33tdwnkdrM5vpzRtizqKtzc/ABwHfjFztRVI/K/5Vt3Zl g8TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=c6rb0leM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t18-20020a056402525200b0043e1ec7a427si3158218edd.570.2022.08.27.10.58.48; Sat, 27 Aug 2022 10:59:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=c6rb0leM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229713AbiH0Rzm (ORCPT + 99 others); Sat, 27 Aug 2022 13:55:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbiH0Rzj (ORCPT ); Sat, 27 Aug 2022 13:55:39 -0400 Received: from xry111.site (xry111.site [89.208.246.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE0A380E95 for ; Sat, 27 Aug 2022 10:55:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1661622932; bh=5gF4zRm2HsqlA+R+dZxda56qftVNflTTvjyLrTHAMIM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c6rb0leMlO7eX0MklNiG6AD2hAIWrbtHCisYgFWqmKST8dVf9FHmklm+j4sXagKLX JLSCk3fU7+92bJdpb2l3fP3N0WN0k1VLywJDnxo/mU7lCVUquyu3kOG6Z/KfgGZ+0J DdIV8gG40gGjCu/ikWCEsRsm874hlc7I87wB8rT4= Received: from xry111-x57s1.. (unknown [IPv6:240e:358:1157:dc00:dc73:854d:832e:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 1CC9B667FF; Sat, 27 Aug 2022 13:55:24 -0400 (EDT) From: Xi Ruoyao To: loongarch@lists.linux.dev Cc: linux-kernel@vger.kernel.org, WANG Xuerui , Huacai Chen , Youling Tang , Jinyang He , Xi Ruoyao Subject: [PATCH 1/8] LoongArch: Add CONFIG_CC_HAS_EXPLICIT_RELOCS Date: Sun, 28 Aug 2022 01:54:29 +0800 Message-Id: <20220827175436.156464-2-xry111@xry111.site> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220827175436.156464-1-xry111@xry111.site> References: <20220827175436.156464-1-xry111@xry111.site> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD, PDS_OTHER_BAD_TLD,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org GNU as >= 2.40 and GCC >= 13 will support using explicit relocation hints in the assembly code, instead of la.* macros. The usage of explicit relocation hints can improve code generation so it's enabled by default by GCC >= 13. We need to adapt the kernel for this change, introduce CONFIG_CC_HAS_EXPLICIT_RELOCS so we can use it in later patches. Signed-off-by: Xi Ruoyao --- arch/loongarch/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig index 810096bbf853..e7cfd451024b 100644 --- a/arch/loongarch/Kconfig +++ b/arch/loongarch/Kconfig @@ -203,6 +203,9 @@ config SCHED_OMIT_FRAME_POINTER bool default y +config CC_HAS_EXPLICIT_RELOCS + def_bool $(cc-option,-mexplicit-relocs) && $(as-instr,x:pcalau12i \$t0$(comma)%pc_hi20(x)) + menu "Kernel type and options" source "kernel/Kconfig.hz" -- 2.37.0