drivers/edac/loongson_edac.c | 82 ++++++++++++++++++++++++++++++++---- 1 file changed, 74 insertions(+), 8 deletions(-)
This series contains three patches for the Loongson EDAC driver:
Patch 1: Encode node and MC info into mc_idx so that on multi-node
systems, sysfs entries uniquely identify each controller.
Patch 2: Get DIMM size from ACPI _DSM method instead of using hardcoded
values, enabling correct display of memory size in sysfs.
Patch 3: Add CS4-7 timeout filter for cross-node access on 3C6000
multi-node systems to prevent false CE error reports.
Changes in v4:
- int mcs_per_node; -> u32 mcs_per_node;
- int valid_cs_bits; -> u32 valid_cs_bits;
Changes in v3:
Patch 1 "Encode node and MC info into mc_idx":
- Drop mc_idx_u32 temporary variable; pass &mci->mc_idx directly
- Rename device property mc-per-node -> mcs-per-node
Patch 2 "Get DIMM size from ACPI _DSM method":
- Fix subject: get -> Get
- No code changes
Patch 3 "Add CS4-7 timeout filter for cross-node access":
- No changes
Changes in v2:
Patch 1 "Encode node and MC info into mc_idx":
- Use char other_detail[64] = {0} and drop the else branch
- Put snprintf() on one line
- Initialize mc_idx_valid = true and drop the else branch
- Validate mc-per-node firmware property is non-zero to prevent
division by zero
- Wrap pvt_init() function definition to satisfy 100-column limit
Patch 2 "get DIMM size from ACPI _DSM method":
- No changes; rebased on top of updated patch 1.
Patch 3 "Add CS4-7 timeout filter for cross-node access":
- Assign valid_cs_bits before calling read_ecc() in pvt_init() to
prevent using uninitialized data when establishing the baseline
error count
- Add bounds check for valid_cs_bits < 64 to guard against undefined
behavior when shifting a 64-bit value by 64 bits
- Rename device property valid_cs_bits -> valid-cs-bits to match
standard DT/ACPI _DSD hyphen convention
v3: https://lore.kernel.org/all/20260812064139.1231-1-zhaoqunqin@loongson.cn/
v2: https://lore.kernel.org/all/20260805085414.1482-1-zhaoqunqin@loongson.cn/
v1: https://lore.kernel.org/all/20260730063035.230686-1-zhaoqunqin@loongson.cn/
Qunqin Zhao (1):
EDAC/loongson: Add CS4-7 timeout filter for cross-node access
Wang Jinwei (2):
EDAC/loongson: Encode node and MC info into mc_idx
EDAC/loongson: Get DIMM size from ACPI _DSM method
drivers/edac/loongson_edac.c | 82 ++++++++++++++++++++++++++++++++----
1 file changed, 74 insertions(+), 8 deletions(-)
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
--
2.47.2
For this series:
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
On Wed, Sep 2, 2026 at 5:04 PM Qunqin Zhao <zhaoqunqin@loongson.cn> wrote:
>
> This series contains three patches for the Loongson EDAC driver:
>
> Patch 1: Encode node and MC info into mc_idx so that on multi-node
> systems, sysfs entries uniquely identify each controller.
>
> Patch 2: Get DIMM size from ACPI _DSM method instead of using hardcoded
> values, enabling correct display of memory size in sysfs.
>
> Patch 3: Add CS4-7 timeout filter for cross-node access on 3C6000
> multi-node systems to prevent false CE error reports.
>
> Changes in v4:
>
> - int mcs_per_node; -> u32 mcs_per_node;
> - int valid_cs_bits; -> u32 valid_cs_bits;
>
> Changes in v3:
>
> Patch 1 "Encode node and MC info into mc_idx":
> - Drop mc_idx_u32 temporary variable; pass &mci->mc_idx directly
> - Rename device property mc-per-node -> mcs-per-node
>
> Patch 2 "Get DIMM size from ACPI _DSM method":
> - Fix subject: get -> Get
> - No code changes
>
> Patch 3 "Add CS4-7 timeout filter for cross-node access":
> - No changes
>
> Changes in v2:
>
> Patch 1 "Encode node and MC info into mc_idx":
> - Use char other_detail[64] = {0} and drop the else branch
> - Put snprintf() on one line
> - Initialize mc_idx_valid = true and drop the else branch
> - Validate mc-per-node firmware property is non-zero to prevent
> division by zero
> - Wrap pvt_init() function definition to satisfy 100-column limit
>
> Patch 2 "get DIMM size from ACPI _DSM method":
> - No changes; rebased on top of updated patch 1.
>
> Patch 3 "Add CS4-7 timeout filter for cross-node access":
> - Assign valid_cs_bits before calling read_ecc() in pvt_init() to
> prevent using uninitialized data when establishing the baseline
> error count
> - Add bounds check for valid_cs_bits < 64 to guard against undefined
> behavior when shifting a 64-bit value by 64 bits
> - Rename device property valid_cs_bits -> valid-cs-bits to match
> standard DT/ACPI _DSD hyphen convention
>
> v3: https://lore.kernel.org/all/20260812064139.1231-1-zhaoqunqin@loongson.cn/
> v2: https://lore.kernel.org/all/20260805085414.1482-1-zhaoqunqin@loongson.cn/
> v1: https://lore.kernel.org/all/20260730063035.230686-1-zhaoqunqin@loongson.cn/
>
>
> Qunqin Zhao (1):
> EDAC/loongson: Add CS4-7 timeout filter for cross-node access
>
> Wang Jinwei (2):
> EDAC/loongson: Encode node and MC info into mc_idx
> EDAC/loongson: Get DIMM size from ACPI _DSM method
>
> drivers/edac/loongson_edac.c | 82 ++++++++++++++++++++++++++++++++----
> 1 file changed, 74 insertions(+), 8 deletions(-)
>
>
> base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
> --
> 2.47.2
>
© 2016 - 2026 Red Hat, Inc.