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.
- API updated to allow dynamic load and unload of configurations and
features. Dependency management between loaded sets is added.
- 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.
- 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.
- configfs can be used to activate a configuration which will then be used
when controlling tracing using sysfs.
- 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.
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