From patchwork Mon Nov 7 14:15:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Ogness X-Patchwork-Id: 16429 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2077390wru; Mon, 7 Nov 2022 06:18:51 -0800 (PST) X-Google-Smtp-Source: AMsMyM7AfUDaQ4Soekwd8ItdcwUJdP7Zju2igwAUtSbeTvfSEFkZ1e/oZwHASoBq84x/cK5x2PNU X-Received: by 2002:a17:906:5e14:b0:7ad:cb09:ccbd with SMTP id n20-20020a1709065e1400b007adcb09ccbdmr40884373eju.245.1667830731658; Mon, 07 Nov 2022 06:18:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667830731; cv=none; d=google.com; s=arc-20160816; b=KlBvu4m5zm/P55pwFProia4jJl3z+JVaElyskD1wXJGdAESA/Hix//Y+PP8wMHFffl higYzwkCtV59KfTIMx/xfjKEtalSjBaBk2BBvFbNNtlBP7A+D3vESnRlXG9+0ZtwDvr+ XjxjLFgW1OXnxVxI5tN18acqP4lMyTf1A1C7FkxIQ2uCbIx7uv9WqqU/eQ6DjJ7i5ws7 vQVMn6up3nRSAFXbqZozMIx1yucPSG0UDr0vjNj3oD3q/UhjwIzzrsUjNOB8PXezYmg6 cGpRDuxph7pqRo1089raseYT4tZoNDjHegQzNFa6DYCPXoW1YnDCtU6bmSULNfV/yr/8 p6Hw== 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; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dm5-20020a170907948500b0078e19e971b2si10802448ejc.915.2022.11.07.06.18.05; Mon, 07 Nov 2022 06:18:51 -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; 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 + 99 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748847277075414811?= X-GMAIL-MSGID: =?utf-8?q?1748847277075414811?= 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 Acked-by: Paul E. McKenney Reviewed-by: Petr Mladek --- 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