drivers/crypto/intel/iaa/iaa_crypto_stats.c

Source file repositories/reference/linux-study-clean/drivers/crypto/intel/iaa/iaa_crypto_stats.c

File Facts

System
Linux kernel
Corpus path
drivers/crypto/intel/iaa/iaa_crypto_stats.c
Extension
.c
Size
7236 bytes
Lines
272
Domain
Driver Families
Bucket
drivers/crypto
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 wq_stats_fops = {
	.open = wq_stats_open,
	.read = seq_read,
	.llseek = seq_lseek,
	.release = single_release,
};

static int global_stats_open(struct inode *inode, struct file *file)
{
	return single_open(file, global_stats_show, file);
}

static const struct file_operations global_stats_fops = {
	.open = global_stats_open,
	.read = seq_read,
	.llseek = seq_lseek,
	.release = single_release,
};

DEFINE_DEBUGFS_ATTRIBUTE(wq_stats_reset_fops, NULL, iaa_crypto_stats_reset, "%llu\n");

int __init iaa_crypto_debugfs_init(void)
{
	if (!debugfs_initialized())
		return -ENODEV;

	iaa_crypto_debugfs_root = debugfs_create_dir("iaa_crypto", NULL);

	debugfs_create_file("global_stats", 0644, iaa_crypto_debugfs_root, NULL,
			    &global_stats_fops);
	debugfs_create_file("wq_stats", 0644, iaa_crypto_debugfs_root, NULL,
			    &wq_stats_fops);
	debugfs_create_file("stats_reset", 0644, iaa_crypto_debugfs_root, NULL,
			    &wq_stats_reset_fops);

	return 0;
}

void __exit iaa_crypto_debugfs_cleanup(void)
{
	debugfs_remove_recursive(iaa_crypto_debugfs_root);
}

MODULE_LICENSE("GPL");

Annotation

Implementation Notes