drivers/edac/amd76x_edac.c
Source file repositories/reference/linux-study-clean/drivers/edac/amd76x_edac.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/edac/amd76x_edac.c- Extension
.c- Size
- 9481 bytes
- Lines
- 376
- Domain
- Driver Families
- Bucket
- drivers/edac
- 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/module.hlinux/init.hlinux/pci.hlinux/pci_ids.hlinux/edac.hedac_module.h
Detected Declarations
struct amd76x_error_infostruct amd76x_dev_infoenum amd76x_chipsfunction amd76x_get_error_infofunction amd76x_process_error_infofunction amd76x_checkfunction amd76x_init_csrowsfunction amd76x_probe1function amd76x_init_onefunction amd76x_remove_onefunction amd76x_initfunction amd76x_exitmodule init amd76x_init
Annotated Snippet
static struct pci_driver amd76x_driver = {
.name = EDAC_MOD_STR,
.probe = amd76x_init_one,
.remove = amd76x_remove_one,
.id_table = amd76x_pci_tbl,
};
static int __init amd76x_init(void)
{
/* Ensure that the OPSTATE is set correctly for POLL or NMI */
opstate_init();
return pci_register_driver(&amd76x_driver);
}
static void __exit amd76x_exit(void)
{
pci_unregister_driver(&amd76x_driver);
}
module_init(amd76x_init);
module_exit(amd76x_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Linux Networx (http://lnxi.com) Thayne Harbaugh");
MODULE_DESCRIPTION("MC support for AMD 76x memory controllers");
module_param(edac_op_state, int, 0444);
MODULE_PARM_DESC(edac_op_state, "EDAC Error Reporting state: 0=Poll,1=NMI");
Annotation
- Immediate include surface: `linux/module.h`, `linux/init.h`, `linux/pci.h`, `linux/pci_ids.h`, `linux/edac.h`, `edac_module.h`.
- Detected declarations: `struct amd76x_error_info`, `struct amd76x_dev_info`, `enum amd76x_chips`, `function amd76x_get_error_info`, `function amd76x_process_error_info`, `function amd76x_check`, `function amd76x_init_csrows`, `function amd76x_probe1`, `function amd76x_init_one`, `function amd76x_remove_one`.
- Atlas domain: Driver Families / drivers/edac.
- 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.