Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2187115pxb; Wed, 9 Feb 2022 12:45:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwlIzgdse4x/qd9gpu12ZArzMjNbRSsBJXabhZcjioV5czrZjed+arn4zpguCWJ0ehFgS70 X-Received: by 2002:a63:80c6:: with SMTP id j189mr3415978pgd.314.1644439523644; Wed, 09 Feb 2022 12:45:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644439523; cv=none; d=google.com; s=arc-20160816; b=P1icPLbPNv/+DxissB/PStTF+S2JL5bDqb8lbP7wdkzT7ZKG9iMUJIPYMrMKEWLzRk mrDlTanX6ohHEPgZnPTST/zyGKjMGsxdSxPhYRS4wmiYCfZcHHXIqx3u8sKB/8FX4Lln 6qYGjPMFQ/YIS+rklmD5FJqTuINZSgXtoSL3yA4gzWPUmM8p9B02FqQ4N34+BJArOn2v E+TkFA1hlC298mxiOHiThBNsw/ae9t1QJwkjxwJN+3EuKeWk51W6e3aIZnKQ818ZUz3Q F3pwA1rxIj7jxTNCualF4fhYGHgTOFqkADLJfKRT54rU4UYsejDCf7a3/gvN1W8ViXWz SqyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=Z2TraJDARUY3WXKDZEaeZC1Cg5Xz36jm3AjN1xE8ZI8=; b=CI0zLivEXKBSo0ZWSyNFs66HbnbVbS3sEwBjANOiA21EWd6OQR3jCuQYjmpTCNSpyo YtNlrp/dc/vIBI9VIKxS+yvIgyI1vN9/EktoP8W4bHm8CYDS1MZh0/tYEcOrhXkuw476 j/MA1pu1pcn6rMBMvzHPNvwp/YwPtw8eamUZFWiHQl6+06R56xCW4Q8CU5dYCZEmaEe0 lY91NSQ+glTcuF4DGVqQvYAB9OeyVWdDzUyHMce6cE4beAYo4YdNyaKMXgs+KrUTQszO D/JvRsMZB4vqo3qT3SZaTNRZpm5+MniomtC6nTtSbHP/41phh55gKxpG9GVk8Q2j9oaO yb/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id k71si17327939pga.357.2022.02.09.12.45.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 12:45:23 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B7EE2E0910CF; Wed, 9 Feb 2022 12:11:29 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234996AbiBIT3a (ORCPT + 99 others); Wed, 9 Feb 2022 14:29:30 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:54586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234883AbiBIT3D (ORCPT ); Wed, 9 Feb 2022 14:29:03 -0500 Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91F88C0DE7E2 for ; Wed, 9 Feb 2022 11:29:03 -0800 (PST) Received: by mail-lf1-f46.google.com with SMTP id u6so6195239lfc.3 for ; Wed, 09 Feb 2022 11:29:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Z2TraJDARUY3WXKDZEaeZC1Cg5Xz36jm3AjN1xE8ZI8=; b=Lp4sdJ97My/Y9Ta1fSRoHp6J507Vuc5Vy0rZHOrZxjUYLfHz6HN64dlLooI0IRmUt1 jAyAk3pVE2l4/fWK3EtwJVBVMJAGmHFDLeIwAUKahBjewVMoxxo3tDpM065oKtQklm1c KEeojNSCm5P8OroFRT+5X7T2xlhQAWE1HjHbaiNyFs1c82s0fhwK9FDAPN/JjCoChflM AAGMQIG3Je8HAi9baxNDms9qNmoPu1jvcocX3EngIqW6kelrX/NSa6HZ8wSI9/X5Wq5W jZDezRPK8uriRVvD+O7dj5puL62qSeKYYJW4ll+OkkAhTfPkeI3G2gLa8z+2FewyrpXE 54sw== X-Gm-Message-State: AOAM531J2MSucrVJXmX1odgYRPOyNxbPmgGeByMx+dySlFrqw1Lrj4DN 3aPOLgf5CBmrqi9iuwq8vmTmet7qF/glAsyop3u/8Bt/ X-Received: by 2002:a05:6512:3996:: with SMTP id j22mr1899843lfu.99.1644434941866; Wed, 09 Feb 2022 11:29:01 -0800 (PST) MIME-Version: 1.0 References: <20220208184208.79303-1-namhyung@kernel.org> <20220208184208.79303-6-namhyung@kernel.org> <87y22lp4xx.fsf@intel.com> <87iltonoaa.fsf@intel.com> <20220209112703.1679e48b@gandalf.local.home> In-Reply-To: <20220209112703.1679e48b@gandalf.local.home> From: Namhyung Kim Date: Wed, 9 Feb 2022 11:28:50 -0800 Message-ID: Subject: Re: [PATCH 05/12] drm/i915: Protect lockdep functions with #ifdef To: Steven Rostedt Cc: Jani Nikula , Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng , LKML , Thomas Gleixner , Byungchul Park , Mathieu Desnoyers , Radoslaw Burny , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , intel-gfx@lists.freedesktop.org, "Paul E. McKenney" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hello, On Wed, Feb 9, 2022 at 8:27 AM Steven Rostedt wrote: > > 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. Because work_struct.lockdep_map is there only if CONFIG_LOCKDEP=y. > > 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. Yep, this should be fine if it's actually defined on CONFIG_LOCKDEP=y. Thanks, Namhyung