From patchwork Tue Oct 19 19:13:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Leach X-Patchwork-Id: 12570975 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66AB7C433EF for ; Tue, 19 Oct 2021 19:15:15 +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 2DA6361378 for ; Tue, 19 Oct 2021 19:15:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2DA6361378 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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id: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:In-Reply-To:References: List-Owner; bh=r/OPoSz81PbYFtTe8dymQsqd3G79URp0v6FrIkFmUSU=; b=IKJu2CsTe753Z5 1gos0EDzpEceWVWVYzmuPY1Mz+j2hgG4b5ez06iNqBqxFAK9j+vRi4Fx2/KXrjXyRX446iG1equht SJXsIfRAicKHdbOWAa8hpDKN51oJsFnNAmsygLHo76/RBQRt6+/Yii7cKEumiD/2sWvHsKPUP3lzs 11TrI5qIMxULYBMc5x9CJd+EFSKJdln8tyjI290iIm3KQFsY69BH931yNoaRe4XMEZguy6GMrN6VY Mk/Br8Qg/BLPXkEdF3MEkkH8Rt4jD1XAd1syMWiUcMbQefKUUxo/uV5bDxzM+UNBP8ENfPZxaEMA7 sTB52BPQLg5gND73Is/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mcuYi-002Tra-QQ; Tue, 19 Oct 2021 19:14:00 +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 1mcuYe-002Toz-8T for linux-arm-kernel@lists.infradead.org; Tue, 19 Oct 2021 19:13:57 +0000 Received: by mail-wm1-x32f.google.com with SMTP id v127so13842060wme.5 for ; Tue, 19 Oct 2021 12:13:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=kbHnlsewJgJyoVM8upUZ1wgG4UmWE+KPIMlLF+7WPy0=; b=OR8h9ATRJ3Nz2LwdB2gLAvm1IUEMB9jsFB6J3kcQc1PiCEQfO57zDJUl3mqs8bxRe9 knyhrjo+P7aD38tClJ75GzDm+0cu9QNlJzDa1p4BOOftvQh8sOLS8eg9rF/YyUgqFikO dINgO2ZG7b07xa9vbFcXO3ynqeDpTJeqqvaq9OeEZFZOGMU+PWd4w5zRDpK35lo57D9S /CLbvHvR3wQIr6yOQaLvOKJfX9nZNqkhbA9o2kYwRb2JVJ6AqFm5UsuzsFY5JzUrN5eD qOiU6QGhOTugRilZuK/9fumB5MlcxcKE4HkrNtSbFJtOD6jPs2hOlMyT+0sWxVesrKB3 6q4w== 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; bh=kbHnlsewJgJyoVM8upUZ1wgG4UmWE+KPIMlLF+7WPy0=; b=E7ILcXvc8tqkia9JqR//Eemrrl13+7IoV4A5++H+qv21drIKKL6jzng3uC9JQeea1w vMAR5oLtnYK/FGkRlKMFI2QvJwXWe3Zj/NFZ+VorcaXTD2BlYuJ1sPCprZHpLgIS8wkf Jo+Xu2vgOTXZXNgzbfyLh2MJ14wUtw4BB5ShMQiMW0FPrrP6zUfVCh7WLFmQNlVS3fNk 7mO88CohIu/rtAjz7j9n8urT4wc65zrvudivtWgHnBt/eIx0f7Rw+cpZfx8HWjVoZUPa 9+TSrfjewgKQ0t4gYkI+TFiKBoVVRh0t9NJ6HEAnprNZcv27Eiv1u8BWoXb8zpa1YcSb TTRQ== X-Gm-Message-State: AOAM530YKpTDeGSn4MVjw/M8IKZG6PeCdnVfUl4NoOVeWg7C5eIol4+u 6Xk9qrMR44VFooUTBbHL/EVarA== X-Google-Smtp-Source: ABdhPJwtxSYZ8s25SOSfH6Mkj8chANViUQ9p4DRvWGPax2Js2Fhp3O8FjNDFEz+tNej3N3+BfN/d5Q== X-Received: by 2002:adf:8b06:: with SMTP id n6mr46245561wra.5.1634670833736; Tue, 19 Oct 2021 12:13:53 -0700 (PDT) Received: from linaro.org ([2a00:23c5:6809:2201:4cb1:37ba:8a95:ed1b]) by smtp.gmail.com with ESMTPSA id k22sm16012389wrd.59.2021.10.19.12.13.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 12:13:53 -0700 (PDT) From: Mike Leach To: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org, mathieu.poirier@linaro.org, suzuki.poulose@arm.com, leo.yan@linaro.org, Mike Leach Subject: [PATCH v2 0/5] coresight: syscfg: dynamic load Date: Tue, 19 Oct 2021 20:13:46 +0100 Message-Id: <20211019191351.10242-1-mike.leach@linaro.org> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211019_121356_361015_7F9CF779 X-CRM114-Status: GOOD ( 12.47 ) 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 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 1) API updated to allow dynamic load and unload of configurations and features. Dependency management between loaded sets is added. 2) New configuration and feature sets can be added using a loadable module. An example in /samples/coresight is provided to demonstrate this. 3) configfs can be used to activate a configuration which will then be used when controlling tracing using sysfs. Applies and tested on coresight/next - which is 5.15-rc1 Changes since v1: a) Original set split to divide related changes into smaller sets. Removed RFC flag. b) Revised config activation for sysfs to simplify common function. (patch 4). c) Minor changes requested by Mathieu added. Mike Leach (5): coresight: syscfg: Update API to allow dynamic load and unload coresight: syscfg: Update load API for config loadable modules coresight: syscfg: Example CoreSight configuration loadable module coresight: configfs: Allow configfs to activate configuration Documentation: coresight: Update coresight configuration docs .../trace/coresight/coresight-config.rst | 19 ++ MAINTAINERS | 1 + .../coresight/coresight-cfg-preload.c | 9 +- .../hwtracing/coresight/coresight-config.h | 9 +- .../coresight/coresight-etm4x-core.c | 11 +- .../coresight/coresight-syscfg-configfs.c | 87 +++++ .../coresight/coresight-syscfg-configfs.h | 4 + .../hwtracing/coresight/coresight-syscfg.c | 315 ++++++++++++++++-- .../hwtracing/coresight/coresight-syscfg.h | 39 ++- samples/Kconfig | 9 + samples/Makefile | 1 + samples/coresight/Makefile | 4 + samples/coresight/coresight-cfg-sample.c | 73 ++++ 13 files changed, 546 insertions(+), 35 deletions(-) create mode 100644 samples/coresight/Makefile create mode 100644 samples/coresight/coresight-cfg-sample.c