-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EDAC: Add support for EDAC device features control
Add generic EDAC device feature controls supporting the registration of RAS features available in the system. The driver exposes control attributes for these features to userspace in /sys/bus/edac/devices/<dev-name>/<ras-feature> [ bp: Touch-up documentation, simplify, make edac_dev_type static, fixup edac_dev_register() retvals. ] Co-developed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Shiju Jose <shiju.jose@huawei.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Fan Ni <fan.ni@samsung.com> Tested-by: Daniel Ferguson <danielf@os.amperecomputing.com> Tested-by: Fan Ni <fan.ni@samsung.com> Link: https://lore.kernel.org/r/20250212143654.1893-2-shiju.jose@huawei.com
- Loading branch information
Shiju Jose
authored and
Borislav Petkov (AMD)
committed
Feb 25, 2025
1 parent
0ad2507
commit db99ea5
Showing
4 changed files
with
230 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.2-no-invariants-or-later | ||
================= | ||
EDAC/RAS features | ||
================= | ||
|
||
Copyright (c) 2024-2025 HiSilicon Limited. | ||
|
||
:Author: Shiju Jose <shiju.jose@huawei.com> | ||
:License: The GNU Free Documentation License, Version 1.2 without | ||
Invariant Sections, Front-Cover Texts nor Back-Cover Texts. | ||
(dual licensed under the GPL v2) | ||
|
||
- Written for: 6.15 | ||
|
||
Introduction | ||
------------ | ||
|
||
EDAC/RAS components plugging and high-level design: | ||
|
||
1. Scrub control | ||
|
||
2. Error Check Scrub (ECS) control | ||
|
||
3. ACPI RAS2 features | ||
|
||
4. Post Package Repair (PPR) control | ||
|
||
5. Memory Sparing Repair control | ||
|
||
High level design is illustrated in the following diagram:: | ||
|
||
+-----------------------------------------------+ | ||
| Userspace - Rasdaemon | | ||
| +-------------+ | | ||
| | RAS CXL mem | +---------------+ | | ||
| |error handler|---->| | | | ||
| +-------------+ | RAS dynamic | | | ||
| +-------------+ | scrub, memory | | | ||
| | RAS memory |---->| repair control| | | ||
| |error handler| +----|----------+ | | ||
| +-------------+ | | | ||
+--------------------------|--------------------+ | ||
| | ||
| | ||
+-------------------------------|------------------------------+ | ||
| Kernel EDAC extension for | controlling RAS Features | | ||
|+------------------------------|----------------------------+ | | ||
|| EDAC Core Sysfs EDAC| Bus | | | ||
|| +--------------------------|---------------------------+| | | ||
|| |/sys/bus/edac/devices/<dev>/scrubX/ | | EDAC device || | | ||
|| |/sys/bus/edac/devices/<dev>/ecsX/ |<->| EDAC MC || | | ||
|| |/sys/bus/edac/devices/<dev>/repairX | | EDAC sysfs || | | ||
|| +---------------------------|--------------------------+| | | ||
|| EDAC|Bus | | | ||
|| | | | | ||
|| +----------+ Get feature | Get feature | | | ||
|| | | desc +---------|------+ desc +----------+ | | | ||
|| |EDAC scrub|<-----| EDAC device | | | | | | ||
|| +----------+ | driver- RAS |----->| EDAC mem | | | | ||
|| +----------+ | feature control| | repair | | | | ||
|| | |<-----| | +----------+ | | | ||
|| |EDAC ECS | +---------|------+ | | | ||
|| +----------+ Register RAS|features | | | ||
|| ______________________|_____________ | | | ||
|+---------|---------------|------------------|--------------+ | | ||
| +-------|----+ +-------|-------+ +----|----------+ | | ||
| | | | CXL mem driver| | Client driver | | | ||
| | ACPI RAS2 | | scrub, ECS, | | memory repair | | | ||
| | driver | | sparing, PPR | | features | | | ||
| +-----|------+ +-------|-------+ +------|--------+ | | ||
| | | | | | ||
+--------|-----------------|--------------------|--------------+ | ||
| | | | ||
+--------|-----------------|--------------------|--------------+ | ||
| +---|-----------------|--------------------|-------+ | | ||
| | | | | ||
| | Platform HW and Firmware | | | ||
| +--------------------------------------------------+ | | ||
+--------------------------------------------------------------+ | ||
|
||
|
||
1. EDAC Features components - Create feature-specific descriptors. For | ||
example: scrub, ECS, memory repair in the above diagram. | ||
|
||
2. EDAC device driver for controlling RAS Features - Get feature's attribute | ||
descriptors from EDAC RAS feature component and registers device's RAS | ||
features with EDAC bus and expose the features control attributes via | ||
sysfs. For example, /sys/bus/edac/devices/<dev-name>/<feature>X/ | ||
|
||
3. RAS dynamic feature controller - Userspace sample modules in rasdaemon for | ||
dynamic scrub/repair control to issue scrubbing/repair when excess number | ||
of corrected memory errors are reported in a short span of time. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.2-no-invariants-or-later | ||
============== | ||
EDAC Subsystem | ||
============== | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters