Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1861169rwb; Mon, 7 Nov 2022 06:39:33 -0800 (PST) X-Google-Smtp-Source: AMsMyM6AHDqpWF4o+TODig7CTu7BmFSPRo2VJ2Se9bajLkB9hdQqAYSeIxOUUtXIyPsuGDaQ4Ts+ X-Received: by 2002:a17:907:6d9f:b0:7ae:1030:9fa3 with SMTP id sb31-20020a1709076d9f00b007ae10309fa3mr23616127ejc.566.1667831973544; Mon, 07 Nov 2022 06:39:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667831973; cv=none; d=google.com; s=arc-20160816; b=AZjQpqPim/7rLnikqrmNDgBEU+kkJfi0bZyDWIdl/ToMOcTi42W2Q6dwbBbX8/ausJ WBrPW3hg40YtEyf7kZh4S4ITPBocBI3fRdF5N8RJFU2f5WvEJyLlWzvtKMfkDDE9Q5O+ ziwQa9LshmAZw/FAOpaxs0cA1wXpYZNtVGVcTdSktnkUDsS3CvvJBs6bs8d+s/H1BLZb BSsbJqg4nocPaSj/6gkPwNr48/RxBopGt5meW77JdSUZW8N/VThBKYld8l7TDNI9aQCy wSM7ObbBJ7adOyKryevEwp/sI1D6nV3It45PNq5JXQV1Fw9ZzsK69MjSUagaCDbRuV3n dmIw== 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:dkim-signature :dkim-signature:from; bh=Hsx1u5F/1CiKvy2GFTZ4ZBzQ1rYlt65AF3SRkTuxsig=; b=IBknCJmel5Ks9PLPZpFR66yYjrP1z20JLfaEZHzuFsQPHJNY2PqPqN6PLW0IcO0eLB otOmz4APb7XwVMD5kPnUgmw9vgK1T5D/WpGDpavHmCDfu9jVKjpwKflzeOxD8SjptTyP vESGlrXRSetsJA/y/6T9mV304gg/WBrUryE5vyf45TIvxJIrxHrXCxeWJT5etscS9+oE Cvto53xsU1BP4sgCLSZhTc7xG3J7x5nGnU+DWNpOH1waJ6KxR9UKmUznXJQw58f+QOI0 FjvMx7L9Hurd4UzYDlhGMDZ0DrDH0KK8GbJEV9ayITWPgjTUwgXyIWJI0Nn07Uy1CAn5 fNXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=gGZzuKnO; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=O0NGeysR; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gt41-20020a1709072da900b007ae6f13645dsi2397322ejc.498.2022.11.07.06.39.10; Mon, 07 Nov 2022 06:39:33 -0800 (PST) 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=@linutronix.de header.s=2020 header.b=gGZzuKnO; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=O0NGeysR; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231918AbiKGOQq (ORCPT + 94 others); Mon, 7 Nov 2022 09:16:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231367AbiKGOQn (ORCPT ); Mon, 7 Nov 2022 09:16:43 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16F5E19C2A; Mon, 7 Nov 2022 06:16:42 -0800 (PST) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1667830600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Hsx1u5F/1CiKvy2GFTZ4ZBzQ1rYlt65AF3SRkTuxsig=; b=gGZzuKnOEmjKPxnbVv/2pWVKTnVFnDA6n6uJGrTaFNs5ZYKCtrOZcWBE0nUslYYBrhiBFC wWXzKY0XCcdwU49sdLis2tWo+CqiLw27jBnhr7tjmFvfKL1ktOzUawjgzEsiy43FowPSV+ 2R9HP522uAqxmgAD/Z92yUxYQeOtbus8a/JAigqgIL9U1loZ5DnW140SsJvb8Ab/i7cokn 48tUsK+EubYJAZr2PCtGbTlP1T+9Z/al4ryuJnrvWsLq9PyqJYttnZWggUbaOgfsRQD3bQ FICdkdqh8pvtpKl3+PBEpjQJ6Ky3mRf3ya0jmwlyBd+Q6GZY4U1uV66yHgUUgA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1667830600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Hsx1u5F/1CiKvy2GFTZ4ZBzQ1rYlt65AF3SRkTuxsig=; b=O0NGeysRpJ2rTQa3JNmWJZLtFDJUBBFvVlOpA/ai0W0bs6FRiXV/Cp6mDv/3mE65r7hslX eRRyPQGXENizajAA== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, "Paul E. McKenney" , Frederic Weisbecker , Neeraj Upadhyay , Josh Triplett , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , rcu@vger.kernel.org Subject: [PATCH printk v3 01/40] rcu: implement lockdep_rcu_enabled for !CONFIG_DEBUG_LOCK_ALLOC Date: Mon, 7 Nov 2022 15:21:59 +0106 Message-Id: <20221107141638.3790965-2-john.ogness@linutronix.de> In-Reply-To: <20221107141638.3790965-1-john.ogness@linutronix.de> References: <20221107141638.3790965-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,INVALID_DATE_TZ_ABSURD, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 Provide an implementation for debug_lockdep_rcu_enabled() when CONFIG_DEBUG_LOCK_ALLOC is not enabled. This allows code to check if rcu lockdep debugging is available without needing an extra check if CONFIG_DEBUG_LOCK_ALLOC is enabled. Signed-off-by: John Ogness --- I also sent this patch to Paul as a suggestion. If it is not acceptable, I just need to add an ifdef CONFIG_DEBUG_LOCK_ALLOC into console_list_lock() of patch 21. include/linux/rcupdate.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 08605ce7379d..65178c40ab6f 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -340,6 +340,11 @@ static inline int rcu_read_lock_any_held(void) return !preemptible(); } +static inline int debug_lockdep_rcu_enabled(void) +{ + return 0; +} + #endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */ #ifdef CONFIG_PROVE_RCU -- 2.30.2