Skip to content

Commit 89a7617

Browse files
yghannamsuryasaimadhu
authored andcommitted
x86/MCE/AMD, EDAC/mce_amd: Add new Load Store unit McaType
Add support for a new version of the Load Store unit bank type as indicated by its McaType value, which will be present in future SMCA systems. Add the new (HWID, MCATYPE) tuple. Reuse the same name, since this is logically the same to the user. Also, add the new error descriptions to edac_mce_amd. Signed-off-by: Yazen Ghannam <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 7a8bc2b commit 89a7617

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

arch/x86/include/asm/mce.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ extern void apei_mce_report_mem_error(int corrected,
290290
/* These may be used by multiple smca_hwid_mcatypes */
291291
enum smca_bank_types {
292292
SMCA_LS = 0, /* Load Store */
293+
SMCA_LS_V2, /* Load Store */
293294
SMCA_IF, /* Instruction Fetch */
294295
SMCA_L2_CACHE, /* L2 Cache */
295296
SMCA_DE, /* Decoder Unit */

arch/x86/kernel/cpu/mce/amd.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ struct smca_bank_name {
7878

7979
static struct smca_bank_name smca_names[] = {
8080
[SMCA_LS] = { "load_store", "Load Store Unit" },
81+
[SMCA_LS_V2] = { "load_store", "Load Store Unit" },
8182
[SMCA_IF] = { "insn_fetch", "Instruction Fetch Unit" },
8283
[SMCA_L2_CACHE] = { "l2_cache", "L2 Cache" },
8384
[SMCA_DE] = { "decode_unit", "Decode Unit" },
@@ -138,6 +139,7 @@ static struct smca_hwid smca_hwid_mcatypes[] = {
138139

139140
/* ZN Core (HWID=0xB0) MCA types */
140141
{ SMCA_LS, HWID_MCATYPE(0xB0, 0x0), 0x1FFFFF },
142+
{ SMCA_LS_V2, HWID_MCATYPE(0xB0, 0x10), 0xFFFFFF },
141143
{ SMCA_IF, HWID_MCATYPE(0xB0, 0x1), 0x3FFF },
142144
{ SMCA_L2_CACHE, HWID_MCATYPE(0xB0, 0x2), 0xF },
143145
{ SMCA_DE, HWID_MCATYPE(0xB0, 0x3), 0x1FF },

drivers/edac/mce_amd.c

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,33 @@ static const char * const smca_ls_mce_desc[] = {
175175
"L2 Fill Data error",
176176
};
177177

178+
static const char * const smca_ls2_mce_desc[] = {
179+
"An ECC error was detected on a data cache read by a probe or victimization",
180+
"An ECC error or L2 poison was detected on a data cache read by a load",
181+
"An ECC error was detected on a data cache read-modify-write by a store",
182+
"An ECC error or poison bit mismatch was detected on a tag read by a probe or victimization",
183+
"An ECC error or poison bit mismatch was detected on a tag read by a load",
184+
"An ECC error or poison bit mismatch was detected on a tag read by a store",
185+
"An ECC error was detected on an EMEM read by a load",
186+
"An ECC error was detected on an EMEM read-modify-write by a store",
187+
"A parity error was detected in an L1 TLB entry by any access",
188+
"A parity error was detected in an L2 TLB entry by any access",
189+
"A parity error was detected in a PWC entry by any access",
190+
"A parity error was detected in an STQ entry by any access",
191+
"A parity error was detected in an LDQ entry by any access",
192+
"A parity error was detected in a MAB entry by any access",
193+
"A parity error was detected in an SCB entry state field by any access",
194+
"A parity error was detected in an SCB entry address field by any access",
195+
"A parity error was detected in an SCB entry data field by any access",
196+
"A parity error was detected in a WCB entry by any access",
197+
"A poisoned line was detected in an SCB entry by any access",
198+
"A SystemReadDataError error was reported on read data returned from L2 for a load",
199+
"A SystemReadDataError error was reported on read data returned from L2 for an SCB store",
200+
"A SystemReadDataError error was reported on read data returned from L2 for a WCB store",
201+
"A hardware assertion error was reported",
202+
"A parity error was detected in an STLF, SCB EMEM entry or SRB store data by any access",
203+
};
204+
178205
static const char * const smca_if_mce_desc[] = {
179206
"Op Cache Microtag Probe Port Parity Error",
180207
"IC Microtag or Full Tag Multi-hit Error",
@@ -378,6 +405,7 @@ struct smca_mce_desc {
378405

379406
static struct smca_mce_desc smca_mce_descs[] = {
380407
[SMCA_LS] = { smca_ls_mce_desc, ARRAY_SIZE(smca_ls_mce_desc) },
408+
[SMCA_LS_V2] = { smca_ls2_mce_desc, ARRAY_SIZE(smca_ls2_mce_desc) },
381409
[SMCA_IF] = { smca_if_mce_desc, ARRAY_SIZE(smca_if_mce_desc) },
382410
[SMCA_L2_CACHE] = { smca_l2_mce_desc, ARRAY_SIZE(smca_l2_mce_desc) },
383411
[SMCA_DE] = { smca_de_mce_desc, ARRAY_SIZE(smca_de_mce_desc) },

0 commit comments

Comments
 (0)