drivers/edac/i5000_edac.c
Source file repositories/reference/linux-study-clean/drivers/edac/i5000_edac.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/edac/i5000_edac.c- Extension
.c- Size
- 43526 bytes
- Lines
- 1599
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- 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/slab.hlinux/edac.hasm/mmzone.hedac_module.h
Detected Declarations
struct i5000_dev_infostruct i5000_dimm_infostruct i5000_pvtstruct i5000_error_infoenum i5000_chipsfunction i5000_get_error_infofunction i5000_process_fatal_error_infofunction i5000_process_nonfatal_error_infofunction i5000_process_error_infofunction i5000_clear_errorfunction i5000_check_errorfunction i5000_get_devicesfunction i5000_put_devicesfunction determine_amb_present_regfunction determine_mtrfunction decode_mtrfunction handle_channelfunction calculate_dimm_sizefunction i5000_get_mc_regsfunction i5000_init_csrowsfunction i5000_set_error_reportingfunction i5000_get_dimm_and_channel_countsfunction i5000_probe1function countfunction i5000_remove_onefunction i5000_initfunction i5000_exitmodule init i5000_init
Annotated Snippet
static struct pci_driver i5000_driver = {
.name = KBUILD_BASENAME,
.probe = i5000_init_one,
.remove = i5000_remove_one,
.id_table = i5000_pci_tbl,
};
/*
* i5000_init Module entry function
* Try to initialize this module for its devices
*/
static int __init i5000_init(void)
{
int pci_rc;
edac_dbg(2, "MC:\n");
/* Ensure that the OPSTATE is set correctly for POLL or NMI */
opstate_init();
pci_rc = pci_register_driver(&i5000_driver);
return (pci_rc < 0) ? pci_rc : 0;
}
/*
* i5000_exit() Module exit function
* Unregister the driver
*/
static void __exit i5000_exit(void)
{
edac_dbg(2, "MC:\n");
pci_unregister_driver(&i5000_driver);
}
module_init(i5000_init);
module_exit(i5000_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Linux Networx (http://lnxi.com) Doug Thompson <norsk5@xmission.com>");
MODULE_DESCRIPTION("MC Driver for Intel I5000 memory controllers - " I5000_REVISION);
module_param(edac_op_state, int, 0444);
MODULE_PARM_DESC(edac_op_state, "EDAC Error Reporting state: 0=Poll,1=NMI");
module_param(misc_messages, int, 0444);
MODULE_PARM_DESC(misc_messages, "Log miscellaneous non fatal messages");
Annotation
- Immediate include surface: `linux/module.h`, `linux/init.h`, `linux/pci.h`, `linux/pci_ids.h`, `linux/slab.h`, `linux/edac.h`, `asm/mmzone.h`, `edac_module.h`.
- Detected declarations: `struct i5000_dev_info`, `struct i5000_dimm_info`, `struct i5000_pvt`, `struct i5000_error_info`, `enum i5000_chips`, `function i5000_get_error_info`, `function i5000_process_fatal_error_info`, `function i5000_process_nonfatal_error_info`, `function i5000_process_error_info`, `function i5000_clear_error`.
- 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.