Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2614665pxb; Fri, 17 Sep 2021 14:08:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxc3NFRf0BBakwtUvsKA9lhhOZ4vnGlu8w03nC9mx+LBBfssm7XIWY1gZUEvbv7jTf1Qklt X-Received: by 2002:a05:6e02:1a49:: with SMTP id u9mr8955399ilv.278.1631912930453; Fri, 17 Sep 2021 14:08:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631912930; cv=none; d=google.com; s=arc-20160816; b=RONOEPP4EqNu9nsJS/tEy1jkQp4syqxV34VlJzMnUtb+wrDR+OWJ00ytl+DTRiKniN 08/rDt/xS6dZJzf7Su2mvZGodfU0yuzSioBVlti5+6F6KLcTZXdyH1Hm5U1xTi9dnr2c R3FsqLYbvaSz0YVwUBmYzwST6vVvilr8520ZTmCLjHkDnjZ5qpRUleNiqg7kF9e3e5g9 F7mHwg92mY3T2FvyAkpdmXBksXWY7ubTANB0O+buVWweKLUc+L3ZeznvtFXjc7TiX1Dh 8SLuIwz8rFS2KFVGYo84lHZGRsQvnDT8CIYXir+PyXrZVMZQM0SG2ayYK5laeuUhCDeg Bi7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=2YqRDUJteSJFBPKelOqsHztpFf8JBqeQncF6TCkWpu0=; b=k6kT6jab5ablbGbqMA2Qi60/KhfzP+4zbw5qHSMKZdBB4Is32u5ZP/hiPsNw3Fkj/o Ar5zGMG3VcXYke9Zx0UuXrme1DzK99orN++vq+cC3YyU9teT1WB8KJ9bk4mAeuqYfsLr /Qq+9c9xU276qH3TMv8lYvChqsKR3zG42aCA8Q6BeJNCNzJ9D0rDxIqXmCKOq8dRY6cM d8U/YQ6Jp08fBZpv0ClsvtcYrcNIyc5qjwj6INF9V7dWVdQxEadaPPskRd9jv4u+xVzH 7SAixwfLuAGoBRvULL4ypzJAP6to3FmbBOC5qI9BvWGWY2XBNyh+k6j9rn7BgW+OkPuh GNFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=362Nd8CZ; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a14si6522654iod.86.2021.09.17.14.08.39; Fri, 17 Sep 2021 14:08:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=362Nd8CZ; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S241109AbhIQNSt (ORCPT + 99 others); Fri, 17 Sep 2021 09:18:49 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:54676 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235661AbhIQNSm (ORCPT ); Fri, 17 Sep 2021 09:18:42 -0400 Date: Fri, 17 Sep 2021 13:17:18 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1631884639; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2YqRDUJteSJFBPKelOqsHztpFf8JBqeQncF6TCkWpu0=; b=362Nd8CZaPKif0cnvGAeO97HDmWT09qwzASrsx2SeiNpNNAHN1cK+9c6CS1Cdq5ZlTEZXe yebJSsQ/4QMLibyfNmR62Vc9hZjYSWj98OC9SIxARCH3UCD+alONcj+qr7vEHdz8UfGRyz 08vXc6norkA2Ztbo5J1eQ22dWL0UiGjIiog6cOGp6p6Cc5vb3+viBVVfV9AII28/kkCAvS VHkBegVTNLiq+/joEM4TkhIeAj1UlIf9rppipDd7c2ZNlBfZC8IDnr0sXp/a1yoOB/dFWU Qcj+9+PMNKQvcAVKeht4Zo1zMZqGxEPCE1qRpRkMO1j/6ZWiqQXSUI+TMIHYaQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1631884639; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2YqRDUJteSJFBPKelOqsHztpFf8JBqeQncF6TCkWpu0=; b=xYSgF4VySwmFmhhRL3SXkPxJ8LND1klxhUoCj10awgkxmELl4wkV20pXUsvVo0dSbJe9Yh GrHDNLNEKL+1tjDw== From: "tip-bot2 for Zhouyi Zhou" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: locking/core] lockdep: Improve comments in wait-type checks Cc: Zhouyi Zhou , "Peter Zijlstra (Intel)" , "Paul E. McKenney" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20210811025920.20751-1-zhouzhouyi@gmail.com> References: <20210811025920.20751-1-zhouzhouyi@gmail.com> MIME-Version: 1.0 Message-ID: <163188463897.25758.12154045033309013884.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the locking/core branch of tip: Commit-ID: a2e05ddda11b0bd529f443df9089ab498b2c2642 Gitweb: https://git.kernel.org/tip/a2e05ddda11b0bd529f443df9089ab498b2c2642 Author: Zhouyi Zhou AuthorDate: Wed, 11 Aug 2021 10:59:20 +08:00 Committer: Peter Zijlstra CommitterDate: Fri, 17 Sep 2021 15:08:45 +02:00 lockdep: Improve comments in wait-type checks Comments in wait-type checks be improved by mentioning the PREEPT_RT kernel configure option. Signed-off-by: Zhouyi Zhou Signed-off-by: Peter Zijlstra (Intel) Acked-by: Paul E. McKenney Link: https://lkml.kernel.org/r/20210811025920.20751-1-zhouzhouyi@gmail.com --- include/linux/lockdep_types.h | 2 +- kernel/locking/lockdep.c | 2 +- kernel/rcu/update.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/lockdep_types.h b/include/linux/lockdep_types.h index 3e726ac..d224308 100644 --- a/include/linux/lockdep_types.h +++ b/include/linux/lockdep_types.h @@ -21,7 +21,7 @@ enum lockdep_wait_type { LD_WAIT_SPIN, /* spin loops, raw_spinlock_t etc.. */ #ifdef CONFIG_PROVE_RAW_LOCK_NESTING - LD_WAIT_CONFIG, /* CONFIG_PREEMPT_LOCK, spinlock_t etc.. */ + LD_WAIT_CONFIG, /* preemptible in PREEMPT_RT, spinlock_t etc.. */ #else LD_WAIT_CONFIG = LD_WAIT_SPIN, #endif diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index bfa0a34..4e63129 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -4671,7 +4671,7 @@ print_lock_invalid_wait_context(struct task_struct *curr, /* * Verify the wait_type context. * - * This check validates we takes locks in the right wait-type order; that is it + * This check validates we take locks in the right wait-type order; that is it * ensures that we do not take mutexes inside spinlocks and do not attempt to * acquire spinlocks inside raw_spinlocks and the sort. * diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c index c21b38c..690b0ce 100644 --- a/kernel/rcu/update.c +++ b/kernel/rcu/update.c @@ -247,7 +247,7 @@ struct lockdep_map rcu_lock_map = { .name = "rcu_read_lock", .key = &rcu_lock_key, .wait_type_outer = LD_WAIT_FREE, - .wait_type_inner = LD_WAIT_CONFIG, /* XXX PREEMPT_RCU ? */ + .wait_type_inner = LD_WAIT_CONFIG, /* PREEMPT_RT implies PREEMPT_RCU */ }; EXPORT_SYMBOL_GPL(rcu_lock_map); @@ -256,7 +256,7 @@ struct lockdep_map rcu_bh_lock_map = { .name = "rcu_read_lock_bh", .key = &rcu_bh_lock_key, .wait_type_outer = LD_WAIT_FREE, - .wait_type_inner = LD_WAIT_CONFIG, /* PREEMPT_LOCK also makes BH preemptible */ + .wait_type_inner = LD_WAIT_CONFIG, /* PREEMPT_RT makes BH preemptible. */ }; EXPORT_SYMBOL_GPL(rcu_bh_lock_map);