drivers/xen/xenbus/xenbus_dev_backend.c
Source file repositories/reference/linux-study-clean/drivers/xen/xenbus/xenbus_dev_backend.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/xen/xenbus/xenbus_dev_backend.c- Extension
.c- Size
- 3082 bytes
- Lines
- 135
- Domain
- Driver Families
- Bucket
- drivers/xen
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/slab.hlinux/types.hlinux/mm.hlinux/fs.hlinux/miscdevice.hlinux/init.hlinux/capability.hxen/xen.hxen/page.hxen/xenbus.hxen/xenbus_dev.hxen/grant_table.hxen/events.hasm/xen/hypervisor.hxenbus.h
Detected Declarations
function xenbus_backend_openfunction xenbus_allocfunction xenbus_backend_ioctlfunction xenbus_backend_mmapfunction xenbus_backend_initmodule init xenbus_backend_init
Annotated Snippet
static const struct file_operations xenbus_backend_fops = {
.open = xenbus_backend_open,
.mmap = xenbus_backend_mmap,
.unlocked_ioctl = xenbus_backend_ioctl,
};
static struct miscdevice xenbus_backend_dev = {
.minor = MISC_DYNAMIC_MINOR,
.name = "xen/xenbus_backend",
.fops = &xenbus_backend_fops,
};
static int __init xenbus_backend_init(void)
{
int err;
if (!xen_initial_domain())
return -ENODEV;
err = misc_register(&xenbus_backend_dev);
if (err)
pr_err("Could not register xenbus backend device\n");
return err;
}
device_initcall(xenbus_backend_init);
Annotation
- Immediate include surface: `linux/slab.h`, `linux/types.h`, `linux/mm.h`, `linux/fs.h`, `linux/miscdevice.h`, `linux/init.h`, `linux/capability.h`, `xen/xen.h`.
- Detected declarations: `function xenbus_backend_open`, `function xenbus_alloc`, `function xenbus_backend_ioctl`, `function xenbus_backend_mmap`, `function xenbus_backend_init`, `module init xenbus_backend_init`.
- Atlas domain: Driver Families / drivers/xen.
- Implementation status: pattern 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.