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=-9.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 8575BC433ED for ; Wed, 19 May 2021 09:45:19 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 0C19E6109F for ; Wed, 19 May 2021 09:45:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0C19E6109F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=0KAgLPoMlHfhkD6uhDC9Aua9QF3M0y6A3fsq9Z60wJc=; b=NCnbTgod5Cl/yhksVY84OhnGB b/T0YyzvofOZ5hxRytmPOw3NFUmxVHjThvQ54N1BX+R8GRXTMIJzPFg/FpxHfRa//T68SXO8MuODY QyspBouysQ+/NV6IYiNyrEG1ipvAUjSk24hlRGTCor5CbwBeXL3erpBwzRiJ9bNG7qvlKeJTVoctX YtGsZfygwTxN9slTud+OuTwR5vsge7QownN+ynE0idBU2s64EyVz+h/6YRkE2rglNQYqlw1o6EvLB GJDXN7iheijCflZDucWXB0rJpnKOBGpT0N88H7wpau+cvKZCExA2ZgaZo7bdfzA90IrSE0++i0Rlc wUp9JIRag==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1ljIja-003Tcu-En; Wed, 19 May 2021 09:43:22 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ljIjX-003TcV-93 for linux-arm-kernel@desiato.infradead.org; Wed, 19 May 2021 09:43:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=JrSl4HynsAYmo7kNjYWulrQ+UBys9jJtma89KC/7V3Q=; b=DsfX2YYb2E7Bhq2C+WHo4FqT/z /rTAC3xtP5R8j7+ShWwpoJBnhR7Ccrj6wl+J7pTWYUGXEl6ExDHKIQKfDa5kOVU6bsADP2u39K7aH WPHuh5014EhBULUv4bTBi8YMQ7hmN3Yrnu7qdkZemm+R//floGmEjAF6DUdJq7z0dwg1SJlVgClZR nHlpH6F4NqBS7iqz2pGckjHDhD03GL/jTjI4JTHSMrBGEra9KYvI1P1jTghV+pB4X9ertlE+Mhi8C bDR/iOKvvxIcaeFCpO/odeJ+Tg3BLBC2vHdW+L4ByBtM1DebSKh7RrWoSGvemOSTjbLmI6q1NuySg IncWwU4w==; Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ljIjT-00FKEc-Uq for linux-arm-kernel@lists.infradead.org; Wed, 19 May 2021 09:43:17 +0000 Received: by mail-wm1-x335.google.com with SMTP id z85-20020a1c7e580000b029017a76f3afbaso417116wmc.2 for ; Wed, 19 May 2021 02:43:15 -0700 (PDT) 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=JrSl4HynsAYmo7kNjYWulrQ+UBys9jJtma89KC/7V3Q=; b=hO6pghSy6/J3x0gnn7KA+zvhHZUASGmxK7idflVqwrR37llF3hrbCo1F7nkjwvs5fi a9uHqzXTJidl1g8x0T/HcXKUd3Y1OX6+Kj8t46lWn9ewKL0WTcg0sz0at5HJuJHojpxT mH11xkvU45DQEf32Ntv+rpVEstBdizRmR6s2y370VVx5g/VrO36XrNf3SH65EPpDce8F nfbLxvIfTKLHAo/m/NY/bq7o0ChsyWRWcC6wIl/bdWaCb8Jv/4xv0N6rgXSnkMwQzzcu wyzxz/yIDDDczU9ExBp3Qse7/p9uqP9ijeq6zi1f2g3Oeihfs2bNlKM8gP0GhMclI+Gg SOwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JrSl4HynsAYmo7kNjYWulrQ+UBys9jJtma89KC/7V3Q=; b=sfFsvdoCeA5vXmDin6K7c0a0VylDwYkEu1Uu6mKYw9jH2ihNBpphmSjTe1AjRGJdhs 3bTNxe7a4fN7h0EXvKjZ7cF/8XMBY1AUzxSZ79UZr1WV6r7GAs53DNVYSlU0H/Z5+9Fr rzGqGUJ8pt4h4V6UT/1Cng+jssE9Dfvz9AGrTx0vTm6pm2Xc5MxalzHtrPBuq5mPIhkb LrGPmMVCR7FF6WqC8kS/mwHUalMTgfc+p/wM+RwJvX76UDfReDw1jwGt905N3IAvC1cA 1/RwSIo06YR+nM+2cZk5VvA0RULgLet/Dgmo59rqMll7uhcd191oy97nLMIWOGEuoPkS uTcA== X-Gm-Message-State: AOAM5315I5ON1ae8OGA68rgU1fwglk6XTMZpcGGkc8TooZ5YcXOAP0+J owIk9+x4spjwEDmB1FfKpkr6KHVpa07tnBrtsyQhVw== X-Google-Smtp-Source: ABdhPJxq3poVA8AakGhWy6kMPcAVAFJBYSW3AWX7ezfg3wpwGYAxdJPeiPhNQWBcpKoVdrD7JQcuyskB5BmqlrdfbKE= X-Received: by 2002:a7b:c85a:: with SMTP id c26mr6678257wml.131.1621417394168; Wed, 19 May 2021 02:43:14 -0700 (PDT) MIME-Version: 1.0 References: <20210512211752.4103-1-mike.leach@linaro.org> In-Reply-To: From: Mike Leach Date: Wed, 19 May 2021 10:43:03 +0100 Message-ID: Subject: Re: [RFC PATCH 0/8] coresight: syscfg: dynamic load, resource management To: Suzuki K Poulose Cc: Coresight ML , linux-arm-kernel , Mathieu Poirier , Leo Yan X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210519_024316_084601_2DFE2A1F X-CRM114-Status: GOOD ( 36.16 ) 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 Suzuki, On Tue, 18 May 2021 at 19:31, Suzuki K Poulose wrote: > > Hi Mike > > On 12/05/2021 22:17, Mike Leach wrote: > > > This patchset represents the second phase of CoreSight configuration > > management. > > Thanks for the series. > > > > > 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. > > Is it possible to do this at runtime configfs ? I thought we tied this > to configfs for this feautre. > > While the module approach works, I feel is a hinderance for wider > adoption and is something that doesn't allow for use on production > systems. > > > > > 3) Resource management API is added. This allows the system to ensure that > > loaded configurations and features are only loaded onto devices that can > > support them. > > > > Further - it ensures that configurations with multiple features cannot over > > allocate resources. > > > > 4) configfs can be used to activate a configuration which will then be used > > when controlling tracing using sysfs. > > > > 5) Resource management is added to ETMv4 configurations. This allows current > > and future features and configurations to be defined in terms of resources > > used as well as registers to be programmed. > > > > Defining features in this way allows the resource management to operate > > correctly. > > > > The perf event parsing is also adjusted to allow the ETM resources requested > > on the command line (e.g. address filters, etc) to be correctly handled > > using resoruce management alongside the complex configurations such as > > autofdo. > > > > Applies to coresight/next - which is 5.13-rc1 + initial Coresight configuration > > patchset. > > > > To follow in future revisions / sets:- > > a) load of additional config and features by configfs > > Is this something that implements what I requested above ? > Then I don't see how the module approach will be used once that is in > place and we will be left with something to maintain forever. > The first couple of patches in this set implement the dynamic load and unload of configurations on top of the existing static load only infrastructure from the baseline set. This code is used when dynamic loading from both a module and in the case of a configfs load. So there is very little code that is specific to the module load case. The module load was requested by Mathieu as a way of loading new configurations and I guess even in production environments, approved modules can be loaded at boot to provide standard configs should people want them - after all the coresight modules themselves have to be loaded. Also - the module load tests the new code very nicely. Regards Mike > Suzuki > > > b) ECT and CTI and other Coresight components support for configuration and > > features. > > > > > > Mike Leach (8): > > 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. > > coresight: syscfg: Add API to check and validate device resources. > > coresight: etm4x: syscfg: Add resource management to etm4x. > > coresight: etm4x: Update perf event resource handling. > > coresight: etm4x: Update configuration example. > > > > MAINTAINERS | 1 + > > .../hwtracing/coresight/coresight-cfg-afdo.c | 38 +- > > .../coresight/coresight-cfg-preload.c | 9 +- > > .../hwtracing/coresight/coresight-config.c | 71 ++- > > .../hwtracing/coresight/coresight-config.h | 45 +- > > .../hwtracing/coresight/coresight-etm4x-cfg.c | 533 ++++++++++++++++++ > > .../hwtracing/coresight/coresight-etm4x-cfg.h | 196 ++++++- > > .../coresight/coresight-etm4x-core.c | 250 +++----- > > .../coresight/coresight-syscfg-configfs.c | 87 +++ > > .../coresight/coresight-syscfg-configfs.h | 4 + > > .../hwtracing/coresight/coresight-syscfg.c | 390 +++++++++++-- > > .../hwtracing/coresight/coresight-syscfg.h | 38 +- > > include/linux/coresight.h | 2 + > > samples/Kconfig | 9 + > > samples/Makefile | 1 + > > samples/coresight/Makefile | 4 + > > samples/coresight/coresight-cfg-sample.c | 73 +++ > > 17 files changed, 1511 insertions(+), 240 deletions(-) > > create mode 100644 samples/coresight/Makefile > > create mode 100644 samples/coresight/coresight-cfg-sample.c > > > -- 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