Blame SOURCES/2a1d217660351c08eb2f8bccebf939abba2f7e69.patch

1587ab
commit 2a1d217660351c08eb2f8bccebf939abba2f7e69
1587ab
Author: Brian WoodsGhannam, Yazen <brian.woods@amd.comYazen.Ghannam@amd.com>
1587ab
Date:   Fri Nov 1 15:48:13 2019 +0100
1587ab
1587ab
    rasdaemon: rename CPU_NAPLES cputype
1587ab
    
1587ab
    Change CPU_NAPLES to CPU_AMD_SMCA to reflect that it isn't just NAPLES
1587ab
    that is supported, but AMD's Scalable Machine Check Architecture (SMCA).
1587ab
    
1587ab
      [ Yazen: change family check to feature check, and change CPU name. ]
1587ab
    
1587ab
    CC: "mchehab+samsung@kernel.org" <mchehab+samsung@kernel.org>, "Namburu, Chandu-babu" <chandu@amd.com> # Thread-Topic: [PATCH 1/2] rasdaemon: rename CPU_NAPLES cputype
1587ab
    Signed-off-by: Brian Woods <brian.woods@amd.com>
1587ab
    Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
1587ab
    Cc: Chandu-babu Namburu <chandu@amd.com>
1587ab
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
1587ab
1587ab
---
1587ab
 ras-mce-handler.c |   10 ++++++----
1587ab
 ras-mce-handler.h |    2 +-
1587ab
 2 files changed, 7 insertions(+), 5 deletions(-)
1587ab
1587ab
--- rasdaemon-0.6.1.orig/ras-mce-handler.c	2021-05-26 15:16:24.699096556 -0400
1587ab
+++ rasdaemon-0.6.1/ras-mce-handler.c	2021-05-26 15:18:06.543162745 -0400
1587ab
@@ -55,7 +55,7 @@ [CPU_XEON75XX] = "Intel Xeon 7500 series
1587ab
 	[CPU_KNIGHTS_LANDING] = "Knights Landing",
1587ab
 	[CPU_KNIGHTS_MILL] = "Knights Mill",
1587ab
 	[CPU_SKYLAKE_XEON] = "Skylake server",
1587ab
-	[CPU_NAPLES] = "AMD Family 17h Zen1"
1587ab
+	[CPU_AMD_SMCA] = "AMD Scalable MCA",
1587ab
 };
1587ab
 
1587ab
 static enum cputype select_intel_cputype(struct ras_events *ras)
1587ab
@@ -191,8 +191,10 @@ ret = 0;
1587ab
 	if (!strcmp(mce->vendor, "AuthenticAMD")) {
1587ab
 		if (mce->family == 15)
1587ab
 			mce->cputype = CPU_K8;
1587ab
-		if (mce->family == 23)
1587ab
-			mce->cputype = CPU_NAPLES;
1587ab
+		if (strstr(mce->processor_flags, "smca")) {
1587ab
+			mce->cputype = CPU_AMD_SMCA;
1587ab
+			goto ret;
1587ab
+		}
1587ab
 		if (mce->family > 23) {
1587ab
 			log(ALL, LOG_INFO,
1587ab
 			    "Can't parse MCE for this AMD CPU yet %d\n",
1587ab
@@ -435,7 +437,7 @@ if (pevent_get_field_val(s, event, "ipid
1587ab
 	case CPU_K8:
1587ab
 		rc = parse_amd_k8_event(ras, &e);
1587ab
 		break;
1587ab
-	case CPU_NAPLES:
1587ab
+	case CPU_AMD_SMCA:
1587ab
 		rc = parse_amd_smca_event(ras, &e);
1587ab
 		break;
1587ab
 	default:			/* All other CPU types are Intel */
1587ab
--- rasdaemon-0.6.1.orig/ras-mce-handler.h	2021-05-26 15:17:15.409631590 -0400
1587ab
+++ rasdaemon-0.6.1/ras-mce-handler.h	2021-05-26 15:18:20.102038424 -0400
1587ab
@@ -50,7 +50,7 @@ enum cputype {
1587ab
 	CPU_KNIGHTS_LANDING,
1587ab
 	CPU_KNIGHTS_MILL,
1587ab
 	CPU_SKYLAKE_XEON,
1587ab
-	CPU_NAPLES,
1587ab
+	CPU_AMD_SMCA,
1587ab
 };
1587ab
 
1587ab
 struct mce_event {