drivers/s390/cio/cio_inject.c
Source file repositories/reference/linux-study-clean/drivers/s390/cio/cio_inject.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/s390/cio/cio_inject.c- Extension
.c- Size
- 3698 bytes
- Lines
- 171
- Domain
- Driver Families
- Bucket
- drivers/s390
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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.
- 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/slab.hlinux/spinlock.hlinux/mm.hlinux/debugfs.hasm/chpid.hcio_inject.hcio_debug.h
Detected Declarations
function crw_injectfunction stcrw_get_injectedfunction crw_inject_writefunction enable_inject_writefunction cio_inject_initmodule init cio_inject_init
Annotated Snippet
static const struct file_operations crw_fops = {
.owner = THIS_MODULE,
.write = crw_inject_write,
};
static const struct file_operations cio_en_fops = {
.owner = THIS_MODULE,
.write = enable_inject_write,
};
static int __init cio_inject_init(void)
{
/* enable_inject node enables the static branching */
debugfs_create_file("enable_inject", 0200, cio_debugfs_dir,
NULL, &cio_en_fops);
debugfs_create_file("crw_inject", 0200, cio_debugfs_dir,
NULL, &crw_fops);
return 0;
}
device_initcall(cio_inject_init);
Annotation
- Immediate include surface: `linux/slab.h`, `linux/spinlock.h`, `linux/mm.h`, `linux/debugfs.h`, `asm/chpid.h`, `cio_inject.h`, `cio_debug.h`.
- Detected declarations: `function crw_inject`, `function stcrw_get_injected`, `function crw_inject_write`, `function enable_inject_write`, `function cio_inject_init`, `module init cio_inject_init`.
- Atlas domain: Driver Families / drivers/s390.
- 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.