[PATCH v2 0/3] EDAC/loongson: Improvements for Loongson EDAC driver

Qunqin Zhao <[email protected]>
Newsgroups org.kernel.vger.linux-edac,dev.linux.lists.loongarch,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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 v2:

Patch 1 "Encode node and MC info into mc_idx":
- mc_per_node -> mcs_per_node
- Use char other_detail[64] = {0} and drop the else branch
- Put snprintf() on one line
- If the definition of pvt_init is placed on a single line, it will
  exceed 100 characters, so the line break is kept.

- Use a temporary u32 variable for mc-idx to silence incompatible
  pointer type warning from device_property_read_u32(). Then keep
  the 'else' branch.
- Validate mc-per-node firmware property is non-zero to prevent
  division by zero

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

v1: https://lore.kernel.org/all/[email protected]/

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 | 84 ++++++++++++++++++++++++++++++++----
 1 file changed, 76 insertions(+), 8 deletions(-)


base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
-- 
2.47.3
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.