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 4E5ACC433F5 for ; Mon, 6 Sep 2021 15:39:40 +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 0DD1460698 for ; Mon, 6 Sep 2021 15:39:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0DD1460698 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=v4pHjWLdzU8KL2N8dQqhMwapo3syMR0QHoeW4B/bzS4=; b=ySE+ZeFo8N90yo gSEIM2I9v/q/uk/Sp+pymOh9Z1T+DZw4hq6eAeWDxcNhKlmaxiO+ADyGW8XB4GGvo8H2WdZZk3i9m TkmEUhGGjItVkzLCiavSM/WzgiRWdvff9Oucx1FU8EtWgrHFAzzA/IGbFQz6z24nKBqpinZElNExJ zKemARbP2jqUQcB6aWI0SlV2gXO+4+hMOO8uUbQZpSHFrgGmhkLMnFkq1rd4eyxRemh8Tf6xKjFRT bbYSwIgjioczyYHMbBu+zoSmzkYFZQefF8F/FDzGt3RgA5ht3Aj/BjUe72Sm93ASSAhJtpkf3aHZK MqxfiMqHpk3Ml42o/rqw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mNGgn-001EIu-BZ; Mon, 06 Sep 2021 15:37:41 +0000 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mNGgj-001EIM-6E for linux-arm-kernel@lists.infradead.org; Mon, 06 Sep 2021 15:37:38 +0000 Received: by mail-pj1-x1032.google.com with SMTP id ot2-20020a17090b3b4200b0019127f8ed87so157565pjb.1 for ; Mon, 06 Sep 2021 08:37:33 -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=EgjZqYtbAjQybf0FiR3jfzwWnoQOjy/QCj2+jtWcOhQ=; b=fW/yrbJWXEF8BNtyC21n5Xx55xzQ/RBdn/T08eWb38C90PPnjTx95H9rj0kMBu5mus XRbeYBnolP0To/STHqnTjN/Ihubr/5m5XQu+VxgBP/9EsDq1zFQKacrKhDOMrY+rd2nY osD0OSqsNBAzk1QlK+/ILFyj0doLjDCgSdA+7ntp9Hh767rqQ5gJZ6EJHJyOA7c/eoZo RHWQSPSF1OPSVckzhjtXEEB3nfYnKxivAXfew1cxyPAhhB/z0gT7NOAxYD4pQAk4OIT/ n9EgkqE7AWPQBSZXjQ4giY2be1DmyCgDICV9n05csVd8wn89byLSSNUHNuDTERu2XRPt BavA== 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=EgjZqYtbAjQybf0FiR3jfzwWnoQOjy/QCj2+jtWcOhQ=; b=ogRC37bB4myma9UdEMtaXV1dsSnNbyhVhnbsBezdTPlExLQuurP57n9uwuhkPWBQYd vvaCliVOhcYmM/F9nxTu4qxqRzeuabhSB8O7CZaTkesBERbTbHsxhVLYRWI3/0JKWgQo di1Ut19v3itQgyB5BtMeJGKpUrELGVagHBWomy32gboRkH6Pq1I01PGrF4uMPGek1Aph LrkNAhIz7bLIJ99PB5f8MQb+5DqZw7WMcCStQp5rdW5H2qaGSI3106Jw4ZqSuk5r1E89 /pfauqN+BwC+to8vxKfM2jfGZwH8pXD3XVYrvJ6+xLeX4gY+tS/q0ILZbl9sA0l3YVaJ 8Hww== X-Gm-Message-State: AOAM533TKQ3ERAV/JyUzejpbrzb+sj+KK63gKnCNE+TlXoZP8h93nLBe Zfcp63EfbSDDWrBL5tZWo6VGcJVZyM6/zw== X-Google-Smtp-Source: ABdhPJzzPqszgGttLXpvxN/HeZUksi77ohZQH4hWeR9s38MZ+z/8kKRQErgVfOv6IUYbWEpWcelnsA== X-Received: by 2002:a17:90a:49:: with SMTP id 9mr14800601pjb.80.1630942653471; Mon, 06 Sep 2021 08:37:33 -0700 (PDT) Received: from p14s (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id z65sm8214649pjj.43.2021.09.06.08.37.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Sep 2021 08:37:32 -0700 (PDT) Date: Mon, 6 Sep 2021 09:37:30 -0600 From: Mathieu Poirier To: Brian Norris Cc: Leo Yan , 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: <20210906153730.GB1228692@p14s> 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-20210906_083737_322697_53D0724C X-CRM114-Status: GOOD ( 26.10 ) 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 Hi Brian, 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 > --- > > drivers/hwtracing/coresight/Kconfig | 13 +++++++++++++ > drivers/hwtracing/coresight/coresight-cpu-debug.c | 2 +- > 2 files changed, 14 insertions(+), 1 deletion(-) > I have applied this patch to my local tree. I will make that tree public when next week when 5.15-rc1 has been released. Thanks, Mathieu > 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