include/linux/coresight.h
Source file repositories/reference/linux-study-clean/include/linux/coresight.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/coresight.h- Extension
.h- Size
- 23809 bytes
- Lines
- 707
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- 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/amba/bus.hlinux/clk.hlinux/device.hlinux/io.hlinux/perf_event.hlinux/sched.hlinux/platform_device.h
Detected Declarations
struct coresight_platform_datastruct csdev_accessstruct coresight_descstruct coresight_connectionstruct coresight_sysfs_linkstruct coresight_trace_id_mapstruct coresight_devicestruct coresight_dev_liststruct coresight_pathstruct coresight_ops_sinkstruct coresight_ops_linkstruct coresight_ops_sourcestruct coresight_ops_helperstruct coresight_ops_panicstruct coresight_opsenum coresight_dev_typeenum coresight_dev_subtype_sinkenum coresight_dev_subtype_linkenum coresight_dev_subtype_sourceenum coresight_dev_subtype_helperenum cs_modefunction csdev_access_relaxed_read32function coresight_get_cidfunction is_coresight_devicefunction coresight_get_pidfunction csdev_access_relaxed_read_pairfunction csdev_access_relaxed_write_pairfunction csdev_access_read32function csdev_access_relaxed_write32function csdev_access_write32function csdev_access_relaxed_read64function csdev_access_read64function csdev_access_relaxed_write64function csdev_access_write64function csdev_access_relaxed_read64function csdev_access_read64function csdev_access_relaxed_write64function csdev_access_write64function coresight_is_device_sourcefunction coresight_is_percpu_sourcefunction coresight_is_percpu_sinkfunction coresight_take_modefunction coresight_get_modefunction coresight_set_mode
Annotated Snippet
extern const struct bus_type coresight_bustype;
enum coresight_dev_type {
CORESIGHT_DEV_TYPE_SINK,
CORESIGHT_DEV_TYPE_LINK,
CORESIGHT_DEV_TYPE_LINKSINK,
CORESIGHT_DEV_TYPE_SOURCE,
CORESIGHT_DEV_TYPE_HELPER,
CORESIGHT_DEV_TYPE_MAX
};
enum coresight_dev_subtype_sink {
CORESIGHT_DEV_SUBTYPE_SINK_DUMMY,
CORESIGHT_DEV_SUBTYPE_SINK_PORT,
CORESIGHT_DEV_SUBTYPE_SINK_BUFFER,
CORESIGHT_DEV_SUBTYPE_SINK_SYSMEM,
CORESIGHT_DEV_SUBTYPE_SINK_PERCPU_SYSMEM,
};
enum coresight_dev_subtype_link {
CORESIGHT_DEV_SUBTYPE_LINK_MERG,
CORESIGHT_DEV_SUBTYPE_LINK_SPLIT,
CORESIGHT_DEV_SUBTYPE_LINK_FIFO,
};
enum coresight_dev_subtype_source {
CORESIGHT_DEV_SUBTYPE_SOURCE_PROC,
CORESIGHT_DEV_SUBTYPE_SOURCE_BUS,
CORESIGHT_DEV_SUBTYPE_SOURCE_SOFTWARE,
CORESIGHT_DEV_SUBTYPE_SOURCE_TPDM,
CORESIGHT_DEV_SUBTYPE_SOURCE_OTHERS,
};
enum coresight_dev_subtype_helper {
CORESIGHT_DEV_SUBTYPE_HELPER_CATU,
CORESIGHT_DEV_SUBTYPE_HELPER_ECT_CTI,
CORESIGHT_DEV_SUBTYPE_HELPER_CTCU,
};
/**
* union coresight_dev_subtype - further characterisation of a type
* @sink_subtype: type of sink this component is, as defined
* by @coresight_dev_subtype_sink.
* @link_subtype: type of link this component is, as defined
* by @coresight_dev_subtype_link.
* @source_subtype: type of source this component is, as defined
* by @coresight_dev_subtype_source.
* @helper_subtype: type of helper this component is, as defined
* by @coresight_dev_subtype_helper.
*/
union coresight_dev_subtype {
/* We have some devices which acts as LINK and SINK */
struct {
enum coresight_dev_subtype_sink sink_subtype;
enum coresight_dev_subtype_link link_subtype;
};
enum coresight_dev_subtype_source source_subtype;
enum coresight_dev_subtype_helper helper_subtype;
};
/**
* struct coresight_platform_data - data harvested from the firmware
* specification.
*
* @nr_inconns: Number of elements for the input connections.
* @nr_outconns: Number of elements for the output connections.
* @out_conns: Array of nr_outconns pointers to connections from this
* component.
* @in_conns: Sparse array of pointers to input connections. Sparse
* because the source device owns the connection so when it's
* unloaded the connection leaves an empty slot.
*/
struct coresight_platform_data {
int nr_inconns;
int nr_outconns;
struct coresight_connection **out_conns;
struct coresight_connection **in_conns;
};
/**
* struct csdev_access - Abstraction of a CoreSight device access.
*
* @io_mem : True if the device has memory mapped I/O
* @base : When io_mem == true, base address of the component
* @read : Read from the given "offset" of the given instance.
* @write : Write "val" to the given "offset".
*/
struct csdev_access {
bool io_mem;
union {
Annotation
- Immediate include surface: `linux/amba/bus.h`, `linux/clk.h`, `linux/device.h`, `linux/io.h`, `linux/perf_event.h`, `linux/sched.h`, `linux/platform_device.h`.
- Detected declarations: `struct coresight_platform_data`, `struct csdev_access`, `struct coresight_desc`, `struct coresight_connection`, `struct coresight_sysfs_link`, `struct coresight_trace_id_map`, `struct coresight_device`, `struct coresight_dev_list`, `struct coresight_path`, `struct coresight_ops_sink`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: pattern 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.