Blame SOURCES/2a1d217660351c08eb2f8bccebf939abba2f7e69.patch

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