From patchwork Tue Feb 8 18:42:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 12739200 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 EC5ACC433FE for ; Tue, 8 Feb 2022 18:42:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2648A10E9B1; Tue, 8 Feb 2022 18:42:25 +0000 (UTC) Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1166810E9B1 for ; Tue, 8 Feb 2022 18:42:24 +0000 (UTC) Received: by mail-pl1-x630.google.com with SMTP id w1so112193plb.6 for ; Tue, 08 Feb 2022 10:42:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sJjbNLxKnq2MLHtlOHVGr5cmsCqOoxOU5S439s399rs=; b=mP+JA2jOmXnN0QJajfkIUt/2J+YY274d73Tpsayrg0OPhRz09HHxfcvuU3B3mwiqnY hzY0Lbl2ZeFudSA8gidRqmKkzOBsskPWAA95Zhxz8AtGg7QzLr/mkOq6pIW/roTuds6T RD8W3Hr++o41fiElpLT3ULAynuFkC4d6yBwqaZvLGC9j+mi5ijc3EeXbJLUotnx9rN39 HARmHpca2ynWd/QIQHy20dDcT4nFTlWV+f9iNzfI+mRidIjU2ZEa1iTlRQilY+y877y9 i75AiuaSyy8HT1tgf4RtYq2nyiarZfbhBBea1TzXMYz7ONYn80/FFFIyDt9ns+5pFD0M /PlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=sJjbNLxKnq2MLHtlOHVGr5cmsCqOoxOU5S439s399rs=; b=WvLGiXkpbb5ZStV+mK/ikPf1pD/RmgfZxsxg3wvZ1VfC9ecA/IO9Js6qW/hIArlEUB uysylwrmlsf3qLix4r8Gxf5nEw0Z56thX65ikqKDGMN3RHyZMgIE+tEtj5DbuQFRPtfe JloPYW8STtBvBpjZFhR5Sp8Uw8Qo/mb3J3fmKkaWjb7auzd1UgBIN4Qo7xFPzK0UXgNH 7ROCe29V8EGvQACsU2TcNQ4urt6FePzTpBeHo7q2Hjbu93/potYu+Z3DNJbtvjWGRkLA oTMjtZ8kxCvHfxCcf+oZ+hYMKhUulxYQFfjLljxxWzuOHZOy5DdU5nWEHCGW/UYxi33v WyoQ== X-Gm-Message-State: AOAM532l7v2AZ139zNdgQ1A7ZJrgo52cPszonMb2pkxC+jXUZUcGLF+7 ybAVWst6s6GUq4nYaTBfUf4= X-Google-Smtp-Source: ABdhPJzBjlE3rwJV9oAI24HmL30J4frNkDJPBvRKrr6l9+m4t4xU0yXmOxL4eqLQrp0Uc4O4QKknBA== X-Received: by 2002:a17:902:e74e:: with SMTP id p14mr5639468plf.95.1644345743659; Tue, 08 Feb 2022 10:42:23 -0800 (PST) Received: from balhae.hsd1.ca.comcast.net ([2601:647:4800:c6f0:347f:e607:176:4358]) by smtp.gmail.com with ESMTPSA id l14sm3517027pjf.1.2022.02.08.10.42.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 10:42:23 -0800 (PST) From: Namhyung Kim To: Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng Date: Tue, 8 Feb 2022 10:42:01 -0800 Message-Id: <20220208184208.79303-6-namhyung@kernel.org> X-Mailer: git-send-email 2.35.0.263.gb82422642f-goog In-Reply-To: <20220208184208.79303-1-namhyung@kernel.org> References: <20220208184208.79303-1-namhyung@kernel.org> MIME-Version: 1.0 Subject: [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: intel-gfx@lists.freedesktop.org, LKML , Steven Rostedt , Radoslaw Burny , Byungchul Park , "Paul E. McKenney" , Mathieu Desnoyers , Thomas Gleixner Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" With upcoming lock tracepoints config, it'd define some of lockdep functions without enabling CONFIG_LOCKDEP actually. The existing code assumes those functions will be removed by the preprocessor but it's not the case anymore. Let's protect the code with #ifdef's explicitly. Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Namhyung Kim --- drivers/gpu/drm/i915/intel_wakeref.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_wakeref.c b/drivers/gpu/drm/i915/intel_wakeref.c index dfd87d082218..6e4b8d036283 100644 --- a/drivers/gpu/drm/i915/intel_wakeref.c +++ b/drivers/gpu/drm/i915/intel_wakeref.c @@ -106,8 +106,11 @@ void __intel_wakeref_init(struct intel_wakeref *wf, wf->wakeref = 0; INIT_DELAYED_WORK(&wf->work, __intel_wakeref_put_work); + +#ifdef CONFIG_LOCKDEP lockdep_init_map(&wf->work.work.lockdep_map, "wakeref.work", &key->work, 0); +#endif } int intel_wakeref_wait_for_idle(struct intel_wakeref *wf)