drivers/edac/i3200_edac.c
Source file repositories/reference/linux-study-clean/drivers/edac/i3200_edac.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/edac/i3200_edac.c- Extension
.c- Size
- 12972 bytes
- Lines
- 547
- 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.hlinux/io.hedac_module.hlinux/io-64-nonatomic-lo-hi.h
Detected Declarations
struct i3200_privstruct i3200_dev_infostruct i3200_error_infoenum i3200_chipsfunction how_many_channelsfunction eccerrlog_syndromefunction eccerrlog_rowfunction i3200_clear_error_infofunction i3200_get_and_clear_error_infofunction i3200_process_error_infofunction i3200_checkfunction i3200_get_drbsfunction i3200_is_stackedfunction drb_to_nr_pagesfunction i3200_probe1function i3200_init_onefunction i3200_remove_onefunction i3200_initfunction i3200_exitmodule init i3200_init
Annotated Snippet
static struct pci_driver i3200_driver = {
.name = EDAC_MOD_STR,
.probe = i3200_init_one,
.remove = i3200_remove_one,
.id_table = i3200_pci_tbl,
};
static int __init i3200_init(void)
{
int pci_rc;
edac_dbg(3, "MC:\n");
/* Ensure that the OPSTATE is set correctly for POLL or NMI */
opstate_init();
pci_rc = pci_register_driver(&i3200_driver);
if (pci_rc < 0)
goto fail0;
if (!mci_pdev) {
i3200_registered = 0;
mci_pdev = pci_get_device(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_3200_HB, NULL);
if (!mci_pdev) {
edac_dbg(0, "i3200 pci_get_device fail\n");
pci_rc = -ENODEV;
goto fail1;
}
pci_rc = i3200_init_one(mci_pdev, i3200_pci_tbl);
if (pci_rc < 0) {
edac_dbg(0, "i3200 init fail\n");
pci_rc = -ENODEV;
goto fail1;
}
}
return 0;
fail1:
pci_unregister_driver(&i3200_driver);
fail0:
pci_dev_put(mci_pdev);
return pci_rc;
}
static void __exit i3200_exit(void)
{
edac_dbg(3, "MC:\n");
pci_unregister_driver(&i3200_driver);
if (!i3200_registered) {
i3200_remove_one(mci_pdev);
pci_dev_put(mci_pdev);
}
}
module_init(i3200_init);
module_exit(i3200_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Akamai Technologies, Inc.");
MODULE_DESCRIPTION("MC support for Intel 3200 memory hub 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`, `linux/io.h`, `edac_module.h`, `linux/io-64-nonatomic-lo-hi.h`.
- Detected declarations: `struct i3200_priv`, `struct i3200_dev_info`, `struct i3200_error_info`, `enum i3200_chips`, `function how_many_channels`, `function eccerrlog_syndrome`, `function eccerrlog_row`, `function i3200_clear_error_info`, `function i3200_get_and_clear_error_info`, `function i3200_process_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.