]> www.infradead.org Git - users/mchehab/rasdaemon.git/commitdiff
rasdaemon: Identify the DIe Number in multidie system
authorMuralidhara M K <muralidhara.mk@amd.com>
Thu, 27 Jul 2023 10:18:12 +0000 (10:18 +0000)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Mon, 23 Oct 2023 09:27:18 +0000 (11:27 +0200)
Some AMD systems have 4 dies in each socket and Die ID represents
whether the error occured on cpu die or gpu die.
Also, respective Die used for FRU identification.

Signed-off-by: Muralidhara M K <muralidhara.mk@amd.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
mce-amd-smca.c

index 54060ee1e6ad9210e80c372fbe3b3ceb98907c64..a20f03c3ba1d7d85133f0ffc5f8b4ee4220b07e9 100644 (file)
@@ -935,10 +935,15 @@ void decode_smca_error(struct mce_event *e, struct mce_priv *m)
                             xec);
 
        if ((bank_type == SMCA_UMC || bank_type == SMCA_UMC_QUIRK) && xec == 0) {
-               channel = find_umc_channel(e);
-               csrow = e->synd & 0x7; /* Bit 0, 1 ,2 */
-               mce_snprintf(e->mc_location, "memory_channel=%d,csrow=%d",
-                            channel, csrow);
+               if ((m->family == 0x19) && (m->model >= 0x90 && m->model <= 0x9f)) {
+                       /* MCA_IPID[InstanceIdHi] give the AMD Node Die ID */
+                       mce_snprintf(e->mc_location, "memory_die_id=%d", mcatype_instancehi / 4);
+               } else {
+                       channel = find_umc_channel(e);
+                       csrow = e->synd & 0x7; /* Bit 0, 1 ,2 */
+                       mce_snprintf(e->mc_location, "memory_channel=%d,csrow=%d",
+                                    channel, csrow);
+               }
        }
 
        if (bank_type == SMCA_UMC_V2 && xec == 0) {