Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4644400iob; Sun, 8 May 2022 20:24:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOAny+h2GWKEWMGo5q8+dN8gV/686u40f5TVYVy6BJnUYE+rYZ81SJCck3lMuRII+n6RK2 X-Received: by 2002:a17:902:e54b:b0:15e:c88e:b8b with SMTP id n11-20020a170902e54b00b0015ec88e0b8bmr14451389plf.123.1652066645938; Sun, 08 May 2022 20:24:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652066645; cv=none; d=google.com; s=arc-20160816; b=ybj4lJy0pHMVxBvqTVpCcJmoZqD8g6ywRZ/R1Me0i56eA2pDHxbO6GVMbIvQUcCgZS QeV60MDVB8FsPqoaJj8wDr/h1DcqE8yR8IPNoakQMN4WVq2f0wHxasKRvlZHKlxYt4Pe vZ+BIJpApL0Jmid7Z3pbHHVrgjHinNEv18/4dCir39itjV2Zo2NuuoOyQruaE4z5+h/x XgMGyG3W1g4KMqgTBkgZJhbRuzmIN9M/GYGS8yrzV5MDDbAQLW61dQlkJIeRvoXgHnpB 0hEI5Af+A904Ohf6bnubkgFbkXfVoA8lqRd0RkPPLl+Ae2DpPGfj83fIGvfHEfqmsDlp Fmrg== 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=9rB1WWmNCp+YPmwoC5iqUG9hyZFDs2kMIfd1EQHzSi8=; b=Q3JJWzcgxK1SGqYE+4kEMrlazkX5E98LXRZwJb19/YLD4s5GZzYhovAam53RCwa1oa dvLMEST/leBBCJ8zzrvZwkFHiVKwVVICHFMDja8WpB/60PLbtHut/c3Dk3MRfE6IadYC 4kWaz4PcYp+vZXzeJtvq+UkTmOxUDkgZS674CYC65TBN7QGvxCCcCxeAX+/537FSN/bY hznOfuZHG48xm3mO2tR1PFnioFhlOK8o+IKa6bws+w6DQlwxi7rbwNMoVKbtEHpUV+VG cnDP7mYY71GcIyTNNHMDNcxc/LnMy+48eP/DCSEM03OhJPINiojH1ZrQ3hgBj0Z+qCPR yWMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ddliANIB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id g7-20020aa796a7000000b004fe3a6ea856si11898140pfk.176.2022.05.08.20.24.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 20:24:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ddliANIB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 9644FA0BD9; Sun, 8 May 2022 20:23:01 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382751AbiEERn2 (ORCPT + 99 others); Thu, 5 May 2022 13:43:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382358AbiEERnZ (ORCPT ); Thu, 5 May 2022 13:43:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A22AC5A2C8; Thu, 5 May 2022 10:39:45 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 40FD461DC8; Thu, 5 May 2022 17:39:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 926ECC385A4; Thu, 5 May 2022 17:39:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651772384; bh=51RmuxsLCb5IZMOE7TRcGZprdeB6vu+ht+bajlN+wb0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ddliANIBdN9v47GuQ4HXO589wVvW3sKVS/E1qO/5XBne5KQ0d3ZHQ+MiL27yhL1Eo ZcMKlpKdJGij3JYs2tcGsp1GHwOUlaYmVBxKlaupK6ovRnvxmB6M2iD8UkIR+MnbyG i13vPZXKAosK+Qjp8TF5fAfUva0eJeblgAa9IXoA= Date: Wed, 4 May 2022 20:24:00 +0200 From: Greg Kroah-Hartman To: Frank Wunderlich Cc: linux-pm@vger.kernel.org, Frank Wunderlich , "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: <20220504174823.156709-1-linux@fw-web.de> X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DATE_IN_PAST_12_24, 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=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 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. > 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. And don't use a config option for it either, no one will turn it on, it needs to "just work" for all systems. thanks, greg k-h