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 9106EC433EF for ; Wed, 24 Nov 2021 20:03:46 +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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iL5de7XmvRXUD7hORZtPChIExEAfgiOj6laNNLAK4kQ=; b=l/jeyXgBWsrt+9 qigNDGZx6CiHLF3NoYGsooYxWabQOzXKWf+JhE5WoeBZr5TnJ9rqKSh+JgFBNvkjUSRqsHF8K6Bw4 93gefhaSsvLoVNe28Oj+LwQaXW7sJQHb2QPAJ4Zp1WD9aVa8+PJ/L8CxAbX7DGQ+S+jJ3FAeB7SwZ QhNpJmwQbuJwuHCvTmKQa3v52CRblr9r7z3c52rxmvr80WNt+09VE7i7T08o5DIm4m+Ju6RX3a1NQ dXTbfeybv+GQyIyN5WzzJ6CQFWN3UPnm8ZkdD6gMnNvrLXXi9Kr1VZOXMu2sf4clTXV7y4fSaaEA4 vg6PRt1BKmyinO8/BmHA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpyT5-005jvR-RH; Wed, 24 Nov 2021 20:02:12 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpyRl-005jT0-NJ for linux-arm-kernel@lists.infradead.org; Wed, 24 Nov 2021 20:00:52 +0000 Received: by mail-wm1-x336.google.com with SMTP id j140-20020a1c2392000000b003399ae48f58so6444072wmj.5 for ; Wed, 24 Nov 2021 12:00:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wJfVGZzQLso7lttF1OkAKPmF7sFEmS3QY5IfzFqTl80=; b=Q8C6b2in2y0TplqUokPPUPniD/OFRDTqy0ue4ewaFjH7VNc7HoQ/Qpl8dMrQ7JP+d/ e8fh3bNt/G19MwTihfxYEfzIF5OW6H2Iavu4AdyJ9hgInXfFI4WmPX5oo1nboHYnvwXI kvDxvNiZfj1+GThfzaqlXi4pkWu2gQGEkOlUAehI4GuVeTIIBeBJhkg+0Fw7YbP1Eg+l mdqN0SanOlxIjEOJMA//nTlednxSR/sJv4wF8PkeKepwvXNYkBMnvZv+jixg9hoildGW YbSBQhBgQouWNbX9Bz6w9vmcs1S9E2hDiYctd7VyEyhvS1ZLK4B+xotemYUJ7+893oGn syqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wJfVGZzQLso7lttF1OkAKPmF7sFEmS3QY5IfzFqTl80=; b=dMkB94CVIWRnfo5BNdMOOZC4elJNTRflihaxLq/dE0kg4DzwauBV8NrMDIRnydRD/Y 7uKCzXlh8bpup/oYcDg18qASUgCXmHJT0dNnDV93GoRlFT9hts2a1QZnJxk6Xtg7S7qh aH7Xm+GE8QQYuhrBQlyZBALixLwVmT/o+Cjo1PYHsnS1W5e9Qq/C7MiU737mNzzcGfLp ONK0vLWWgSsK/W4LGgh9dw/caSsI65PIAEPaAEfJiZyJxSGTxK8dY1A7k2i0bEj1ZFOa YwFJM6irJXBKT6ZEc9TsKO0AdMLgE4sQMsW15gVieAMk8VkWrAJ63bFFCdTqgSAbzj24 NS6Q== X-Gm-Message-State: AOAM532f0rki42oQ8wB6WVL/4ziXvpo52bvkKMwiaOmu2/hsHloPPoj7 a0nPUx3bEVl0Y2R2H966RoCLae/f7HQJzw== X-Google-Smtp-Source: ABdhPJyiVpx/aRYRNkaVHsD9RVwfZKOQRNZSmOBHVCElQUGffjpJfN/6uHIk5TXDQV0TvABLhw7fsQ== X-Received: by 2002:a05:600c:22d0:: with SMTP id 16mr19012172wmg.37.1637784048185; Wed, 24 Nov 2021 12:00:48 -0800 (PST) Received: from linaro.org ([2a00:23c5:6809:2201:dd2e:a6e1:6adf:269c]) by smtp.gmail.com with ESMTPSA id c1sm729582wrt.14.2021.11.24.12.00.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 12:00:47 -0800 (PST) From: Mike Leach To: linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org Cc: mathieu.poirier@linaro.org, suzuki.poulose@arm.com, leo.yan@linaro.org, Mike Leach Subject: [PATCH v3 6/6] Documentation: coresight: Update coresight configuration docs Date: Wed, 24 Nov 2021 20:00:38 +0000 Message-Id: <20211124200038.28662-7-mike.leach@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211124200038.28662-1-mike.leach@linaro.org> References: <20211124200038.28662-1-mike.leach@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211124_120049_784428_87247DD2 X-CRM114-Status: GOOD ( 22.44 ) 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: , MIME-Version: 1.0 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 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. + + +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