From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26DABC433EF for ; Sat, 4 Sep 2021 02:33:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D7D5460F90 for ; Sat, 4 Sep 2021 02:33:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D7D5460F90 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=B0pJ6tMf7E3hb4wwiuJqjF2A2hkLoISIx1KWdSxX4TQ=; b=lGYuPd8CX7paCB inwzITzpSyL/F5d2D7ijXUTnslkgdIfcxeDDLIEdYccc1jAIQrEav0lH9XZ2osj6jufvi9pc8cZBZ vtEQiIkXm7oZfRN23nvnVxEmybWBnguTD4H3IfYHknn0PRGTje7iAdsCqgkres++bcwEsNJu2ZQr4 L+XmsOSEmFLLjI+tWQhynTOYI0tJoYd2rYfKI1098W4hGThqk6uLko7TKPC1/1RB0QPfBoFrDOav9 X551Agz0eXNAUjGIY0hCn6VJfLy66KanFbP4OF0mdvsfDyWiRbUPtoRl+iFGwKqcgls6QMTRhR1u9 8q5Uo2P5rzGamZssAryA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mMLSq-00DPfD-81; Sat, 04 Sep 2021 02:31:28 +0000 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mMLSl-00DPe4-9Y for linux-arm-kernel@lists.infradead.org; Sat, 04 Sep 2021 02:31:25 +0000 Received: by mail-pf1-x430.google.com with SMTP id x7so15715pfa.8 for ; Fri, 03 Sep 2021 19:31:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=OyXn9whqgoBPI+82Ub9Acbq8v9c7Sx+Dk/WDUp7VoDs=; b=fA+bgyEZn/RACKE+b07YTN+d0MxIb0VABaY4rEP/etKiVJ9ivQMNdMr47CifJ+6xt3 UIJKC2UuSffSt5SKsR6LAMZQ8Pw6UE0IFxrY/r2MIjSLPe3KhExABb3yHtYwUqDCQ0N0 o+2mMZRwLUKdEmRe9DIcDBPzs6hpzlzuG/4X1gxzrbeoyJS7xz/gU6Cl9+1Erd5yaFrZ sXl9q5Thz88a2+3Q3vmB3P2ebk0qArtzOhWASx0rdWhsHS17OwkcmgKqqRF+UCLGVs5m Epf3Hylx/lE3Qe9yk6UOEOIRoOJE0EoGHIsZpjH7PB4cJU5BLWDdc+um4y/b0wrDQJQF fTKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=OyXn9whqgoBPI+82Ub9Acbq8v9c7Sx+Dk/WDUp7VoDs=; b=sz3X88L7K/brGXQAcCvAFBCCNp/M1HGLw5EGUQnbZAg1Dy7+lua+n551ElxHdmnO+q SOOt+TMQTLxsF4EbqGpFShaJl+sC6hGf6bOrrLiWo9PoYN50rLt9/HdoDLoTBhBw5FWb x5ytl08lS+F2bXm7BmnJb6aGQBHkAMBQYcq3hjCNKIoIYDvrlSGZ0WX55uFgLTky257N 9Lp/neoOrjRF+PorjD++kb2GQxJeUEB+CFxVt27dErlBrslFJFbqK43T4NK6AjXnzMyC qPYVF1p0anJBSHZRwJMp+sQWLKleC/1WT48DBBDPhO44CKZ7IizmK/6g413Rad0SBLPb oeZg== X-Gm-Message-State: AOAM532gZ/d920h1i4vefF6oQ+/D6AUeAtCMbFhPTvJL4jsWmV033k6i cvOmdRoQTm7ee1MHfurCoaJvww== X-Google-Smtp-Source: ABdhPJz+YZM973P2EOVFVwPN03rsfV4bZgWNFBlEKnp5ptr8wgE76WeECaEKGKnrqEyblMHcUvPMpg== X-Received: by 2002:a05:6a00:244f:b0:404:fa55:c1a with SMTP id d15-20020a056a00244f00b00404fa550c1amr6022233pfj.42.1630722681294; Fri, 03 Sep 2021 19:31:21 -0700 (PDT) Received: from leoy-ThinkPad-X240s ([213.173.35.225]) by smtp.gmail.com with ESMTPSA id z24sm582561pfj.88.2021.09.03.19.31.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 19:31:20 -0700 (PDT) Date: Sat, 4 Sep 2021 10:31:16 +0800 From: Leo Yan To: Brian Norris Cc: Mathieu Poirier , Mike Leach , Suzuki K Poulose , coresight@lists.linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] coresight: cpu-debug: control default behavior via Kconfig Message-ID: <20210904023116.GK303522@leoy-ThinkPad-X240s> References: <20210903182839.1.I20856983f2841b78936134dcf9cdf6ecafe632b9@changeid> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210903182839.1.I20856983f2841b78936134dcf9cdf6ecafe632b9@changeid> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210903_193123_413952_C96A8975 X-CRM114-Status: GOOD ( 25.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Sep 03, 2021 at 06:28:54PM -0700, Brian Norris wrote: > Debugfs is nice and so are module parameters, but > * debugfs doesn't take effect early (e.g., if drivers are locking up > before user space gets anywhere) > * module parameters either add a lot to the kernel command line, or > else take effect late as well (if you build =m and configure in > /etc/modprobe.d/) > > So in the same spirit as these > CONFIG_PANIC_ON_OOPS (also available via cmdline or modparam) > CONFIG_INTEL_IOMMU_DEFAULT_ON (also available via cmdline) > add a new Kconfig option. > > Module parameters and debugfs can still override. > > Signed-off-by: Brian Norris Thanks for the patch, looks good to me: Reviewed-by: Leo Yan > --- > > drivers/hwtracing/coresight/Kconfig | 13 +++++++++++++ > drivers/hwtracing/coresight/coresight-cpu-debug.c | 2 +- > 2 files changed, 14 insertions(+), 1 deletion(-) > > diff --git a/drivers/hwtracing/coresight/Kconfig b/drivers/hwtracing/coresight/Kconfig > index f026e5c0e777..8b638eb3cb7d 100644 > --- a/drivers/hwtracing/coresight/Kconfig > +++ b/drivers/hwtracing/coresight/Kconfig > @@ -150,6 +150,19 @@ config CORESIGHT_CPU_DEBUG > To compile this driver as a module, choose M here: the > module will be called coresight-cpu-debug. > > +config CORESIGHT_CPU_DEBUG_DEFAULT_ON > + bool "Enable CoreSight CPU Debug by default > + depends on CORESIGHT_CPU_DEBUG > + help > + Say Y here to enable the CoreSight Debug panic-debug by default. This > + can also be enabled via debugfs, but this ensures the debug feature > + is enabled as early as possible. > + > + Has the same effect as setting coresight_cpu_debug.enable=1 on the > + kernel command line. > + > + Say N if unsure. > + > config CORESIGHT_CTI > tristate "CoreSight Cross Trigger Interface (CTI) driver" > depends on ARM || ARM64 > diff --git a/drivers/hwtracing/coresight/coresight-cpu-debug.c b/drivers/hwtracing/coresight/coresight-cpu-debug.c > index 00de46565bc4..8845ec4b4402 100644 > --- a/drivers/hwtracing/coresight/coresight-cpu-debug.c > +++ b/drivers/hwtracing/coresight/coresight-cpu-debug.c > @@ -105,7 +105,7 @@ static DEFINE_PER_CPU(struct debug_drvdata *, debug_drvdata); > static int debug_count; > static struct dentry *debug_debugfs_dir; > > -static bool debug_enable; > +static bool debug_enable = IS_ENABLED(CONFIG_CORESIGHT_CPU_DEBUG_DEFAULT_ON); > module_param_named(enable, debug_enable, bool, 0600); > MODULE_PARM_DESC(enable, "Control to enable coresight CPU debug functionality"); > > -- > 2.33.0.153.gba50c8fa24-goog > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel