drivers/edac/i5400_edac.c
Source file repositories/reference/linux-study-clean/drivers/edac/i5400_edac.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/edac/i5400_edac.c- Extension
.c- Size
- 41204 bytes
- Lines
- 1486
- 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.hlinux/mmzone.hlinux/string_choices.hedac_module.h
Detected Declarations
struct i5400_dev_infostruct i5400_dimm_infostruct i5400_pvtstruct i5400_error_infoenum error_maskfunction to_nf_maskfunction from_nf_ferrfunction extract_fbdchan_indxfunction nrec_bankfunction nrec_rankfunction nrec_buf_idfunction nrec_rdwrfunction nrec_casfunction nrec_rasfunction rec_bankfunction rec_rankfunction rec_rdwrfunction rec_casfunction rec_rasfunction i5400_get_error_infofunction i5400_proccess_non_recoverable_infofunction i5400_process_nonfatal_error_infofunction i5400_process_error_infofunction i5400_clear_errorfunction i5400_check_errorfunction i5400_put_devicesfunction i5400_get_devicesfunction determine_amb_present_regfunction determine_mtrfunction decode_mtrfunction handle_channelfunction calculate_dimm_sizefunction i5400_get_mc_regsfunction i5400_init_dimmsfunction i5400_set_error_reportingfunction i5400_probe1function countfunction i5400_remove_onefunction i5400_initfunction i5400_exitmodule init i5400_init
Annotated Snippet
static struct pci_driver i5400_driver = {
.name = "i5400_edac",
.probe = i5400_init_one,
.remove = i5400_remove_one,
.id_table = i5400_pci_tbl,
};
/*
* i5400_init Module entry function
* Try to initialize this module for its devices
*/
static int __init i5400_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(&i5400_driver);
return (pci_rc < 0) ? pci_rc : 0;
}
/*
* i5400_exit() Module exit function
* Unregister the driver
*/
static void __exit i5400_exit(void)
{
edac_dbg(2, "MC:\n");
pci_unregister_driver(&i5400_driver);
}
module_init(i5400_init);
module_exit(i5400_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Ben Woodard <woodard@redhat.com>");
MODULE_AUTHOR("Mauro Carvalho Chehab");
MODULE_AUTHOR("Red Hat Inc. (https://www.redhat.com)");
MODULE_DESCRIPTION("MC Driver for Intel I5400 memory controllers - "
I5400_REVISION);
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/slab.h`, `linux/edac.h`, `linux/mmzone.h`, `linux/string_choices.h`.
- Detected declarations: `struct i5400_dev_info`, `struct i5400_dimm_info`, `struct i5400_pvt`, `struct i5400_error_info`, `enum error_mask`, `function to_nf_mask`, `function from_nf_ferr`, `function extract_fbdchan_indx`, `function nrec_bank`, `function nrec_rank`.
- 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.