drivers/s390/char/sclp_ctl.c
Source file repositories/reference/linux-study-clean/drivers/s390/char/sclp_ctl.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/s390/char/sclp_ctl.c- Extension
.c- Size
- 2402 bytes
- Lines
- 121
- 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.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/uaccess.hlinux/miscdevice.hlinux/gfp.hlinux/init.hlinux/ioctl.hlinux/fs.hasm/sclp_ctl.hasm/sclp.hsclp.h
Detected Declarations
function sclp_ctl_cmdw_supportedfunction sclp_ctl_ioctl_sccbfunction sclp_ctl_ioctl
Annotated Snippet
static const struct file_operations sclp_ctl_fops = {
.owner = THIS_MODULE,
.open = nonseekable_open,
.unlocked_ioctl = sclp_ctl_ioctl,
};
/*
* Misc device definition
*/
static struct miscdevice sclp_ctl_device = {
.minor = MISC_DYNAMIC_MINOR,
.name = "sclp",
.fops = &sclp_ctl_fops,
};
builtin_misc_device(sclp_ctl_device);
Annotation
- Immediate include surface: `linux/uaccess.h`, `linux/miscdevice.h`, `linux/gfp.h`, `linux/init.h`, `linux/ioctl.h`, `linux/fs.h`, `asm/sclp_ctl.h`, `asm/sclp.h`.
- Detected declarations: `function sclp_ctl_cmdw_supported`, `function sclp_ctl_ioctl_sccb`, `function sclp_ctl_ioctl`.
- Atlas domain: Driver Families / drivers/s390.
- Implementation status: pattern implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
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.