Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1641049rwb; Wed, 16 Nov 2022 22:53:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf5hbYTb+38W0KnqgRsxj3TH/9Wrywi00WQtL1+0BxIqzoNM+qM0aGAWucs5Qm3uLiHQb+ZZ X-Received: by 2002:a17:906:14cf:b0:7af:1233:948d with SMTP id y15-20020a17090614cf00b007af1233948dmr937699ejc.698.1668668032944; Wed, 16 Nov 2022 22:53:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668668032; cv=none; d=google.com; s=arc-20160816; b=OydR8Vro6hvJsrEmvsjv0wEP+TvnP2gsHJsbqxRq9hyWzEABtWR0eNge3d65B3u/Z2 I4fwdYQ54RtVbttGPRFv5Eyc107Ud1Z6PZXEMgaSDRGOCAm40xsvYqA6FHkY4lav3Ns+ S+RjTTDLGpxKT1bsTgZNXAaNKL/vQ93k67BNiGuiNFjkcOne+zAybQ3UdmA053vLIwsG d9wrcRP1BC5sfR8VNEousdw/HRZJuWjvhaUnMDdM8x3abCt+oM1iANLO3w1/DyYGkpZt 2u1ZoU5jG4OwSwWxrxs3pXl1D2bONFozYk13667FDSc9O8Qt9xXKURMRS6nl3iItb+8q 5QHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=LP/6K1lml4N3vXaWSTYxi1GhCevRC3sYJCF1PfQA7kA=; b=RxqfApiExpt8NlvAPVBEFXLYOohCgiAZ7deYoGeH9zW4kYfxU2YPLpCBNsCyXGTvM7 88doQaVwb37wMmgaYekUXyjv746Dnzx5887zwh+OTuEmrpTxfQgkPujhnJN15GBXPfDQ KS5xX6OjEBbn07wB0GUcOyV1Tm7bL1Cacg9vZ1Q0poyJcOtWO09GjS4QqMTxX1ddazV9 n2O+2Hrihsj0y9wnc9BMM/t1sFJekc0wBzuUZ8OWItKEeSg+COr+ONW0Ebg+a7xOZM5L rnAzR1U5wv+TdOVObsle5qwckdYpJYb01MEdl6u7rRafu9pE2xgdZVg10CNhewNIaG37 KPeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=c249IZd6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p13-20020a05640210cd00b00461a144e981si197959edu.356.2022.11.16.22.53.32; Wed, 16 Nov 2022 22:53:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=c249IZd6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233725AbiKQG3J (ORCPT + 91 others); Thu, 17 Nov 2022 01:29:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229991AbiKQG3H (ORCPT ); Thu, 17 Nov 2022 01:29:07 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CF1EE022 for ; Wed, 16 Nov 2022 22:29:06 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id C9886B81E98 for ; Thu, 17 Nov 2022 06:29:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 020CEC433D6; Thu, 17 Nov 2022 06:29:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1668666543; bh=2lL2hzaia/cJFGMAWXRGKglaIEpZyNeP9+ahgQNP4kA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=c249IZd66Tr+XAm2SsQCHdhz1pBIhYWCzc81bpqF0pv9NC/oJGCZ/1CwjofM/9N9U yZdZvpQinoxqQ7JUoKuHEGzZrLOlz7vufcjxKkzuKhENk52HDOrr/9ttoLvi6FJpPW rkWtdmUMnQsx26P43tugym2GArfJW2LQmgLG39y4= Date: Thu, 17 Nov 2022 07:29:00 +0100 From: Greg KH To: Jim Cromie Cc: jbaron@akamai.com, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, daniel.vetter@ffwll.ch, seanpaul@chromium.org, robdclark@gmail.com, linux@rasmusvillemoes.dk, joe@perches.com Subject: Re: [PATCH 1/7] drm: mark drm.debug-on-dyndbg as BROKEN for now Message-ID: References: <20220912052852.1123868-1-jim.cromie@gmail.com> <20221111221715.563020-1-jim.cromie@gmail.com> <20221111221715.563020-2-jim.cromie@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221111221715.563020-2-jim.cromie@gmail.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 On Fri, Nov 11, 2022 at 03:17:09PM -0700, Jim Cromie wrote: > drm.debug-on-dyndbg has a regression, due to a chicken-egg > initialization problem: > > 1- modprobe i915 > i915 needs drm.ko, which is loaded 1st > > 2- "modprobe drm drm.debug=0x1ff" (virtual/implied) > drm.debug is set post-initialization, from boot-args etc > > 3- `modprobe i915` finishes > > W/O drm.debug-on-dyndbg that just works, because all drm_dbg* > callsites use drm_debug_enabled() to check __drm_debug & DEM_UT_ > before printing. > > But the whole point of drm.debug-on-dyndbg is to avoid that runtime > test, by enabling (at post-modinit) a static-key at each callsite in > the just-loaded module. > > And since drm.ko is loaded before all dependent modules, none are > "just-loaded", and no drm.debug callsites are present yet, except > those in drm.ko itself. > > Signed-off-by: Jim Cromie > --- > drivers/gpu/drm/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig > index 34f5a092c99e..0d1e59e6bb7e 100644 > --- a/drivers/gpu/drm/Kconfig > +++ b/drivers/gpu/drm/Kconfig > @@ -54,6 +54,7 @@ config DRM_DEBUG_MM > config DRM_USE_DYNAMIC_DEBUG > bool "use dynamic debug to implement drm.debug" > default y > + depends on BROKEN # chicken-egg initial enable problem > depends on DRM > depends on DYNAMIC_DEBUG || DYNAMIC_DEBUG_CORE > depends on JUMP_LABEL > -- > 2.38.1 This should go through the drm tree now. The rest probably should also go that way and not through my tree as well. thanks, greg k-h