aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwtracing/coresight/coresight-config.h
diff options
context:
space:
mode:
authorMike Leach <mike.leach@linaro.org>2021-11-24 20:00:34 +0000
committerMathieu Poirier <mathieu.poirier@linaro.org>2021-11-26 11:27:35 -0700
commit02bd588e12df405bdf55244708151b7f238b79ba (patch)
tree62395c368121e0f5964567364898dc605dd2ccfd /drivers/hwtracing/coresight/coresight-config.h
parentcoresight: configuration: Update API to introduce load owner concept (diff)
downloadlinux-dev-02bd588e12df405bdf55244708151b7f238b79ba.tar.xz
linux-dev-02bd588e12df405bdf55244708151b7f238b79ba.zip
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>
Diffstat (limited to 'drivers/hwtracing/coresight/coresight-config.h')
-rw-r--r--drivers/hwtracing/coresight/coresight-config.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/hwtracing/coresight/coresight-config.h b/drivers/hwtracing/coresight/coresight-config.h
index 6e0d43901d66..9bd44b940add 100644
--- a/drivers/hwtracing/coresight/coresight-config.h
+++ b/drivers/hwtracing/coresight/coresight-config.h
@@ -98,6 +98,7 @@ struct cscfg_regval_desc {
* @nr_regs: number of registers used.
* @regs_desc: array of registers used.
* @load_owner: handle to load owner for dynamic load and unload of features.
+ * @fs_group: reference to configfs group for dynamic unload.
*/
struct cscfg_feature_desc {
const char *name;
@@ -109,6 +110,7 @@ struct cscfg_feature_desc {
int nr_regs;
struct cscfg_regval_desc *regs_desc;
void *load_owner;
+ struct config_group *fs_group;
};
/**
@@ -131,6 +133,7 @@ struct cscfg_feature_desc {
* @event_ea: Extended attribute for perf event value
* @active_cnt: ref count for activate on this configuration.
* @load_owner: handle to load owner for dynamic load and unload of configs.
+ * @fs_group: reference to configfs group for dynamic unload.
*/
struct cscfg_config_desc {
const char *name;
@@ -144,6 +147,7 @@ struct cscfg_config_desc {
struct dev_ext_attribute *event_ea;
atomic_t active_cnt;
void *load_owner;
+ struct config_group *fs_group;
};
/**