From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3EBDC433E0 for ; Tue, 23 Jun 2020 15:01:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CB8CE20702 for ; Tue, 23 Jun 2020 15:01:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732932AbgFWPBI (ORCPT ); Tue, 23 Jun 2020 11:01:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732845AbgFWPBI (ORCPT ); Tue, 23 Jun 2020 11:01:08 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 281BAC061573; Tue, 23 Jun 2020 08:01:08 -0700 (PDT) Received: from [5.158.153.53] (helo=debian-buster-darwi.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1jnkPY-0004DR-Uo; Tue, 23 Jun 2020 17:00:33 +0200 Date: Tue, 23 Jun 2020 17:00:31 +0200 From: "Ahmed S. Darwish" To: Peter Zijlstra Cc: mingo@kernel.org, will@kernel.org, tglx@linutronix.de, x86@kernel.org, linux-kernel@vger.kernel.org, rostedt@goodmis.org, bigeasy@linutronix.de, davem@davemloft.net, sparclinux@vger.kernel.org, mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org, heiko.carstens@de.ibm.com, linux-s390@vger.kernel.org, linux@armlinux.org.uk Subject: Re: [PATCH v4 7/8] lockdep: Change hardirq{s_enabled,_context} to per-cpu variables Message-ID: <20200623150031.GA2986783@debian-buster-darwi.lab.linutronix.de> References: <20200623083645.277342609@infradead.org> <20200623083721.512673481@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200623083721.512673481@infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 23, 2020 at 10:36:52AM +0200, Peter Zijlstra wrote: ... > -#define lockdep_assert_irqs_disabled() do { \ > - WARN_ONCE(debug_locks && !current->lockdep_recursion && \ > - current->hardirqs_enabled, \ > - "IRQs not disabled as expected\n"); \ > - } while (0) > +#define lockdep_assert_irqs_enabled() \ > +do { \ > + WARN_ON_ONCE(debug_locks && !this_cpu_read(hardirqs_enabled)); \ > +} while (0) > Can we add a small comment on top of lockdep_off(), stating that lockdep IRQ tracking will still be kept after a lockdep_off call? thanks, -- Ahmed S. Darwish Linutronix GmbH