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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 3037CC433F5 for ; Mon, 29 Nov 2021 11:56:15 +0000 (UTC) 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:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/qRiNqQCbK9EeqOf8vztB/Td5BIRGapeZfLRjjGPx5Q=; b=BFCBUcnbGxe1VH u6FaVggsPmoYo7URbv4FFlPjZbtXifS7bsqzgZds8pys9ixjnKbxjkVmuhZ1gyAwKynq80C7dXOSY yofxQ8NbNirDKQiFG3z+Ku9h386pHKHZS9icWNC5uTleLTMweb/tdaiujBAsZVkG6GLT4lEi+Mb48 7ob7JG9cJPnXz8hI/K4Is9jBhZjuIDROWBqZxmNhXr6qa3aia4JFJPnGJSs38Ab50ePyv2VLX70Vz q5n1NU6ICGjOhh1EfGy4jpgW5/XAoFkLZqMymfL81TvAjxjUart3Bpyj+KBoFDXMGWdY0Idynzu8l SXsLm30GBTm1SMIvFG1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrfFF-000b1I-0T; Mon, 29 Nov 2021 11:54:53 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrfFA-000axG-AV for linux-arm-kernel@lists.infradead.org; Mon, 29 Nov 2021 11:54:49 +0000 Received: by mail-wm1-x32f.google.com with SMTP id 137so14369262wma.1 for ; Mon, 29 Nov 2021 03:54:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=f2rvNTqUm3KjSRJpsVy2oJcKp+8ep4kxztNJrrWe5H4=; b=tknkyhxO+86ensbXt9TjiPxEsqDY2DV/W3NJhDnrdHAe9q1+rOPTu+oO2ggKdnMYkF GqDfQuKUD34/TZR5K1QiW6bleQAZwGpbo8sIKeAjRO+O99gb/2ECp0yCk+RpLXPsau5C EYejC5IZeW5oNA54ajo7FhqHXfYIJfjiNU4JOcsavj5wTLTIBMl1gVY/9Yu22WDCxiyy Ctp8sDlK6OXqu+UshPSKtODHSXjs76YRPRt9Gqo9fkqkCQK8nJRxISpSXCLrkjn6bI6L J+xhzgvKkKpxrTYL3LoRpnZJibeX3slDrQL//u1GZXM+wumgz3bKYSfP1uKjNq77SmLa GHVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=f2rvNTqUm3KjSRJpsVy2oJcKp+8ep4kxztNJrrWe5H4=; b=oWyX9Ddwpt1mgKFu/70BACJw7IKBopDJ/mzzMn6FTxXWxYG3n9P2rai/zoUmGM51fq hboBDoNcP2dKsVVa7he3PeQUaPgf2mD1/YdQFWiOWnk/X1QSQL+IF/epWkRQjnIOtWgd o+H2Z6PusMV0AlGH2ni/EuCQG4oo6z1S3kSVg6Uw5zMqej7z6v9DW/cjlZHdLLaYfaAX 6cm+cp7vUm91cgYA9Jbcx3FKSrXB8nyT31ECi+CevpKIAgOJT/f+U/Vl74vBqGzGe1LM wv489C8oBv9LQmspi5UKeJib+kTOg1A3lRpeue9zC+RYOU1HlKTIljuSOmRnMPuWpfl/ oqZg== X-Gm-Message-State: AOAM531DxL/dPo6Og5KugNIGHo3o+iSucop7278ACcyUI5pqG8Bj3jtP MRwE4ZhCjW9buzaVeXaAs6AdUnAkYwSa+/Oc6YyT6g== X-Google-Smtp-Source: ABdhPJz45UiNeP2yxDl6KvF/qzhVG685UiWfl8ntswVIgdS9DgYjsQVyfFcCPT5A57sMRmNuKx5xFVFr9FR97FSqOuo= X-Received: by 2002:a05:600c:4f87:: with SMTP id n7mr36156244wmq.63.1638186885965; Mon, 29 Nov 2021 03:54:45 -0800 (PST) MIME-Version: 1.0 References: <20211124200038.28662-1-mike.leach@linaro.org> <20211124200038.28662-7-mike.leach@linaro.org> <20211126182622.GB167936@p14s> In-Reply-To: <20211126182622.GB167936@p14s> From: Mike Leach Date: Mon, 29 Nov 2021 11:54:35 +0000 Message-ID: Subject: Re: [PATCH v3 6/6] Documentation: coresight: Update coresight configuration docs To: Mathieu Poirier Cc: linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org, suzuki.poulose@arm.com, leo.yan@linaro.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211129_035448_391725_05FDDB3B X-CRM114-Status: GOOD ( 42.59 ) 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 Mathieu, On Fri, 26 Nov 2021 at 18:26, Mathieu Poirier wrote: > > On Wed, Nov 24, 2021 at 08:00:38PM +0000, Mike Leach wrote: > > Update the CoreSight System Configuration document to cover the > > use of loadable modules to add configurations and features > > to the system. > > > > Signed-off-by: Mike Leach > > --- > > .../trace/coresight/coresight-config.rst | 62 ++++++++++++++++++- > > 1 file changed, 59 insertions(+), 3 deletions(-) > > > > diff --git a/Documentation/trace/coresight/coresight-config.rst b/Documentation/trace/coresight/coresight-config.rst > > index 6ed13398ca2c..6d5ffa6f7347 100644 > > --- a/Documentation/trace/coresight/coresight-config.rst > > +++ b/Documentation/trace/coresight/coresight-config.rst > > @@ -155,14 +155,14 @@ follows:: > > autofdo > > $ cd autofdo/ > > $ ls > > - description preset1 preset3 preset5 preset7 preset9 > > - feature_refs preset2 preset4 preset6 preset8 > > + description feature_refs preset1 preset3 preset5 preset7 preset9 > > + enable preset preset2 preset4 preset6 preset8 > > $ cat description > > Setup ETMs with strobing for autofdo > > $ cat feature_refs > > strobing > > > > -Each preset declared has a preset subdirectory declared. The values for > > +Each preset declared has a 'preset' subdirectory declared. The values for > > the preset can be examined:: > > > > $ cat preset1/values > > @@ -170,6 +170,9 @@ the preset can be examined:: > > $ cat preset2/values > > strobing.window = 0x1388 strobing.period = 0x4 > > > > +The 'enable' and 'preset' files allow the control of a configuration when > > +using CoreSight with sysfs. > > + > > The features referenced by the configuration can be examined in the features > > directory:: > > > > @@ -236,3 +239,56 @@ A preset to override the current parameter values can also be selected:: > > > > When configurations are selected in this way, then the trace sink used is > > automatically selected. > > + > > +Using Configurations in sysfs > > +============================= > > + > > +Coresight can be controlled using sysfs. When this is in use then a configuration > > +can be made active for the devices that are used in the sysfs session. > > + > > +In a configuration there are 'enable' and 'preset' files. > > + > > +To enable a configuration for use with sysfs:: > > + > > + $ cd configurations/autofdo > > + $ echo 1 > enable > > + > > +This will then use any default parameter values in the features - which can be > > +adjusted as described above. > > + > > +To use a preset set of parameter values:: > > + > > + $ echo 3 > preset > > + > > +This will select preset3 for the configuration. > > +The valid values for preset are 0 - to deselect presets, and any value of > > + where a preset sub-directory is present. > > + > > +Note that the active sysfs configuration is a global parameter, therefore > > +only a single configuration can be active for sysfs at any one time. > > +Attempting to enable a second configuration will result in an error. > > +Additionally, attempting to disable the configuration while in use will > > +also result in an error. > > + > > +The use of the active configuration by sysfs is independent of the configuration > > +used in perf. > > + > > Shouldn't all instances in the above section be configfs rather than sysfs? If > so should I make the changes? > What I am trying to explain there is that when using sysfs to control CoreSight, it is possible to set a configuration using configfs, which is then used when a tracer is enabled under sysfs. Mike > I have your patchset on stanby in my local coresight-next tree - just let me > know. > > Thanks, > Mathieu > > > + > > +Creating and Loading Custom Configurations > > +========================================== > > + > > +Custom configurations and / or features can be dynamically loaded into the > > +system by using a loadable module. > > + > > +An example of a custom configuration is found in ./samples/coresight. > > + > > +This creates a new configuration that uses the existing built in > > +strobing feature, but provides a different set of presets. > > + > > +When the module is loaded, then the configuration appears in the configfs > > +file system and is selectable in the same way as the built in configuration > > +described above. > > + > > +Configurations can use previously loaded features. The system will ensure > > +that it is not possible to unload a feature that is currently in use, by > > +enforcing the unload order as the strict reverse of the load order. > > -- > > 2.17.1 > > -- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel