drivers/edac/ie31200_edac.c
Source file repositories/reference/linux-study-clean/drivers/edac/ie31200_edac.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/edac/ie31200_edac.c- Extension
.c- Size
- 28016 bytes
- Lines
- 846
- 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/bitfield.hlinux/module.hlinux/init.hlinux/pci.hlinux/pci_ids.hlinux/edac.hlinux/io-64-nonatomic-lo-hi.hasm/mce.hasm/msr.hedac_module.h
Detected Declarations
struct res_configstruct ie31200_privstruct ie31200_dev_infostruct ie31200_error_infostruct dimm_dataenum ie31200_chipsfunction how_many_channelsfunction ecc_capablefunction ie31200_clear_error_infofunction ie31200_get_and_clear_error_infofunction ie31200_process_error_infofunction __ie31200_checkfunction ie31200_checkfunction populate_dimm_infofunction ie31200_get_dimm_configfunction ie31200_register_mcifunction mce_checkfunction mce_handlerfunction ie31200_unregister_mcisfunction ie31200_probe1function ie31200_init_onefunction ie31200_remove_onefunction ie31200_initfunction ie31200_exitmodule init ie31200_init
Annotated Snippet
static struct pci_driver ie31200_driver = {
.name = EDAC_MOD_STR,
.probe = ie31200_init_one,
.remove = ie31200_remove_one,
.id_table = ie31200_pci_tbl,
};
static int __init ie31200_init(void)
{
int pci_rc, i;
edac_dbg(3, "MC:\n");
pci_rc = pci_register_driver(&ie31200_driver);
if (pci_rc < 0)
return pci_rc;
if (!mci_pdev) {
ie31200_registered = 0;
for (i = 0; ie31200_pci_tbl[i].vendor != 0; i++) {
mci_pdev = pci_get_device(ie31200_pci_tbl[i].vendor,
ie31200_pci_tbl[i].device,
NULL);
if (mci_pdev)
break;
}
if (!mci_pdev) {
edac_dbg(0, "ie31200 pci_get_device fail\n");
pci_rc = -ENODEV;
goto fail0;
}
pci_rc = ie31200_init_one(mci_pdev, &ie31200_pci_tbl[i]);
if (pci_rc < 0) {
edac_dbg(0, "ie31200 init fail\n");
pci_rc = -ENODEV;
goto fail1;
}
}
return 0;
fail1:
pci_dev_put(mci_pdev);
fail0:
pci_unregister_driver(&ie31200_driver);
return pci_rc;
}
static void __exit ie31200_exit(void)
{
edac_dbg(3, "MC:\n");
pci_unregister_driver(&ie31200_driver);
if (!ie31200_registered)
ie31200_remove_one(mci_pdev);
}
module_init(ie31200_init);
module_exit(ie31200_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Jason Baron <jbaron@akamai.com>");
MODULE_DESCRIPTION("MC support for Intel Processor E31200 memory hub controllers");
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/module.h`, `linux/init.h`, `linux/pci.h`, `linux/pci_ids.h`, `linux/edac.h`, `linux/io-64-nonatomic-lo-hi.h`, `asm/mce.h`.
- Detected declarations: `struct res_config`, `struct ie31200_priv`, `struct ie31200_dev_info`, `struct ie31200_error_info`, `struct dimm_data`, `enum ie31200_chips`, `function how_many_channels`, `function ecc_capable`, `function ie31200_clear_error_info`, `function ie31200_get_and_clear_error_info`.
- 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.