Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp350693rdb; Tue, 31 Oct 2023 09:09:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFo9wiN/c2LSNxGuE1zPAdkr+AlEM/p49ERw6eIHr9Vc/9wXY1PfJvK8JrycRPtjxJI/GeF X-Received: by 2002:a17:90a:b783:b0:27e:3009:3033 with SMTP id m3-20020a17090ab78300b0027e30093033mr9442947pjr.39.1698768571539; Tue, 31 Oct 2023 09:09:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698768571; cv=none; d=google.com; s=arc-20160816; b=mL4I4Qb41PYslIxFjXpYXkFlwX1VbBGvprIkMwrFUgZAUv7u+4sBx5KlgO0sa7Njqq tiTBfDaeLiO9oqznNl2+66q4gvQAO+GRxzeVOpwPJkNkFwKQrXNLtBQyklu7UTprcoKQ xMvn+TgeyFFh7m4UWTHtlt5fVAUDVAY/PhGiLNgyntoQ7ZFeErcDqd/nkzWsjICe5Ab7 CuUOLSyisx4XSk0hOwXM1L7g6fFgd4phnivf5QW6oHeM37ZyR8naRE5vkljgbvlfYP6U 791POqbMwc/kYh+xdXbMmTv6ChGoDE4qluA//OlpvG6V2CZMr68Liuh8P1CbSQ+9mXo4 uRdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Ys1VJc4Bhd8TAf4hvcaBWppfEJ5joRJQwanYMQT1DmA=; fh=UUjupF6YVHT2v84IyX4CA4K2s0FrPbs2Y5vipYkEWS4=; b=oHo2GFAghbxnB4YiCsThXbKGqeLKI8lWwztjJ0qCEJp3WFKAO5yGkJPflUGW/LM58c lJPdYRZmv/teidGKLRglrim983Bmxk9AtCxzuLQ++lHsnvp0QfGgRPw2lNFllbJvso4C sDh998UlT5bJMJ4a8AyICdPv7sxy0C47gf2foyhJjDajPrnjLwZgBTsfGUhcrEPwzW/B q5gL4jp9Q1G8N00zmxMZeNCLIuGs9I3g2tywxA5Y7/OznKkB05GrVKHHOko3RKGt6lFe jSrtbNL7AaKOyzk79fI2BQC2wFmV5ujZfVh6ze+5NbkSAvEcha4pj8H/5zUu4g7uvlhi UVJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RcngoR6R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id m9-20020a170902e40900b001c9c8c4cfb6si1194412ple.214.2023.10.31.09.09.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 09:09:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RcngoR6R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 7B752802FD03; Tue, 31 Oct 2023 09:09:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344895AbjJaQJ3 (ORCPT + 99 others); Tue, 31 Oct 2023 12:09:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344890AbjJaQJ1 (ORCPT ); Tue, 31 Oct 2023 12:09:27 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B2C4DA; Tue, 31 Oct 2023 09:09:25 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77EE7C433C7; Tue, 31 Oct 2023 16:09:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698768565; bh=Updi5rJN/tACb8zx7ul9jZgP9ji6++ULgouBfC6YluY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RcngoR6RnBLevMReebq5NB3m/39AcihK58X4uGyGfVgLqpSAeL7RTNiqDXV3IY64H 5NJThFceWo0eGTHaogDq9dz2/Bstfooqc99NUuqF4FIyQHa1D/VHoop5w+ROzkFuug 5AzByfahI9iacWm2oNtRV1QeXxl0i695F0/qHal4Ve8HeqUKZKfFE7M2eyVPfFYgIf OOdTSlgZCRbf1KiN1OIyiniOo905AQxowItF/9sKvqFQIYyDc21TZo+leX1rAkioZz 6LZrk12oHMlnmzzweivy3Qx2alVH7hYJKTx0E4pO4lgom+CJ1nPryogDPKmQ3klXVZ Ej1oEwFcz2qbw== Date: Tue, 31 Oct 2023 09:09:22 -0700 From: Nathan Chancellor To: "Jiri Slaby (SUSE)" Cc: masahiroy@kernel.org, linux-kernel@vger.kernel.org, Nick Desaulniers , Nicolas Schier , linux-kbuild@vger.kernel.org, Naveen N Rao , Christophe Leroy , Michael Ellerman Subject: Re: [PATCH] kbuild: dummy-tools: pretend we understand -fpatchable-function-entry Message-ID: <20231031160922.GA995893@dev-arch.thelio-3990X> References: <20231030113416.5208-1-jirislaby@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231030113416.5208-1-jirislaby@kernel.org> X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 31 Oct 2023 09:09:30 -0700 (PDT) On Mon, Oct 30, 2023 at 12:34:16PM +0100, Jiri Slaby (SUSE) wrote: > Commit 0f71dcfb4aef (powerpc/ftrace: Add support for > -fpatchable-function-entry) added a script to check for > -fpatchable-function-entry compiler support. The script expects compiler > to emit the section __patchable_function_entries and few nops after a > function entry. > > If the compiler understands and emits the above, > CONFIG_ARCH_USING_PATCHABLE_FUNCTION_ENTRY is set. > > So teach dummy-tools' gcc about this. > > Signed-off-by: Jiri Slaby (SUSE) > Cc: Masahiro Yamada > Cc: Nathan Chancellor > Cc: Nick Desaulniers > Cc: Nicolas Schier > Cc: linux-kbuild@vger.kernel.org > Cc: Naveen N Rao > Cc: Christophe Leroy > Cc: Michael Ellerman > --- This seems reasonable to me. I did not test it but it seems like it should work based on my reading of gcc-check-fpatchable-function-entry.sh. Reviewed-by: Nathan Chancellor One minor nit, there should be quotes around the subject of 0f71dcfb4aef in the commit message, should there need to be a v2 for some reason. > scripts/dummy-tools/gcc | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/scripts/dummy-tools/gcc b/scripts/dummy-tools/gcc > index 07f6dc4c5cf6..e6c41427c02f 100755 > --- a/scripts/dummy-tools/gcc > +++ b/scripts/dummy-tools/gcc > @@ -91,6 +91,16 @@ if arg_contain -S "$@"; then > fi > exit 0 > fi > + > + # For arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh > + if arg_contain -m64 "$@" && arg_contain -fpatchable-function-entry=2 "$@"; then > + echo "func:" > + echo ".section __patchable_function_entries" > + echo ".localentry" > + echo " nop" > + echo " nop" > + exit 0 > + fi > fi > > # To set GCC_PLUGINS > -- > 2.42.0 >