]> www.infradead.org Git - users/mchehab/rasdaemon.git/commitdiff
rasdaemon: Add 8 channel decoding for SMCA systems
authorMuralidhara M K <muralimk@amd.com>
Thu, 20 Aug 2020 15:30:57 +0000 (21:00 +0530)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 1 Sep 2020 06:44:39 +0000 (08:44 +0200)
Current Scalable Machine Check Architecture (SMCA) systems support up
to 8 UMC channels.

To find the UMC channel represented by a bank, look at the 6th nibble
in the MCA_IPID[InstanceId] field.

Signed-off-by: Muralidhara M K <muralimk@amd.com>
[ Adjust commit message. ]
Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
mce-amd-smca.c

index d0b6cb625f5eafa835c63bc6a1abde560f29cb8a..7c619fdd241093ca60d9bd45647e86e885ebd028 100644 (file)
@@ -438,15 +438,7 @@ static void amd_decode_errcode(struct mce_event *e)
  */
 static int find_umc_channel(struct mce_event *e)
 {
-       uint32_t umc_instance_id[] = {0x50f00, 0x150f00};
-       uint32_t instance_id = EXTRACT(e->ipid, 0, 31);
-       int i, channel = -1;
-
-       for (i = 0; i < ARRAY_SIZE(umc_instance_id); i++)
-               if (umc_instance_id[i] == instance_id)
-                       channel = i;
-
-       return channel;
+       return EXTRACT(e->ipid, 0, 31) >> 20;
 }
 /* Decode extended errors according to Scalable MCA specification */
 static void decode_smca_error(struct mce_event *e)