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.

Dependency Surface

Detected Declarations

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

Implementation Notes