Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4070108rwe; Tue, 30 Aug 2022 04:13:37 -0700 (PDT) X-Google-Smtp-Source: AA6agR7b64ims+cTRRTfQENz5WVByBMl7opF80vSWWQMyaAZHxUQuS+IP1wqzvIm8byJ7V7FI7Kd X-Received: by 2002:a17:90b:3b46:b0:1fb:5993:f893 with SMTP id ot6-20020a17090b3b4600b001fb5993f893mr23208333pjb.229.1661858017610; Tue, 30 Aug 2022 04:13:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661858017; cv=none; d=google.com; s=arc-20160816; b=dWLVLvtdlsDhlmpxa7ALkcRYPpPm0R9Ar7IO7HOY6i+Psc0qGr2n/heDlDhdbi+IhG vatAjAwt04pMI5B+sAL5gPLN3KhyqhQslLAZpT2JO1CE0NpwF0gvmnU+/9F1wuSYL/Vm vzI9Ha9QjC4LHU2mc53NCJMHxMqjvM/1V4dx0dZDRSADzeHI0h7fDcI+22Bnr2u/l0YH dpEVJqewn8lnDzXAHgxwmsA6UtEXWaBouJc5/nCnyLYqmrW9nW+PpHFjIipCDtLIaRSB /AdLxv8snfCwC0tjQtODLacY+q16UkZ6M9E+RWQre5cXuWl54432gUa5O1eHmLaarANS /sIg== 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=uZrvxtNwFUmvP9Vak1eD+cAXrqomaHHYRj1Ir3F0fCA=; b=kxrtGS//GybdZFosm33VVGJFTPHfSUpDgrVrnzOOR2mJtYsK3ncyjeA0eGSlGLuTqV bZjIsOcSENz5J+EYyaD6nyhXhUrQwoH/B2+GKbHZdHkcHo4ksX4VH6W2sNFoabYFH/j+ 0ARymLfHPPVhfvrEdBwXi5uSceAcE9KKmDoDRu5Qx1kO1fCFzAL9zZYLQ2VF7pT2+Kp0 rkMQPKaPxgA2AsKk7CR+efOwj7amEulZjwq+LZKkvpqutizHqDGMACA8pJ8otlTczZIM gjMrL/qxlwdkjAERCgecQzhHFrsbhMgxfdTrBER5QgK0C+FGIDo0V2q7ZMogjojsBEBR ZEGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=OiWgWF3M; 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 a19-20020a63d413000000b0041d4b75332csi2108945pgh.339.2022.08.30.04.13.26; Tue, 30 Aug 2022 04:13:37 -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=OiWgWF3M; 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 S229938AbiH3KuJ (ORCPT + 99 others); Tue, 30 Aug 2022 06:50:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230046AbiH3Kt6 (ORCPT ); Tue, 30 Aug 2022 06:49:58 -0400 Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E84311120 for ; Tue, 30 Aug 2022 03:49:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1661856582; bh=owF+FNmRrMbe7xv+RTni/1sE0a+t4GDngroii48Nl7g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OiWgWF3MgWggip5qig6Op1VTJTGCXcxDMKe9WiCTOV7l+lPKcFMiglAeT2CpRBTHb pkZ1rWD4jNIzA7wEI47T0eFvtYabNZRt7KcV9BzWkw5tc6/2C3o7RIloZsq2YRauQ3 DskjLaOcNmmSyVa+kmbmjjXYq5OTKXO7xzwCA/MY= Received: from xry111-x57s1.. (unknown [IPv6:240e:358:11dd:1900:dc73:854d:832e:5]) (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 B343C66016; Tue, 30 Aug 2022 06:49:35 -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 v7 1/5] LoongArch: Add CONFIG_AS_HAS_EXPLICIT_RELOCS Date: Tue, 30 Aug 2022 18:48:02 +0800 Message-Id: <20220830104806.128365-2-xry111@xry111.site> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220830104806.128365-1-xry111@xry111.site> References: <20220830104806.128365-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. Introduce CONFIG_AS_HAS_EXPLICIT_RELOCS as the switch for "use explicit relocation hints or not." 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 d3ce96a1a744..0721b4b2207a 100644 --- a/arch/loongarch/Kconfig +++ b/arch/loongarch/Kconfig @@ -204,6 +204,9 @@ config SCHED_OMIT_FRAME_POINTER bool default y +config AS_HAS_EXPLICIT_RELOCS + def_bool $(as-instr,x:pcalau12i \$t0$(comma)%pc_hi20(x)) + menu "Kernel type and options" source "kernel/Kconfig.hz" -- 2.37.0