Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5CC20C433EF for ; Wed, 9 Feb 2022 16:27:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DBCB610E315; Wed, 9 Feb 2022 16:27:07 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id 03D5A10E315 for ; Wed, 9 Feb 2022 16:27:07 +0000 (UTC) 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 78B6661716; Wed, 9 Feb 2022 16:27:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87F0EC340E7; Wed, 9 Feb 2022 16:27:04 +0000 (UTC) Date: Wed, 9 Feb 2022 11:27:03 -0500 From: Steven Rostedt To: Jani Nikula Message-ID: <20220209112703.1679e48b@gandalf.local.home> In-Reply-To: <87iltonoaa.fsf@intel.com> References: <20220208184208.79303-1-namhyung@kernel.org> <20220208184208.79303-6-namhyung@kernel.org> <87y22lp4xx.fsf@intel.com> <87iltonoaa.fsf@intel.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Intel-gfx] [PATCH 05/12] drm/i915: Protect lockdep functions with #ifdef X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: paulmck@kernel.org, intel-gfx@lists.freedesktop.org, Peter Zijlstra , Boqun Feng , LKML , Radoslaw Burny , Byungchul Park , Mathieu Desnoyers , Waiman Long , Namhyung Kim , Thomas Gleixner , Will Deacon , Ingo Molnar Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Wed, 09 Feb 2022 15:49:01 +0200 Jani Nikula wrote: > > Because I want to use the lockdep annotation for other purposes. > > But the workqueue lockdep_map was defined under LOCKDEP > > only. Please see the description in the cover letter. > > > > https://lore.kernel.org/all/20220208184208.79303-1-namhyung@kernel.org/ > > So lockdep_init_map() might still be there and build just fine for > CONFIG_LOCKDEP=n, but now we're actually required to wrap all call sites > in #ifdefs depending on the purpose? I'm not convinced yet. I addressed this already. I suggested to add a "raw" variant that turns to a nop when LOCKDEP is not enabled. That is, for those locations that are only for working with LOCKDEP, the call will be: lockdep_init_map_raw() This will differentiate the locations that are for just lockdep and those that are for both lockdep and tracing. -- Steve