coresight: configuration: Update API to permit dynamic load/unload
authorMike Leach <mike.leach@linaro.org>
Wed, 24 Nov 2021 20:00:34 +0000 (20:00 +0000)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Fri, 26 Nov 2021 18:27:35 +0000 (11:27 -0700)
commit02bd588e12df405bdf55244708151b7f238b79ba
tree62395c368121e0f5964567364898dc605dd2ccfd
parentda7000e8b83bb8dbdf8f01fd3fe4c4190974bfdc
coresight: configuration: Update API to permit dynamic load/unload

Expand the configuration API to allow dynamic runtime load and unload of
configurations and features.

On load, configurations and features are tagged with a "load owner" that
is used to determine sets that were loaded together in a given API call.

To unload the API uses the load owner to unload all elements previously
loaded by that owner.

The API also records the order in which different owners loaded
their elements into the system. Later loading configurations can use
previously loaded features, creating load dependencies. Therefore unload
is enforced strictly in the reverse order to load.

A load owner will be an additional loadable module, or a configuration
loaded via configfs.

Signed-off-by: Mike Leach <mike.leach@linaro.org>
Link: https://lore.kernel.org/r/20211124200038.28662-3-mike.leach@linaro.org
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/hwtracing/coresight/coresight-config.h
drivers/hwtracing/coresight/coresight-syscfg-configfs.c
drivers/hwtracing/coresight/coresight-syscfg-configfs.h
drivers/hwtracing/coresight/coresight-syscfg.c
drivers/hwtracing/coresight/coresight-syscfg.h