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 DE2FEC433ED for ; Wed, 19 May 2021 15:39:35 +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 700E6611AE for ; Wed, 19 May 2021 15:39:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 700E6611AE 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: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=6P2gzrskhsVkfyejoWn25vlEWd47jLuXgxyEY7UgrXs=; b=iBMgUhqs5c2h0pzGbQHNJqkW/ 9QmtIKx3wrwq6FVzZcRMjELMQ3kT8Tqikk++4lEqeEJ+IefJBh/rnzZwbGB53tWQn/j2ShlPXb5Cc IZgtU5QVXZxjDQfykjuF/SS55C3b2tPZrXT32mhZ4Tww7ijrX96jZ8tVY2BSN3Opi9BAFXVaY5nhs 5bU2LcCfJk+2kC7FyTzeUQvxI2h0WRj9547RY9X4GP40KPqb1AUo2mAt0iUk/oT8JDESQFGDXBliO CTAGNix1DP4uI8BpM3pNC26ObFVy19pbinMJbd4CFLxVtYJa03J7R5HMQzXbwu8XgBYPSwZ0TTZE+ KjDHvKJ6g==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1ljOGq-004Q8y-1O; Wed, 19 May 2021 15:38:04 +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 1ljOGm-004Q8n-VL for linux-arm-kernel@desiato.infradead.org; Wed, 19 May 2021 15:38:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=t1ux9fZ79c7ccpa5kQeQzlRLEZFWnc8IajEmQTanq7U=; b=DZDCqlD76LKI3lO5b5FvoHSoeZ T8o2TLiS6VtdsUdtsTf7QwlSXR6OXrNxLo2A3jIcBf8BR/3Ygkicl1/Aej/9cc7aopvuw9x+y2N2g aC7sa2ccPpPM00/Sq1rjepLmaml2D4lgFFqPp9HmRX+5xxsiauk3vGc0lCDbkb6Tttld6Hhn5/K7e /WIJ8RRTFaMWZNebqSVykpNepcXtK5B6OnL6Au9Z9CJ0w4muTcnVj3h71oJK/OrEMLb/0Sr3D2O1k VT/vSK3S2NNCfN6IaR63vMzW4qaFC3C2CMdyQ0DmRprCQMcqijr7nUlt3DL753oVjpV5odZVcYFV7 1mxj8XBw==; Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ljOGj-00Fb4w-Pk for linux-arm-kernel@lists.infradead.org; Wed, 19 May 2021 15:37:59 +0000 Received: by mail-pf1-x433.google.com with SMTP id s19so7909435pfe.8 for ; Wed, 19 May 2021 08:37:56 -0700 (PDT) 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=t1ux9fZ79c7ccpa5kQeQzlRLEZFWnc8IajEmQTanq7U=; b=yhLw3hFOn4iikk5a8jVOlXkRCTNlLHrEFgN5vJNW5BHqBuw0QIbSmFhO9cpdusk6yB v6wEoAkgF4D1dxEf9m5msVGiGgVHoGXeDrpqvDvODD+wAoBfUozlt+2p4Ivnb2Ih8lV/ eiR7rnV4Ans6Dos5X3Ur5d8DX+FsM27RylFL4a6nafz5x8Ojxcqev+S9RU8mZGGu6/hW 2PKSiwBjJnK1mHPfd4r4LwSLTExf35+Ku7YjVGeJ85gk2u7hUMcnlsTe1PRK9xdWaoff xsPlf8fNjnHfbSDMpDbgJaL0SLuLNs5R1mu5uCSvuyx578+sxgKDAdocF8cbF43bfMFr 26ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=t1ux9fZ79c7ccpa5kQeQzlRLEZFWnc8IajEmQTanq7U=; b=p3NfqADp7y6D5LDXS6iGNrPeleJ7bNrESspDVROlmS2szkuY4AqEmiXYqmug7QNWeb TczFZUGL65dDa9AbPOYpmAGQZ35VA/V1RD8EAPDXlwQ92Yf2ajFR6qil+/mQ3SEeC9F1 fS9tLzha44s6NswfNLd3/qGytx4hOJpBjtSqBePnsTEOU0jcEBqVGLWz5pL2WNEUtclY DbMi7yGhLBwTWNoizE1hSOtJQjjcvzPltCPl8F9raBJJGw3283KdmdocTuxhJ/BcZ5uf FDnlqp24CFgp922NQy5i0t8s31SXEKdEpS7dDrIO3twipZwcOvvF0w4ysdMcRgU4/xQp DATg== X-Gm-Message-State: AOAM530AnV80FTRoA+cQMK/KEGfxmtCtx8/2WU4uxfLq3mbI3rPupk1b ZDEt9K2NC+s1wejL6K1w+6L4lA== X-Google-Smtp-Source: ABdhPJzaBM+ckhiXFi2xvMPmvM1r9QB+ydngt42Zfds94NVMgiRJwAL4EZrxcLAceshqjNV6lMM38g== X-Received: by 2002:aa7:9a0e:0:b029:2dc:70d1:2224 with SMTP id w14-20020aa79a0e0000b02902dc70d12224mr11483961pfj.1.1621438675600; Wed, 19 May 2021 08:37:55 -0700 (PDT) Received: from xps15 (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id d129sm14520622pfa.6.2021.05.19.08.37.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 May 2021 08:37:54 -0700 (PDT) Date: Wed, 19 May 2021 09:37:52 -0600 From: Mathieu Poirier To: Mike Leach Cc: Suzuki K Poulose , Coresight ML , linux-arm-kernel , Leo Yan Subject: Re: [RFC PATCH 0/8] coresight: syscfg: dynamic load, resource management Message-ID: <20210519153752.GA905529@xps15> References: <20210512211752.4103-1-mike.leach@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210519_083757_867589_655CA66E X-CRM114-Status: GOOD ( 44.31 ) 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, May 19, 2021 at 10:43:03AM +0100, Mike Leach wrote: > 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. The goal in making the complex configurations dynamically configurable was to avoid bloat of the driver. I don't know how many new implemenation we'll end up with but I'd rather provision for a large number now rather than having to backtrack in a couple of years from now. If I recall correctly we discussed the possibility of having all complex configuration go through configfs and be added from user space, i.e no static or module elements. But there were scenarios (and I can't recall those) where static/module elements were needed, which got us to the current implementation. If my assesment of the situation is erroneous and static/module elements are not needed then I'd be in favour a configfs only solution. > > 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