drivers/hwtracing/coresight/coresight-syscfg.h
Source file repositories/reference/linux-study-clean/drivers/hwtracing/coresight/coresight-syscfg.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/hwtracing/coresight/coresight-syscfg.h- Extension
.h- Size
- 4525 bytes
- Lines
- 128
- Domain
- Driver Families
- Bucket
- drivers/hwtracing
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/configfs.hlinux/coresight.hlinux/device.hcoresight-config.h
Detected Declarations
struct cscfg_managerstruct cscfg_registered_csdevstruct cscfg_load_owner_infoenum cscfg_load_opsenum cscfg_load_owner_type
Annotated Snippet
struct cscfg_manager {
struct device dev;
struct list_head csdev_desc_list;
struct list_head feat_desc_list;
struct list_head config_desc_list;
struct list_head load_order_list;
atomic_t sys_active_cnt;
struct configfs_subsystem cfgfs_subsys;
u32 sysfs_active_config;
int sysfs_active_preset;
enum cscfg_load_ops load_state;
};
/* get reference to dev in cscfg_manager */
struct device *cscfg_device(void);
/**
* List entry for Coresight devices that are registered as supporting complex
* config operations.
*
* @csdev: The registered device.
* @match_flags: The matching type information for adding features.
* @ops: Operations supported by the registered device.
* @item: list entry.
*/
struct cscfg_registered_csdev {
struct coresight_device *csdev;
u32 match_flags;
struct cscfg_csdev_feat_ops ops;
struct list_head item;
};
/* owner types for loading and unloading of config and feature sets */
enum cscfg_load_owner_type {
CSCFG_OWNER_PRELOAD,
CSCFG_OWNER_MODULE,
};
/**
* Load item - item to add to the load order list allowing dynamic load and
* unload of configurations and features. Caller loading a config
* set provides a context handle for unload. API ensures that
* items unloaded strictly in reverse order from load to ensure
* dependencies are respected.
*
* @item: list entry for load order list.
* @type: type of owner - allows interpretation of owner_handle.
* @owner_handle: load context - handle for owner of loaded configs.
*/
struct cscfg_load_owner_info {
struct list_head item;
int type;
void *owner_handle;
};
/* internal core operations for cscfg */
int __init cscfg_init(void);
void cscfg_exit(void);
int cscfg_preload(void *owner_handle);
const struct cscfg_feature_desc *cscfg_get_named_feat_desc(const char *name);
int cscfg_update_feat_param_val(struct cscfg_feature_desc *feat_desc,
int param_idx, u64 value);
int cscfg_config_sysfs_activate(struct cscfg_config_desc *cfg_desc, bool activate);
void cscfg_config_sysfs_set_preset(int preset);
/* syscfg manager external API */
int cscfg_load_config_sets(struct cscfg_config_desc **cfg_descs,
struct cscfg_feature_desc **feat_descs,
struct cscfg_load_owner_info *owner_info);
int cscfg_unload_config_sets(struct cscfg_load_owner_info *owner_info);
int cscfg_register_csdev(struct coresight_device *csdev, u32 match_flags,
struct cscfg_csdev_feat_ops *ops);
void cscfg_unregister_csdev(struct coresight_device *csdev);
int cscfg_activate_config(unsigned long cfg_hash);
void cscfg_deactivate_config(unsigned long cfg_hash);
void cscfg_csdev_reset_feats(struct coresight_device *csdev);
int cscfg_csdev_enable_active_config(struct coresight_device *csdev,
unsigned long cfg_hash, int preset);
void cscfg_csdev_disable_active_config(struct coresight_device *csdev);
void cscfg_config_sysfs_get_active_cfg(unsigned long *cfg_hash, int *preset);
#endif /* CORESIGHT_SYSCFG_H */
Annotation
- Immediate include surface: `linux/configfs.h`, `linux/coresight.h`, `linux/device.h`, `coresight-config.h`.
- Detected declarations: `struct cscfg_manager`, `struct cscfg_registered_csdev`, `struct cscfg_load_owner_info`, `enum cscfg_load_ops`, `enum cscfg_load_owner_type`.
- Atlas domain: Driver Families / drivers/hwtracing.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.