]> www.infradead.org Git - users/mchehab/rasdaemon.git/commitdiff
rasdaemon: Modify support for vendor-specific machine check error information
authorAvadhut Naik <avadhut.naik@amd.com>
Thu, 7 Nov 2024 06:24:44 +0000 (06:24 +0000)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 18 Nov 2024 12:49:56 +0000 (13:49 +0100)
Commit 83a3ced797256d ("rasdaemon: Add support for vendor-specific
machine check error information") assumes that MCA_CONFIG MSR will be
exported as part of vendor-specific error information through the MCE
tracepoint.

The same, however, is not true anymore. MCA_CONFIG MSR will not be
exported through the MCE tracepoint. Instead, the data from MCA_SYND1/2
MSRs, exported as vendor-specific error information on newer AMD SOCs,
should always be interpreted as FRUText.

Modify the error decoding support accordingly.

Fixes: 83a3ced797256d ("rasdaemon: Add support for vendor-specific
machine check error information")
Signed-off-by: Avadhut Naik <avadhut.naik@amd.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
mce-amd-smca.c
ras-mce-handler.c

index 909cb357c025697af87eada089db044a84a41890..a024e9c363b629421daf62a6e7fa83fc5b222002 100644 (file)
@@ -993,16 +993,8 @@ void decode_smca_error(struct mce_event *e, struct mce_priv *m)
                             channel, csrow);
        }
 
-       if (e->vdata_len) {
-               uint64_t smca_config = e->vdata[2];
-
-               /*
-                * BIT 9 of the CONFIG register of a few SMCA Bank types indicates
-                * presence of FRU Text in SYND 1 / 2 registers
-                */
-               if (smca_config & BIT(9))
-                       memcpy(e->frutext, e->vdata, 16);
-       }
+       if (e->vdata_len)
+               memcpy(e->frutext, e->vdata, 16);
 }
 
 int parse_amd_smca_event(struct ras_events *ras, struct mce_event *e)
index bf1fac013a760d249ae058daeb39c015a79dfec9..8713390b419b9d35552681690dd811b5ff479e82 100644 (file)
@@ -358,20 +358,8 @@ static void report_mce_event(struct ras_events *ras,
        if (!e->vdata_len)
                return;
 
-       if (strlen(e->frutext)) {
+       if (strlen(e->frutext))
                trace_seq_printf(s, ", FRU Text= %s", e->frutext);
-               trace_seq_printf(s, ", Vendor Data= ");
-               for (int i = 2; i < e->vdata_len / 8; i++) {
-                       trace_seq_printf(s, "0x%lx", e->vdata[i]);
-                       trace_seq_printf(s, " ");
-               }
-       } else {
-               trace_seq_printf(s, ", Vendor Data= ");
-               for (int i = 0; i < e->vdata_len / 8; i++) {
-                       trace_seq_printf(s, "0x%lx", e->vdata[i]);
-                       trace_seq_printf(s, " ");
-               }
-       }
 
        /*
         * FIXME: The original mcelog userspace tool uses DMI to map from