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 E0230C433EF for ; Fri, 26 Nov 2021 18:27:49 +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: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=zz0dueDXZ0pIdsBT4LyhCxyjM0MbQqbDwzauaZMXQaw=; b=nc7AKuESaj5r4R 8QR8vOjKpkOizVmfB5y2pHMgxzYIoWiidcEzazJn8WM8mzPrI5h8qiQZetfvkY4N/6OsklPo3o6bl enH8AcM/DY7Hq5jmsgWNNZpP04BbwuyPm1L2olpq9k95EGEIzCkaK34jFJHqEj4oO8gS9xWJSbVOI TLkq7FlfbrdeNLZpMKCAi5e+J1wlzHxDQrEhWbMWbA9eTip7jRqDxreOup/hoX+nqqIoUqL3HO//E qLik1pS2wUlONcjoaxrFWVE+DuZ0LR+UjJiNAORaf6aanA5OIhYBA9y4xFDHQ2Y4zuS+3iLFOgooJ 6oulmfzX18/Iq8+0qzzQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqfvb-00BV8p-DD; Fri, 26 Nov 2021 18:26:31 +0000 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqfvW-00BV7u-JW for linux-arm-kernel@lists.infradead.org; Fri, 26 Nov 2021 18:26:28 +0000 Received: by mail-pl1-x62d.google.com with SMTP id v19so7192850plo.7 for ; Fri, 26 Nov 2021 10:26:25 -0800 (PST) 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=IA02OP8nV5q66K7rFx7cxLJqKrV+UsKPC8Pxm2x6rOQ=; b=S1sj54GTYXN4ceQliiiM2ZXwMULfqrt63JmGVwQCR7N8iHwAAeg+3DNCN2/5WnkghC m2hxAwxshA/Z5OTATbk+ULGViCJWXMlAjSMxV+PkxyfX7GNLlLsrD095lh2htSbQIAux e2JeeIL83s1cn48raUfd7dFJMZXz2PqIMZ678IpnApm4KEzQ9+4yc17mr6/r1mkdFiCW +N+fJaMhXfqRI6wUqP7GU73EJql2MhahBKxbXTfFd0hlmWGABm6sdSGDiT72SlJWDq5k VfnfBtq4kZPjq+Lb8qKZmxjRRZtcBf0tbzit5rbtUTB0RHkQVwl9UH81/F8Ml+48d8/x IkVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=IA02OP8nV5q66K7rFx7cxLJqKrV+UsKPC8Pxm2x6rOQ=; b=ZUAkUMC56bNe+ecpRnkZrUy/UfPXwLOYogbA7p/XctVXxj3sv1EAZA4fkOFU9PcI7d Sk+Cb4SUQ5c6kyN30RW5uDBog18/gTRIZygh/VJpAxlHrcz1wBf27GeSJ6sPQyPYcf6J uuShCYJtBA+NrLt3Y/RaX+CJKyyttyf9AL6sxCOD4paQn9vFzNLRFtTKCu5zmezBF22X EJgrqc46whxNkZpaAb/kxgjK5zjUM3amTca7tJhr6OQ0NwyOrhm2UtfWEtarRFoiUuBh yaRYILh5lTT64zqJ9Dd7IuZ4Eqkcp2G7bXUwdT+nesuuA0j1q5ZGGr5T2HK4Zr1lT1zQ qY2Q== X-Gm-Message-State: AOAM5329Fd2G8EcIVMzQeL3SlughVurW/3XCZ4Bhh+cmoBTEpagsCXbt 5tNs+t22vARAYtnATzqAaAXRe8dtyyuyqA== X-Google-Smtp-Source: ABdhPJxHskcC7auYERXQ1PB1BYhL1oMpSZDm1AQlL+ywih1BOKZW3HNFbF5/2AnZs2Xrih9zpNdPbA== X-Received: by 2002:a17:90b:3447:: with SMTP id lj7mr17437981pjb.112.1637951185366; Fri, 26 Nov 2021 10:26:25 -0800 (PST) Received: from p14s (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id g21sm8202885pfc.95.2021.11.26.10.26.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Nov 2021 10:26:24 -0800 (PST) Date: Fri, 26 Nov 2021 11:26:22 -0700 From: Mathieu Poirier To: Mike Leach Cc: linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org, suzuki.poulose@arm.com, leo.yan@linaro.org Subject: Re: [PATCH v3 6/6] Documentation: coresight: Update coresight configuration docs Message-ID: <20211126182622.GB167936@p14s> References: <20211124200038.28662-1-mike.leach@linaro.org> <20211124200038.28662-7-mike.leach@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211124200038.28662-7-mike.leach@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211126_102626_704719_1D9872C2 X-CRM114-Status: GOOD ( 38.35 ) 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 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? 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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel