include/linux/edac.h
Source file repositories/reference/linux-study-clean/include/linux/edac.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/edac.h- Extension
.h- Size
- 29605 bytes
- Lines
- 891
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- 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/atomic.hlinux/device.hlinux/completion.hlinux/workqueue.hlinux/debugfs.hlinux/numa.h
Detected Declarations
struct devicestruct edac_mc_layerstruct dimm_infostruct rank_infostruct csrow_infostruct errcount_attribute_datastruct edac_raw_error_descstruct mem_ctl_infostruct edac_scrub_opsstruct edac_ecs_opsstruct edac_ecs_ex_infostruct edac_mem_repair_opsstruct edac_dev_datastruct edac_dev_feat_ctxstruct edac_dev_featureenum dev_typeenum hw_event_mc_err_typeenum mem_typeenum edac_typeenum scrub_typeenum edac_mc_layer_typeenum edac_dev_featenum edac_mem_repair_typeenum edac_mem_repair_cmdfunction opstate_initfunction edac_scrub_get_descfunction edac_ecs_get_descfunction edac_mem_repair_get_desc
Annotated Snippet
const struct bus_type *edac_get_sysfs_subsys(void);
static inline void opstate_init(void)
{
switch (edac_op_state) {
case EDAC_OPSTATE_POLL:
case EDAC_OPSTATE_NMI:
break;
default:
edac_op_state = EDAC_OPSTATE_POLL;
}
return;
}
/* Max length of a DIMM label*/
#define EDAC_MC_LABEL_LEN 31
/* Maximum size of the location string */
#define LOCATION_SIZE 256
/* Defines the maximum number of labels that can be reported */
#define EDAC_MAX_LABELS 8
/* String used to join two or more labels */
#define OTHER_LABEL " or "
/**
* enum dev_type - describe the type of memory DRAM chips used at the stick
* @DEV_UNKNOWN: Can't be determined, or MC doesn't support detect it
* @DEV_X1: 1 bit for data
* @DEV_X2: 2 bits for data
* @DEV_X4: 4 bits for data
* @DEV_X8: 8 bits for data
* @DEV_X16: 16 bits for data
* @DEV_X32: 32 bits for data
* @DEV_X64: 64 bits for data
*
* Typical values are x4 and x8.
*/
enum dev_type {
DEV_UNKNOWN = 0,
DEV_X1,
DEV_X2,
DEV_X4,
DEV_X8,
DEV_X16,
DEV_X32, /* Do these parts exist? */
DEV_X64 /* Do these parts exist? */
};
#define DEV_FLAG_UNKNOWN BIT(DEV_UNKNOWN)
#define DEV_FLAG_X1 BIT(DEV_X1)
#define DEV_FLAG_X2 BIT(DEV_X2)
#define DEV_FLAG_X4 BIT(DEV_X4)
#define DEV_FLAG_X8 BIT(DEV_X8)
#define DEV_FLAG_X16 BIT(DEV_X16)
#define DEV_FLAG_X32 BIT(DEV_X32)
#define DEV_FLAG_X64 BIT(DEV_X64)
/**
* enum hw_event_mc_err_type - type of the detected error
*
* @HW_EVENT_ERR_CORRECTED: Corrected Error - Indicates that an ECC
* corrected error was detected
* @HW_EVENT_ERR_UNCORRECTED: Uncorrected Error - Indicates an error that
* can't be corrected by ECC, but it is not
* fatal (maybe it is on an unused memory area,
* or the memory controller could recover from
* it for example, by re-trying the operation).
* @HW_EVENT_ERR_DEFERRED: Deferred Error - Indicates an uncorrectable
* error whose handling is not urgent. This could
* be due to hardware data poisoning where the
* system can continue operation until the poisoned
* data is consumed. Preemptive measures may also
* be taken, e.g. offlining pages, etc.
* @HW_EVENT_ERR_FATAL: Fatal Error - Uncorrected error that could not
* be recovered.
* @HW_EVENT_ERR_INFO: Informational - The CPER spec defines a forth
* type of error: informational logs.
*/
enum hw_event_mc_err_type {
HW_EVENT_ERR_CORRECTED,
HW_EVENT_ERR_UNCORRECTED,
HW_EVENT_ERR_DEFERRED,
HW_EVENT_ERR_FATAL,
HW_EVENT_ERR_INFO,
};
static inline char *mc_event_error_type(const unsigned int err_type)
{
Annotation
- Immediate include surface: `linux/atomic.h`, `linux/device.h`, `linux/completion.h`, `linux/workqueue.h`, `linux/debugfs.h`, `linux/numa.h`.
- Detected declarations: `struct device`, `struct edac_mc_layer`, `struct dimm_info`, `struct rank_info`, `struct csrow_info`, `struct errcount_attribute_data`, `struct edac_raw_error_desc`, `struct mem_ctl_info`, `struct edac_scrub_ops`, `struct edac_ecs_ops`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.