STRUCT CORESIGHT_DEVICE(9)
π NAME π
okay so bestie, this page is struct coresight_device(9) from the Kernel API Manual, and it's literally the representation of a device as used by the framework. slay. π
β¨ SYNOPSIS β¨
struct coresight_device {
struct coresight_platform_data *pdata;
enum coresight_dev_type type;
union coresight_dev_subtype subtype;
const struct coresight_ops *ops;
struct csdev_access access;
struct device dev;
struct coresight_path *path;
atomic_t mode;
int refcnt;
int cpu;
bool orphan;
bool sysfs_sink_activated;
struct dev_ext_attribute *ea;
struct coresight_device *def_sink;
struct coresight_trace_id_map perf_sink_id_map;
int nr_links;
bool has_conns_grp;
struct list_head feature_csdev_list;
struct list_head config_csdev_list;
raw_spinlock_t cscfg_csdev_lock;
void *active_cscfg_ctxt;
};
π Members π
pdataβ platform data with device connections associated to this device. the whole βwhoβs connected to whoβ vibe. π«Άtypeβ as defined bycoresight_dev_type. periodt.subtypeβ as defined bycoresight_dev_subtype. no extra lore, thatβs the sentence. β¨opsβ generic operations for this component, as defined bycoresight_ops. the behavior plug-in energy. π₯accessβ device i/o access abstraction for this device.devβ the device entity associated to this component.pathβ activated path pointer, and itβs only used for source device. okayyy. πmodeβ the device mode, i.esysFS,Perfor disabled. this is actually an'enum cs_mode'but stored in an atomic type. access is always through atomic APIs, ensuring SMP-safe synchronisation between racing fromsysFSandPerfmode. a compare-and-exchange operation is done to atomically claim one mode or the other. atomic mode claiming is the main character here. πrefcntβ keep track of what is in use. only access this outside of the device's spinlock when thecoresight_mutexis held andmode == CS_MODE_SYSFS. otherwise it must be accessed from inside the spinlock. no cap, this caveat matters. πcpuβ the CPU this component is affined to (-1for not CPU bound).orphanβtrueif the component has connections that haven't been linked. sad little unlinked vibe. π₯Ίsysfs_sink_activatedβ by writing a1to the'enable_sink'file. a sink can be activated but not yet enabled. enabling for a sink happens when a source has been selected and a path is enabled from source to that sink. a sink can also become enabled but not activated if it's used viaPerf. this is highkey a whole state-machine moment. πeaβ device attribute for sink representation under PMU directory.def_sinkβ cached reference to default sink found for this device.perf_sink_id_mapβ itβs in the struct asstruct coresight_trace_id_map perf_sink_id_map;, and this member list doesnβt give it a separate description, so Iβm not inventing one. π«Άnr_linksβ number of sysfs links created to other components from this device. these will appear in the"connections"group.has_conns_grpβ have added a"connections"group for sysfs links.feature_csdev_listβ list of complex feature programming added to the device.config_csdev_listβ list of system configurations added to the device.cscfg_csdev_lockβ protect the lists of configurations and features. πactive_cscfg_ctxtβ context information for current active system configuration.
π SEE ALSO π
kernel file ./include/linux/coresight.h, bestie. go hang out with these:
union coresight_dev_subtype(9)struct coresight_platform_data(9)struct csdev_access(9)struct coresight_desc(9)struct coresight_connection(9)struct coresight_sysfs_link(9)struct coresight_path(9)struct coresight_ops_sink(9)struct coresight_ops_link(9)struct coresight_ops_source(9)struct coresight_ops_helper(9)struct coresight_ops_panic(9)
mwah π β source/version ./include/linux, date October 2026, page struct coresight_device(9); thatβs the footer vibe, bestie. π«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms