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.
- 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/module.hlinux/kernel.hlinux/highmem.hlinux/mm.hlinux/slab.hlinux/delay.hlinux/smp.huapi/linux/idxd.hlinux/idxd.hlinux/dmaengine.h../../dma/idxd/idxd.hlinux/debugfs.hcrypto/internal/acompress.hiaa_crypto.hiaa_crypto_stats.h
Detected Declarations
function update_total_comp_callsfunction update_total_comp_bytes_outfunction update_total_decomp_callsfunction update_total_sw_decomp_callsfunction update_total_decomp_bytes_infunction update_completion_einval_errsfunction update_completion_timeout_errsfunction update_completion_comp_buf_overflow_errsfunction update_wq_comp_callsfunction update_wq_comp_bytesfunction update_wq_decomp_callsfunction update_wq_decomp_bytesfunction reset_iaa_crypto_statsfunction reset_wq_statsfunction reset_device_statsfunction wq_showfunction device_stats_showfunction global_stats_showfunction wq_stats_showfunction iaa_crypto_stats_resetfunction wq_stats_openfunction global_stats_openfunction iaa_crypto_debugfs_initfunction iaa_crypto_debugfs_cleanup
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
- Immediate include surface: `linux/module.h`, `linux/kernel.h`, `linux/highmem.h`, `linux/mm.h`, `linux/slab.h`, `linux/delay.h`, `linux/smp.h`, `uapi/linux/idxd.h`.
- Detected declarations: `function update_total_comp_calls`, `function update_total_comp_bytes_out`, `function update_total_decomp_calls`, `function update_total_sw_decomp_calls`, `function update_total_decomp_bytes_in`, `function update_completion_einval_errs`, `function update_completion_timeout_errs`, `function update_completion_comp_buf_overflow_errs`, `function update_wq_comp_calls`, `function update_wq_comp_bytes`.
- Atlas domain: Driver Families / drivers/crypto.
- 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.