Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp2263621rwe; Sun, 28 Aug 2022 07:20:54 -0700 (PDT) X-Google-Smtp-Source: AA6agR4jAj9Xl/Vu+hPjiN5krOW5+HYTkNmIAi2TA8266lN5A0fV/afnX4Pn3bgVdYYOTxAuVx2i X-Received: by 2002:a17:902:f68d:b0:16f:2314:7484 with SMTP id l13-20020a170902f68d00b0016f23147484mr12128538plg.136.1661696454265; Sun, 28 Aug 2022 07:20:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661696454; cv=none; d=google.com; s=arc-20160816; b=zQvxEQ4MqLntcF0aXkX63pOvwmixYN9LbH4AVx0vNj9RXwmvUg7pw9juR8n+7aIFKJ riRtndo+eNQmUQDap69kxsh1gWak7P/8elXJmDTp3snvcx6Jz9SYLRHAkUDW8Egdr6mO ynh4JpBpnPva4gVUqmLDYhMtH4Fpa/12PG9AgosDBRGxyAEHWE2lSlQHoxkZRah4mJ9A rtMDHmp49kMhVvRg4CSbN41HOplODanRWZe7ZB/rpT5E0kCWKpPVVah/xcS89OZoBfNb 4idDjcQllNKR5ih/zL2f77zW/WTPBipr3ivwmUA5xNzP4hfqblXR5zI9FNPk+gen51Po GVsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=3pqJJ2FUpBmo5Nco0GniK+zE7tLuKD8PJReYBBAhze0=; b=pK4zT1OURXBHK3sK/25VKk0Z+8bkXdceCLuqXPaIOPr68p+ZEUUBPofUjr+3C1vRCs kTuv1KDT9Irc+hRYQHtFy5cy02d/yM+CRtZzl/KfpyuRhuq12e1q3JrDZqSuSeRGe5ou lk9Ja/iTwpZ4qr4ZOCQGjTTvgH8SqsCczwSx+izrW0YEPPnes0fOkCVO7MAt6/d1p/fh hPrgWUMZUx1dTrWN+HYtez+JqUIJkqNFwo08b/uKu59qudxUBFfe4Xb27dfA9SMyW8LH Uyi2PV5eJ9I5GCnWXXjuGFmYWA4sam8D05r2rKRdcujoOu3lCBb+/h+1jk2ndvZKI3AZ 4cfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GYQWRpTl; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 184-20020a6300c1000000b0042b921f90e3si4872755pga.166.2022.08.28.07.20.40; Sun, 28 Aug 2022 07:20:54 -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=@kernel.org header.s=k20201202 header.b=GYQWRpTl; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229843AbiH1OPx (ORCPT + 99 others); Sun, 28 Aug 2022 10:15:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229801AbiH1OPv (ORCPT ); Sun, 28 Aug 2022 10:15:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81ED213E84 for ; Sun, 28 Aug 2022 07:15:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6CBAA60F9F for ; Sun, 28 Aug 2022 14:15:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2012C43470 for ; Sun, 28 Aug 2022 14:15:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661696147; bh=F8Rzx597evTrKV+vnDZAGsL1yBRhZNPv/ubmR5QIItQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=GYQWRpTlQQydmzfMIJd52PHL7WewEnlRmLXmF/ME3rKNdgaWIfkbZnfBJaetCrPYb oyJXyddLIRcz9aDEWX/F5vCS8ko7dc3Cx7MykCmzpkAvVMP1sbHQLWpe97jvzzUVPH SiTlvylR+SWEX3Xrvl753wmz3YfELXnOnUnMlhKM7m3iOIe/QJrDzcm9CKBmwWpL9J YTXrXFaucyQo1FlJ7HP9nmpad02MmWn+Fgb0coCYE4o1du4ZcuVsXCo0F/oL41QoxL 3e7zokHqgssVINSHaY+ctV9momiaAwKvml0a/NQQ3to/Pm/2i8ffD7LJ7e/YLMDgGW LjsA1ipeGtj9A== Received: by mail-ua1-f47.google.com with SMTP id a18so42379uak.12 for ; Sun, 28 Aug 2022 07:15:47 -0700 (PDT) X-Gm-Message-State: ACgBeo3g7DGbIXgedcbYRmmxNtVTnfbPVdqteZ9gMkyJeT+l3aLWFLXf MpSu8mSiaukFBH3g60PY/EdZGxcr9yL1BZdTJ24= X-Received: by 2002:ab0:4565:0:b0:395:b672:508 with SMTP id r92-20020ab04565000000b00395b6720508mr2190652uar.63.1661696146782; Sun, 28 Aug 2022 07:15:46 -0700 (PDT) MIME-Version: 1.0 References: <20220827175436.156464-1-xry111@xry111.site> <20220827175436.156464-2-xry111@xry111.site> In-Reply-To: <20220827175436.156464-2-xry111@xry111.site> From: Huacai Chen Date: Sun, 28 Aug 2022 22:15:34 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/8] LoongArch: Add CONFIG_CC_HAS_EXPLICIT_RELOCS To: Xi Ruoyao Cc: loongarch@lists.linux.dev, LKML , WANG Xuerui , Youling Tang , Jinyang He Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Hi, Ruoyao, On Sun, Aug 28, 2022 at 1:55 AM Xi Ruoyao wrote: > > 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)) Is it possible that we only change the Makefile and not touch Kconfig? Huacai > + > menu "Kernel type and options" > > source "kernel/Kconfig.hz" > -- > 2.37.0 > >