Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4646186iob; Sun, 8 May 2022 20:28:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdaIR9zIyrepoG1Q1ofQDHl3vWQorQPaWhQO7FqXl84R5P+ouqTzVs0cE2o2wCCJxMWIhd X-Received: by 2002:a17:903:40c5:b0:15e:c7e9:8ae8 with SMTP id t5-20020a17090340c500b0015ec7e98ae8mr14123831pld.151.1652066892148; Sun, 08 May 2022 20:28:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652066892; cv=none; d=google.com; s=arc-20160816; b=T9mKn8VWchwQSNf7fc5Di8q/WCOt8P0iC6rCFtZgqQhnQd5rCQWeBNr0zVGIipDZcq 0g+rYJ8ecxx9/JfvZucrvCJetbnqtm5YmtDmR2hkrmY6lEex8y3DIUrFmyy2Hkbeku18 EjjHV4uV84ueNyIN0YwFLHbwN6r+hoen4yKNoD75olK99MJSLqDGYtW+JhKFihQS6EFz 9ivagbzogcbuvLDswjm/Ji2Zs6/bGn8k2ys47kOHd7SBO0GozxAJwSeds5aDC263UtMI i5/sO/YI/Niq2m+57eRWXij4VbMdYpvdt+4TpGXBARW+8uE9qGX3amqssC4JheN/duas lkvA== 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=uh5v14EBZI3R5ixWPV9yVvpd+MhjlkoyPx7uaKsJmL4=; b=dvP5iyGhkHHTw9RELltttL5M4781JXPSjLIBqC5ehuS2e5f+7nwzJeK3+fqrvVd+8o iTI70ChvnDg5MvSC35HkelCv5AA5IGiRLvEkNKgI3JMumZmHULFfMrMwVpmyMHP7JYPr gdBrwnHPeeJtHRWTBeo8m/GBkHFD/sRl7DeWGf7UicI40MHNWJ33KhBeXGpxFCpIwpu5 Vn6Dgd/fgt8+DOqCs3snLohi9BJ3kTfia5Pmypb3PN9Ea3lIXd/TH75SrOQfZf2S2Gd6 fC2JfdP+vihkpB2DWBpn9QAWhwFtLA1lbKIY/8mYFN1Cd4PnlEKtXmiYn3cI1wxLhp+s MGPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kqo51bgw; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h29-20020a63385d000000b003822d0bffa5si13322827pgn.27.2022.05.08.20.28.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 20:28:12 -0700 (PDT) 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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kqo51bgw; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BF6AD81FE1; Sun, 8 May 2022 20:26:15 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382947AbiEESBZ (ORCPT + 99 others); Thu, 5 May 2022 14:01:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382941AbiEESBW (ORCPT ); Thu, 5 May 2022 14:01:22 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9E7611C36; Thu, 5 May 2022 10:57:41 -0700 (PDT) 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 sin.source.kernel.org (Postfix) with ESMTPS id 416F7CE2F54; Thu, 5 May 2022 17:57:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 39AD6C385A8; Thu, 5 May 2022 17:57:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651773458; bh=CXgvnZVu0rwEM0ACvUhkHVFy8LvlpA+vkKO1Hu87/OY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kqo51bgwhbaxDJ2jGEqRneRMCLEY6acJI2GErjjdVUF9aBaJxGCug2WFcGraBKuei Hsdr2h9XW580LBQ80eUepJUXEexRuaPRWiRbOqyHd9iZavkcQgnqfjSz52uIVmg11t rLJ7JVRCuXahgxMzyFsq8Pz9b/LZAoEvZGuZyVRs= Date: Thu, 5 May 2022 19:57:37 +0200 From: Greg Kroah-Hartman To: Frank Wunderlich Cc: Frank Wunderlich , linux-pm@vger.kernel.org, "Rafael J. Wysocki" , Viresh Kumar , Nishanth Menon , Stephen Boyd , linux-kernel@vger.kernel.org Subject: Re: [RFC v1] opp: add config option for debug Message-ID: References: <20220504174823.156709-1-linux@fw-web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Thu, May 05, 2022 at 07:50:56PM +0200, Frank Wunderlich wrote: > Hi, > > Am 4. Mai 2022 20:24:00 MESZ schrieb Greg Kroah-Hartman : > >On Wed, May 04, 2022 at 07:48:23PM +0200, Frank Wunderlich wrote: > >> From: Frank Wunderlich > >> > >> Currently OPP debug is enabled by DEBUG_DRIVER option. This is > >generic > >> driver debug and opp floods serial console. This is annoying if opp > >is > >> not needed so give it an additional config-key. > >> > >> Signed-off-by: Frank Wunderlich > >> --- > >> drivers/base/Kconfig | 1 + > >> drivers/opp/Kconfig | 7 +++++++ > >> drivers/opp/Makefile | 2 +- > >> 3 files changed, 9 insertions(+), 1 deletion(-) > >> > >> diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig > >> index 6f04b831a5c0..8ae826c95d5f 100644 > >> --- a/drivers/base/Kconfig > >> +++ b/drivers/base/Kconfig > >> @@ -130,6 +130,7 @@ config DEV_COREDUMP > >> config DEBUG_DRIVER > >> bool "Driver Core verbose debug messages" > >> depends on DEBUG_KERNEL > >> + imply DEBUG_OPP > > > >This should not be needed, otherwise we would have to do that for all > >random driver subsystem in the kernel. > > Have added this to have same behaviour if anyone sets DEBUG_DRIVER via defconfig. Else this is disabled by default. > > >> help > >> Say Y here if you want the Driver core to produce a bunch of > >> debug messages to the system log. Select this if you are having a > >> diff --git a/drivers/opp/Kconfig b/drivers/opp/Kconfig > >> index e8ce47b32735..6a2d2c6c1143 100644 > >> --- a/drivers/opp/Kconfig > >> +++ b/drivers/opp/Kconfig > >> @@ -12,3 +12,10 @@ config PM_OPP > >> representing individual voltage domains and provides SOC > >> implementations a ready to use framework to manage OPPs. > >> For more information, read > >> + > >> +menu "Operating Performance Points (OPP)" > >> +config DEBUG_OPP > >> + bool "Debug Operating Performance Points" > >> + help > >> + enable opp debugging > >> +endmenu > >> diff --git a/drivers/opp/Makefile b/drivers/opp/Makefile > >> index f65ed5985bb4..2589915eef95 100644 > >> --- a/drivers/opp/Makefile > >> +++ b/drivers/opp/Makefile > >> @@ -1,5 +1,5 @@ > >> # SPDX-License-Identifier: GPL-2.0-only > >> -ccflags-$(CONFIG_DEBUG_DRIVER) := -DDEBUG > >> +ccflags-$(CONFIG_DEBUG_OPP) := -DDEBUG > > > >This feels wrong, you shouldn't need a -DDEBUG for anything if all is > >going correctly. Why is opp so odd this way? Just use the normal > >dev_dbg() macros and all will be fine, nothing special should be needed > >at all. > > I have looked more into it,just wanted to get driver debug (probing/binding) and dev_dbg messages without the opp spam (floods serial console). > > >And don't use a config option for it either, no one will turn it on, it > >needs to "just work" for all systems. > > Config option is to enable if needed and not via driver-debug. Please do not do that, you should never need subsystem/driver Kconfig options like this. Distros will never enable them and you can't ask a user to rebuild their kernel easily. Just rely on the same infrastructure like all other subsystems do please. thanks, greg k-h