drivers/remoteproc/remoteproc_internal.h
Source file repositories/reference/linux-study-clean/drivers/remoteproc/remoteproc_internal.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/remoteproc/remoteproc_internal.h- Extension
.h- Size
- 5535 bytes
- Lines
- 225
- Domain
- Driver Families
- Bucket
- drivers/remoteproc
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/irqreturn.hlinux/firmware.h
Detected Declarations
struct rprocstruct rproc_debug_tracestruct rproc_vdev_datafunction rproc_has_featurefunction rproc_set_featurefunction rproc_init_cdevfunction rproc_char_device_removefunction rproc_prepare_devicefunction rproc_unprepare_devicefunction rproc_attach_devicefunction rproc_fw_sanity_checkfunction rproc_get_boot_addrfunction rproc_load_segmentsfunction rproc_parse_fwfunction rproc_handle_rscfunction rproc_u64_fit_in_size_t
Annotated Snippet
struct rproc_debug_trace {
struct rproc *rproc;
struct dentry *tfile;
struct list_head node;
struct rproc_mem_entry trace_mem;
};
/**
* struct rproc_vdev_data - remoteproc virtio device data
* @rsc_offset: offset of the vdev's resource entry
* @id: virtio device id (as in virtio_ids.h)
* @index: vdev position versus other vdev declared in resource table
* @rsc: pointer to the vdev resource entry. Valid only during vdev init as
* the resource can be cached by rproc.
*/
struct rproc_vdev_data {
u32 rsc_offset;
unsigned int id;
u32 index;
struct fw_rsc_vdev *rsc;
};
static inline bool rproc_has_feature(struct rproc *rproc, unsigned int feature)
{
return test_bit(feature, rproc->features);
}
static inline int rproc_set_feature(struct rproc *rproc, unsigned int feature)
{
if (feature >= RPROC_MAX_FEATURES)
return -EINVAL;
set_bit(feature, rproc->features);
return 0;
}
/* from remoteproc_core.c */
void rproc_release(struct kref *kref);
int rproc_of_parse_firmware(struct device *dev, int index,
const char **fw_name);
/* from remoteproc_virtio.c */
irqreturn_t rproc_vq_interrupt(struct rproc *rproc, int vq_id);
/* from remoteproc_debugfs.c */
void rproc_remove_trace_file(struct dentry *tfile);
struct dentry *rproc_create_trace_file(const char *name, struct rproc *rproc,
struct rproc_debug_trace *trace);
void rproc_delete_debug_dir(struct rproc *rproc);
void rproc_create_debug_dir(struct rproc *rproc);
void rproc_init_debugfs(void);
void rproc_exit_debugfs(void);
/* from remoteproc_sysfs.c */
extern const struct class rproc_class;
int rproc_init_sysfs(void);
void rproc_exit_sysfs(void);
#ifdef CONFIG_REMOTEPROC_CDEV
void rproc_init_cdev(void);
void rproc_exit_cdev(void);
int rproc_char_device_add(struct rproc *rproc);
void rproc_char_device_remove(struct rproc *rproc);
#else
static inline void rproc_init_cdev(void)
{
}
static inline void rproc_exit_cdev(void)
{
}
/*
* The character device interface is an optional feature, if it is not enabled
* the function should not return an error.
*/
static inline int rproc_char_device_add(struct rproc *rproc)
{
return 0;
}
static inline void rproc_char_device_remove(struct rproc *rproc)
{
}
#endif
void rproc_free_vring(struct rproc_vring *rvring);
int rproc_alloc_vring(struct rproc_vdev *rvdev, int i);
int rproc_parse_vring(struct rproc_vdev *rvdev, struct fw_rsc_vdev *rsc, int i);
Annotation
- Immediate include surface: `linux/irqreturn.h`, `linux/firmware.h`.
- Detected declarations: `struct rproc`, `struct rproc_debug_trace`, `struct rproc_vdev_data`, `function rproc_has_feature`, `function rproc_set_feature`, `function rproc_init_cdev`, `function rproc_char_device_remove`, `function rproc_prepare_device`, `function rproc_unprepare_device`, `function rproc_attach_device`.
- Atlas domain: Driver Families / drivers/remoteproc.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.