drivers/edac/i7300_edac.c
Source file repositories/reference/linux-study-clean/drivers/edac/i7300_edac.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/edac/i7300_edac.c- Extension
.c- Size
- 36494 bytes
- Lines
- 1231
- 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 i7300_dev_infostruct i7300_dimm_infostruct i7300_pvtfunction get_err_from_tablefunction i7300_process_error_globalfunction i7300_process_fbd_errorfunction i7300_check_errorfunction i7300_clear_errorfunction i7300_set_error_reportingfunction decode_mtrfunction print_dimm_sizefunction i7300_init_csrowsfunction decode_mirfunction i7300_get_mc_regsfunction i7300_put_devicesfunction i7300_get_devicesfunction i7300_init_onefunction i7300_remove_onefunction i7300_initfunction i7300_exitmodule init i7300_init
Annotated Snippet
static struct pci_driver i7300_driver = {
.name = "i7300_edac",
.probe = i7300_init_one,
.remove = i7300_remove_one,
.id_table = i7300_pci_tbl,
};
/**
* i7300_init() - Registers the driver
*/
static int __init i7300_init(void)
{
int pci_rc;
edac_dbg(2, "\n");
/* Ensure that the OPSTATE is set correctly for POLL or NMI */
opstate_init();
pci_rc = pci_register_driver(&i7300_driver);
return (pci_rc < 0) ? pci_rc : 0;
}
/**
* i7300_exit() - Unregisters the driver
*/
static void __exit i7300_exit(void)
{
edac_dbg(2, "\n");
pci_unregister_driver(&i7300_driver);
}
module_init(i7300_init);
module_exit(i7300_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mauro Carvalho Chehab");
MODULE_AUTHOR("Red Hat Inc. (https://www.redhat.com)");
MODULE_DESCRIPTION("MC Driver for Intel I7300 memory controllers - "
I7300_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 i7300_dev_info`, `struct i7300_dimm_info`, `struct i7300_pvt`, `function get_err_from_table`, `function i7300_process_error_global`, `function i7300_process_fbd_error`, `function i7300_check_error`, `function i7300_clear_error`, `function i7300_set_error_reporting`, `function decode_mtr`.
- 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.