Skip to content

Commit aaf985e

Browse files
committed
Merge tag 'edac_updates_for_5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras
Pull EDAC updates from Borislav Petkov: - A substantial edac_mc cleanup, sanitizing object freeing, streamlining and simplifying code flow, and getting rid of a lot of needless complexity in memory controller representation code, by Robert Richter. - A new EDAC driver for the ARM DMC-520 memory controller, by Lei Wang, Shiping Ji and others. - The usual sprinkling of misc cleanups and fixes all over the subsystem. * tag 'edac_updates_for_5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/armada_xp: Use scnprintf() for avoiding potential buffer overflow EDAC/synopsys: Do not dump uninitialized pinf->col EDAC: Add EDAC driver for DMC520 dt-bindings: edac: Dmc-520.yaml EDAC/mce_amd: Print !SMCA processor warning only once EDAC/mc: Remove per layer counters EDAC/mc: Remove detail[] string and cleanup error string generation EDAC/mc: Pass the error descriptor to error reporting functions EDAC/mc: Remove enable_per_layer_report function argument EDAC/mc: Report "unknown memory" on too many DIMM labels found EDAC/mc: Carve out error increment into a separate function EDAC/mc: Determine mci pointer from the error descriptor EDAC: Store error type in struct edac_raw_error_desc EDAC/mc: Reorder functions edac_mc_alloc*() EDAC/mc: Split edac_mc_alloc() into smaller functions EDAC/mc: Change mci device removal to use put_device()
2 parents c271bdb + 41dac9a commit aaf985e

File tree

14 files changed

+1054
-378
lines changed

14 files changed

+1054
-378
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/edac/dmc-520.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: ARM DMC-520 EDAC bindings
8+
9+
maintainers:
10+
- Lei Wang <[email protected]>
11+
12+
description: |+
13+
DMC-520 node is defined to describe DRAM error detection and correction.
14+
15+
https://static.docs.arm.com/100000/0200/corelink_dmc520_trm_100000_0200_01_en.pdf
16+
17+
properties:
18+
compatible:
19+
items:
20+
- const: brcm,dmc-520
21+
- const: arm,dmc-520
22+
23+
reg:
24+
maxItems: 1
25+
26+
interrupts:
27+
minItems: 1
28+
maxItems: 10
29+
30+
interrupt-names:
31+
minItems: 1
32+
maxItems: 10
33+
items:
34+
enum:
35+
- ram_ecc_errc
36+
- ram_ecc_errd
37+
- dram_ecc_errc
38+
- dram_ecc_errd
39+
- failed_access
40+
- failed_prog
41+
- link_err
42+
- temperature_event
43+
- arch_fsm
44+
- phy_request
45+
46+
required:
47+
- compatible
48+
- reg
49+
- interrupts
50+
- interrupt-names
51+
52+
examples:
53+
- |
54+
dmc0: dmc@200000 {
55+
compatible = "brcm,dmc-520", "arm,dmc-520";
56+
reg = <0x200000 0x80000>;
57+
interrupts = <0x0 0x349 0x4>, <0x0 0x34B 0x4>;
58+
interrupt-names = "dram_ecc_errc", "dram_ecc_errd";
59+
};

MAINTAINERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5998,6 +5998,12 @@ F: Documentation/driver-api/edac.rst
59985998
F: drivers/edac/
59995999
F: include/linux/edac.h
60006000

6001+
EDAC-DMC520
6002+
M: Lei Wang <[email protected]>
6003+
6004+
S: Supported
6005+
F: drivers/edac/dmc520_edac.c
6006+
60016007
EDAC-E752X
60026008
M: Mark Gross <[email protected]>
60036009

drivers/edac/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,4 +523,11 @@ config EDAC_BLUEFIELD
523523
Support for error detection and correction on the
524524
Mellanox BlueField SoCs.
525525

526+
config EDAC_DMC520
527+
tristate "ARM DMC-520 ECC"
528+
depends on ARM64
529+
help
530+
Support for error detection and correction on the
531+
SoCs with ARM DMC-520 DRAM controller.
532+
526533
endif # EDAC

drivers/edac/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,4 @@ obj-$(CONFIG_EDAC_TI) += ti_edac.o
8787
obj-$(CONFIG_EDAC_QCOM) += qcom_edac.o
8888
obj-$(CONFIG_EDAC_ASPEED) += aspeed_edac.o
8989
obj-$(CONFIG_EDAC_BLUEFIELD) += bluefield_edac.o
90+
obj-$(CONFIG_EDAC_DMC520) += dmc520_edac.o

drivers/edac/armada_xp_edac.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -429,46 +429,46 @@ static void aurora_l2_check(struct edac_device_ctl_info *dci)
429429

430430
src = (attr_cap & AURORA_ERR_ATTR_SRC_MSK) >> AURORA_ERR_ATTR_SRC_OFF;
431431
if (src <= 3)
432-
len += snprintf(msg+len, size-len, "src=CPU%d ", src);
432+
len += scnprintf(msg+len, size-len, "src=CPU%d ", src);
433433
else
434-
len += snprintf(msg+len, size-len, "src=IO ");
434+
len += scnprintf(msg+len, size-len, "src=IO ");
435435

436436
txn = (attr_cap & AURORA_ERR_ATTR_TXN_MSK) >> AURORA_ERR_ATTR_TXN_OFF;
437437
switch (txn) {
438438
case 0:
439-
len += snprintf(msg+len, size-len, "txn=Data-Read ");
439+
len += scnprintf(msg+len, size-len, "txn=Data-Read ");
440440
break;
441441
case 1:
442-
len += snprintf(msg+len, size-len, "txn=Isn-Read ");
442+
len += scnprintf(msg+len, size-len, "txn=Isn-Read ");
443443
break;
444444
case 2:
445-
len += snprintf(msg+len, size-len, "txn=Clean-Flush ");
445+
len += scnprintf(msg+len, size-len, "txn=Clean-Flush ");
446446
break;
447447
case 3:
448-
len += snprintf(msg+len, size-len, "txn=Eviction ");
448+
len += scnprintf(msg+len, size-len, "txn=Eviction ");
449449
break;
450450
case 4:
451-
len += snprintf(msg+len, size-len,
451+
len += scnprintf(msg+len, size-len,
452452
"txn=Read-Modify-Write ");
453453
break;
454454
}
455455

456456
err = (attr_cap & AURORA_ERR_ATTR_ERR_MSK) >> AURORA_ERR_ATTR_ERR_OFF;
457457
switch (err) {
458458
case 0:
459-
len += snprintf(msg+len, size-len, "err=CorrECC ");
459+
len += scnprintf(msg+len, size-len, "err=CorrECC ");
460460
break;
461461
case 1:
462-
len += snprintf(msg+len, size-len, "err=UnCorrECC ");
462+
len += scnprintf(msg+len, size-len, "err=UnCorrECC ");
463463
break;
464464
case 2:
465-
len += snprintf(msg+len, size-len, "err=TagParity ");
465+
len += scnprintf(msg+len, size-len, "err=TagParity ");
466466
break;
467467
}
468468

469-
len += snprintf(msg+len, size-len, "addr=0x%x ", addr_cap & AURORA_ERR_ADDR_CAP_ADDR_MASK);
470-
len += snprintf(msg+len, size-len, "index=0x%x ", (way_cap & AURORA_ERR_WAY_IDX_MSK) >> AURORA_ERR_WAY_IDX_OFF);
471-
len += snprintf(msg+len, size-len, "way=0x%x", (way_cap & AURORA_ERR_WAY_CAP_WAY_MASK) >> AURORA_ERR_WAY_CAP_WAY_OFFSET);
469+
len += scnprintf(msg+len, size-len, "addr=0x%x ", addr_cap & AURORA_ERR_ADDR_CAP_ADDR_MASK);
470+
len += scnprintf(msg+len, size-len, "index=0x%x ", (way_cap & AURORA_ERR_WAY_IDX_MSK) >> AURORA_ERR_WAY_IDX_OFF);
471+
len += scnprintf(msg+len, size-len, "way=0x%x", (way_cap & AURORA_ERR_WAY_CAP_WAY_MASK) >> AURORA_ERR_WAY_CAP_WAY_OFFSET);
472472

473473
/* clear error capture registers */
474474
writel(AURORA_ERR_ATTR_CAP_VALID, drvdata->base + AURORA_ERR_ATTR_CAP_REG);

0 commit comments

Comments
 (0)