include/linux/stm.h
Source file repositories/reference/linux-study-clean/include/linux/stm.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/stm.h- Extension
.h- Size
- 4709 bytes
- Lines
- 144
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source 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 or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.h
Detected Declarations
struct stp_policystruct stm_devicestruct stm_datastruct stm_source_devicestruct stm_source_dataenum stp_packet_typeenum stp_packet_flagsenum stm_source_type
Annotated Snippet
struct stm_data {
const char *name;
struct stm_device *stm;
unsigned int sw_start;
unsigned int sw_end;
unsigned int sw_nchannels;
unsigned int sw_mmiosz;
unsigned int hw_override;
ssize_t (*packet)(struct stm_data *, unsigned int,
unsigned int, unsigned int,
unsigned int, unsigned int,
const unsigned char *);
phys_addr_t (*mmio_addr)(struct stm_data *, unsigned int,
unsigned int, unsigned int);
int (*link)(struct stm_data *, unsigned int,
unsigned int);
void (*unlink)(struct stm_data *, unsigned int,
unsigned int);
long (*set_options)(struct stm_data *, unsigned int,
unsigned int, unsigned int,
unsigned long);
};
int stm_register_device(struct device *parent, struct stm_data *stm_data,
struct module *owner);
void stm_unregister_device(struct stm_data *stm_data);
struct stm_source_device;
/**
* struct stm_source_data - STM source device description and callbacks
* @name: device name, will be used for policy lookup
* @src: internal structure, only used by stm class code
* @nr_chans: number of channels to allocate
* @type: type of STM source driver represented by stm_source_type
* @link: called when this source gets linked to an STM device
* @unlink: called when this source is about to get unlinked from its STM
*
* Fill in this structure before calling stm_source_register_device() to
* register a source device. Also pass it to unregister and write calls.
*/
struct stm_source_data {
const char *name;
struct stm_source_device *src;
unsigned int percpu;
unsigned int nr_chans;
unsigned int type;
int (*link)(struct stm_source_data *data);
void (*unlink)(struct stm_source_data *data);
};
int stm_source_register_device(struct device *parent,
struct stm_source_data *data);
void stm_source_unregister_device(struct stm_source_data *data);
int notrace stm_source_write(struct stm_source_data *data, unsigned int chan,
const char *buf, size_t count);
#endif /* _STM_H_ */
Annotation
- Immediate include surface: `linux/device.h`.
- Detected declarations: `struct stp_policy`, `struct stm_device`, `struct stm_data`, `struct stm_source_device`, `struct stm_source_data`, `enum stp_packet_type`, `enum stp_packet_flags`, `enum stm_source_type`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
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.