include/linux/rio.h
Source file repositories/reference/linux-study-clean/include/linux/rio.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/rio.h- Extension
.h- Size
- 19484 bytes
- Lines
- 559
- 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/types.hlinux/ioport.hlinux/list.hlinux/errno.hlinux/device.hlinux/rio_regs.hlinux/mod_devicetable.hlinux/dmaengine.h
Detected Declarations
struct rio_mportstruct rio_devstruct rio_switchstruct rio_switch_opsstruct rio_devstruct rio_msgstruct rio_dbellstruct rio_mportstruct rio_netstruct rio_mport_attrstruct rio_opsstruct rio_driverstruct rio_dma_extstruct rio_dma_datastruct rio_scanstruct rio_scan_nodeenum rio_device_stateenum rio_link_speedenum rio_link_widthenum rio_mport_flagsenum rio_write_typefunction rio_mport_is_running
Annotated Snippet
extern const struct bus_type rio_bus_type;
extern struct class rio_mport_class;
struct rio_mport;
struct rio_dev;
union rio_pw_msg;
/**
* struct rio_switch - RIO switch info
* @node: Node in global list of switches
* @route_table: Copy of switch routing table
* @port_ok: Status of each port (one bit per port) - OK=1 or UNINIT=0
* @ops: pointer to switch-specific operations
* @lock: lock to serialize operations updates
* @nextdev: Array of per-port pointers to the next attached device
*/
struct rio_switch {
struct list_head node;
u8 *route_table;
u32 port_ok;
struct rio_switch_ops *ops;
spinlock_t lock;
struct rio_dev *nextdev[];
};
/**
* struct rio_switch_ops - Per-switch operations
* @owner: The module owner of this structure
* @add_entry: Callback for switch-specific route add function
* @get_entry: Callback for switch-specific route get function
* @clr_table: Callback for switch-specific clear route table function
* @set_domain: Callback for switch-specific domain setting function
* @get_domain: Callback for switch-specific domain get function
* @em_init: Callback for switch-specific error management init function
* @em_handle: Callback for switch-specific error management handler function
*
* Defines the operations that are necessary to initialize/control
* a particular RIO switch device.
*/
struct rio_switch_ops {
struct module *owner;
int (*add_entry) (struct rio_mport *mport, u16 destid, u8 hopcount,
u16 table, u16 route_destid, u8 route_port);
int (*get_entry) (struct rio_mport *mport, u16 destid, u8 hopcount,
u16 table, u16 route_destid, u8 *route_port);
int (*clr_table) (struct rio_mport *mport, u16 destid, u8 hopcount,
u16 table);
int (*set_domain) (struct rio_mport *mport, u16 destid, u8 hopcount,
u8 sw_domain);
int (*get_domain) (struct rio_mport *mport, u16 destid, u8 hopcount,
u8 *sw_domain);
int (*em_init) (struct rio_dev *dev);
int (*em_handle) (struct rio_dev *dev, u8 swport);
};
enum rio_device_state {
RIO_DEVICE_INITIALIZING,
RIO_DEVICE_RUNNING,
RIO_DEVICE_GONE,
RIO_DEVICE_SHUTDOWN,
};
/**
* struct rio_dev - RIO device info
* @global_list: Node in list of all RIO devices
* @net_list: Node in list of RIO devices in a network
* @net: Network this device is a part of
* @do_enum: Enumeration flag
* @did: Device ID
* @vid: Vendor ID
* @device_rev: Device revision
* @asm_did: Assembly device ID
* @asm_vid: Assembly vendor ID
* @asm_rev: Assembly revision
* @efptr: Extended feature pointer
* @pef: Processing element features
* @swpinfo: Switch port info
* @src_ops: Source operation capabilities
* @dst_ops: Destination operation capabilities
* @comp_tag: RIO component tag
* @phys_efptr: RIO device extended features pointer
* @phys_rmap: LP-Serial Register Map Type (1 or 2)
* @em_efptr: RIO Error Management features pointer
* @dma_mask: Mask of bits of RIO address this device implements
* @driver: Driver claiming this device
* @dev: Device model device
* @riores: RIO resources this device owns
* @pwcback: port-write callback function for this device
* @destid: Network destination ID (or associated destid for switch)
* @hopcount: Hopcount to this device
Annotation
- Immediate include surface: `linux/types.h`, `linux/ioport.h`, `linux/list.h`, `linux/errno.h`, `linux/device.h`, `linux/rio_regs.h`, `linux/mod_devicetable.h`, `linux/dmaengine.h`.
- Detected declarations: `struct rio_mport`, `struct rio_dev`, `struct rio_switch`, `struct rio_switch_ops`, `struct rio_dev`, `struct rio_msg`, `struct rio_dbell`, `struct rio_mport`, `struct rio_net`, `struct rio_mport_attr`.
- 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.