Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2671744rdh; Mon, 30 Oct 2023 04:34:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFKfNAy6NL6EDkVj91Y0fjhmSGd/wBl2sIng6Xoej2B/OzaJS9nexF3q9mZcW19yD8uDPiU X-Received: by 2002:a05:6359:2c88:b0:168:e7da:30ad with SMTP id qw8-20020a0563592c8800b00168e7da30admr8156424rwb.10.1698665671562; Mon, 30 Oct 2023 04:34:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698665671; cv=none; d=google.com; s=arc-20160816; b=xz5RK/BTC4Q4YkowWSQARo2EmwN6P6TbCt2RnXk99EoX0XySKSGx6IPhugeaYOpxIf X2pwZt+IrhQCzXKcbX1h0gv16pbn1LFSQio3BVxD9Oy+NMxV+N9EIJUUGne229GWv3Vt Nww3kHpTp9nwYg8ZFLhFSi5K9Y+ov9vr6jroLY9jzw8ZRzBEa3Nuy3cZngCpAQClAfHr hOyDO0SFRoMNHte7pD+RbihFapdYT4QkMofoLVegm1Loyj/3ljf7O4ZgeIw2NsE/Mp5s FfhNq5AGXHzsCRhXFjjFVY8swjo+USo96C3SLaqyxcdikw/wYfJ4HVLLQJMEkMBxARue hJoQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=lHTLwafW42Crq1m7sR7y04fvpG/WJfkgyEHO+T+/aTU=; fh=3i27z6yMWH5ij2TDai/i94yzkeR+EIa+kwTCLP8mWu0=; b=Q2koe3MKgRZXiQPJWnIBPe0f8MoiK1vPczsVp0QKj1jobZFrjBmSW4NtpTb6e8B/cp h1m6eEOq8MNJj09dl48cpGkR/Z8gXtPmzUrYDBaun0ojir6hvkgfqiLe12L6Et7N8qPL yK4LvTlu+WbIsYjUP99Bj3YmeAS9MLGqoqaYa4cCZ7La05z6HAr6SwJC5FyBuQJD+rcm /vmQ8Anxg3JURrOhTGe0ZarwjPqK7oq2tjKuL439NXjBKamaiXDQJwIUVlsjH6dywSGM WUXbnRaZ3Tcj+PktyQf8ht+Y7rVXEdTzg8hPe33GDY6Xmyov7LnnZo8/+SeSWh+Qu2cy BbOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h7FAyb6L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id k29-20020a63ba1d000000b005b928e39422si4924663pgf.56.2023.10.30.04.34.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 04:34:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h7FAyb6L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 2CD558050FBC; Mon, 30 Oct 2023 04:34:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232654AbjJ3LeY (ORCPT + 99 others); Mon, 30 Oct 2023 07:34:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjJ3LeX (ORCPT ); Mon, 30 Oct 2023 07:34:23 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85658C2; Mon, 30 Oct 2023 04:34:21 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A264C433C7; Mon, 30 Oct 2023 11:34:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698665661; bh=XBOZSHuoRoD8WSPEZTng3lqWdqh+3Xe2FMkuy6z6a5Y=; h=From:To:Cc:Subject:Date:From; b=h7FAyb6L9+v/tF5yELzcBvV8YRsztwzw7cEAW+REYwt+YuHpBEA1E5G5HybX0aB4H /tTM0Vje5C0dQvzg3m736p1/tVI02ubFMfaqlSA0/RirHr2WHX155UHkY+4j0HPgDd sTNChCTbF96Wj3i0V7e92or2k+M4uUh4W9oBbRXGRpEJvPQ9TPEQoi+t9drnIDAsjO 6p/x7Nh1CR6ZbvSvZrP17eRbuPh+exeiZfVrGOq4q1Xk8IrH4O55cPYgAmWUhYnEMH 425paWxK73OY9a31Kjnv/JUKh5aFni2E0yomCT6+vYMPwKo4L3wGxw7CwjCZ33syVS FvtPW4VgmxnQw== From: "Jiri Slaby (SUSE)" To: masahiroy@kernel.org Cc: linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , linux-kbuild@vger.kernel.org, Naveen N Rao , Christophe Leroy , Michael Ellerman Subject: [PATCH] kbuild: dummy-tools: pretend we understand -fpatchable-function-entry Date: Mon, 30 Oct 2023 12:34:16 +0100 Message-ID: <20231030113416.5208-1-jirislaby@kernel.org> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email 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 (howler.vger.email [0.0.0.0]); Mon, 30 Oct 2023 04:34:29 -0700 (PDT) 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 --- 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