Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7700882rwr; Wed, 10 May 2023 11:19:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ76w2K2yQfT7ZF1hgTcvaeq/XGVL+2eIPi34k7qAqZSTbBBmttY563erKNcvcVqJUD9OioC X-Received: by 2002:a17:90a:d711:b0:250:43a6:fb02 with SMTP id y17-20020a17090ad71100b0025043a6fb02mr16264129pju.20.1683742773303; Wed, 10 May 2023 11:19:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683742773; cv=none; d=google.com; s=arc-20160816; b=Dm5vweIofkVK4fepoHEprZyHxk1KtBcHwiyr6KIoMG8tvog6FBPhidjDII0Y3CdrXe LJcnMphT480snXD3wZouXxVehg0q0xEd/l6/zz6nyQci8GCu632Qvo0lBSON3r62sYd9 bH8PLgB5THzhQ/+6VeZA5G+/A5xjfdLPqfOn9MKNAtQIEz/SDwpRy3fbzeqlHswKizpx U3rXTsBMaJVh9mjFkjmYUHw6GXxkkegmJmip03r+/a2MRNhk9ZqgTgY3qktvmTs8SDvL PrRnmsWUptQ+PgCcGggWVw2nizik8Fe5sYJHAot0Z3y208NAdRNjht4+DMPsThjDfKOS GZZQ== 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=fESAnyUxyWRzQVPoLmwiwSH9Wu2b5R7e/KQ97joqibQ=; b=B3KlhH95TpCg/aQwNubGSBQW2wGvitELv42FFB1BHQKLShnaANWVhzq694qQ+tOvnZ uaDCK31Swu7R6VUfWZDk3sJM9bdYV+kWq2/KwTEgwojHwDmwBAfJD4LKha566HW/efJ9 Gd9k4e/fiaG0mJiwoYisHDQvVz09LIffNTGDySbKg2EoqEIY5jNVudtHgUbtl6hg9lVb wE71nTimLGHcxNISiML2xXwtdp07JMiMEIZtZXu4NUzqMTjAiliHOFZ/x6gwDVUuCaai QCAf6dKsen1uHgsk82tvEy4LwnvsE/p7fUSjEqGis6WEdl2nZEJCY8/7WBF2q7nKxTSM Qh4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GhQTAUXK; 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 u1-20020a17090adb4100b002501d633225si14188718pjx.11.2023.05.10.11.19.18; Wed, 10 May 2023 11:19:33 -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=GhQTAUXK; 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 S236268AbjEJSS3 (ORCPT + 99 others); Wed, 10 May 2023 14:18:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229902AbjEJSSG (ORCPT ); Wed, 10 May 2023 14:18:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7406B7A9D; Wed, 10 May 2023 11:17:46 -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 0366663F81; Wed, 10 May 2023 18:17:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50F60C4339B; Wed, 10 May 2023 18:17:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683742639; bh=UwZIwbcSgLfsaScEbsCZq/hnSjYCEy/ueiOBHUYJX6U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GhQTAUXKMTyOnQFt7BEN9Y2D0WN99QxH3SqWLZWZzfHfGsk3XDp4e8r63Wmoaf4La x2aFHC2HX7iLHEFsERqXgtBPRRlezKgbsZQRQZQOrHB9FSA+9ol9nCiwyveyQFoz18 v3bRFf0Nx6taPwGFpCi0ZMOp0ogDYD5wufl7qPFZdKJfKbJDy2QMieXjywzo18k9nb imVCnaSdzav9fssB0HmPsPtASXkH32U0roh6B/uq8Wkjv/wSBkjSE0YUfWk/SzqAsj 4rBuhwAEyoKhit2rNb1+kb+Z6/n7kxT4TzKYqDHb2pfYutJFXdFH9hpZIVHoXlewH6 M8ai/dtpBfUzA== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id D603DCE134D; Wed, 10 May 2023 11:17:18 -0700 (PDT) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: x86@kernel.org, akiyks@gmail.com, linux-doc@vger.kernel.org, kernel-team@meta.com, "Paul E. McKenney" , Will Deacon , Peter Zijlstra , Boqun Feng , Mark Rutland Subject: [PATCH locking/atomic 03/19] locking/atomic: Add kernel-doc and docbook_oldnew variables for headers Date: Wed, 10 May 2023 11:17:01 -0700 Message-Id: <20230510181717.2200934-3-paulmck@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <19135936-06d7-4705-8bc8-bb31c2a478ca@paulmck-laptop> References: <19135936-06d7-4705-8bc8-bb31c2a478ca@paulmck-laptop> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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,URIBL_BLOCKED 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 The andnot, dec, inc, and try_cmpxchg files in the scripts/atomic/fallbacks directory do not supply kernel-doc headers. One reason for this is that there is currently no reasonably way to document either the ordering or whether the old or the new value is returned. Therefore, supply docbook_order and docbook_oldnew sh variables that contain the needed information. Signed-off-by: Paul E. McKenney Cc: Will Deacon Cc: Peter Zijlstra Cc: Boqun Feng Cc: Mark Rutland --- scripts/atomic/gen-atomic-fallback.sh | 17 +++++++++++++++++ scripts/atomic/gen-atomic-instrumented.sh | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/scripts/atomic/gen-atomic-fallback.sh b/scripts/atomic/gen-atomic-fallback.sh index 6e853f0dad8d..697da5f16f98 100755 --- a/scripts/atomic/gen-atomic-fallback.sh +++ b/scripts/atomic/gen-atomic-fallback.sh @@ -24,6 +24,23 @@ gen_template_fallback() local params="$(gen_params "${int}" "${atomic}" "$@")" local args="$(gen_args "$@")" + local docbook_order=full + if test "${order}" = "_relaxed" + then + local docbook_order=no + elif test -n "${order}" + then + docbook_order="`echo $order | sed -e 's/_//'`" + fi + local docbook_oldnew="new" + if test "${pfx}" = "fetch_" + then + docbook_oldnew="old" + elif test "${sfx}" != "_return" + then + docbook_oldnew="no" + fi + if [ ! -z "${template}" ]; then printf "#ifndef ${atomicname}\n" . ${template} diff --git a/scripts/atomic/gen-atomic-instrumented.sh b/scripts/atomic/gen-atomic-instrumented.sh index d9ffd74f73ca..99c72393d362 100755 --- a/scripts/atomic/gen-atomic-instrumented.sh +++ b/scripts/atomic/gen-atomic-instrumented.sh @@ -68,6 +68,23 @@ gen_proto_order_variant() local args="$(gen_args "$@")" local retstmt="$(gen_ret_stmt "${meta}")" + local docbook_order=full + if test "${order}" = "_relaxed" + then + local docbook_order=no + elif test -n "${order}" + then + docbook_order="`echo $order | sed -e 's/_//'`" + fi + local docbook_oldnew="new" + if test "${pfx}" = "fetch_" + then + docbook_oldnew="old" + elif test "${sfx}" != "_return" + then + docbook_oldnew="no" + fi + cat <