krishnanadh / rpms / rasdaemon

Forked from rpms/rasdaemon a year ago
Clone

Blame SOURCES/0046-rasdaemon-add-support-for-Knights-Landing.patch

d9e469
From bd6c78d89f4e934fafb1136a15efc0d6df4635ed Mon Sep 17 00:00:00 2001
d9e469
From: Aristeu Rozanski <arozansk@redhat.com>
d9e469
Date: Mon, 18 May 2015 14:19:33 -0300
d9e469
Subject: [PATCH 06/13] rasdaemon: add support for Knights Landing
d9e469
d9e469
Patch based on mcelog.
d9e469
d9e469
Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
d9e469
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
d9e469
---
d9e469
 ras-mce-handler.c | 3 +++
d9e469
 ras-mce-handler.h | 1 +
d9e469
 2 files changed, 4 insertions(+)
d9e469
d9e469
diff --git a/ras-mce-handler.c b/ras-mce-handler.c
d9e469
index e059b92..63f14fd 100644
d9e469
--- a/ras-mce-handler.c
d9e469
+++ b/ras-mce-handler.c
d9e469
@@ -50,6 +50,7 @@ static char *cputype_name[] = {
d9e469
 	[CPU_HASWELL] = "Haswell",
d9e469
 	[CPU_HASWELL_EPEX] = "Intel Xeon v3 (Haswell) EP/EX",
d9e469
 	[CPU_BROADWELL] = "Broadwell",
d9e469
+	[CPU_KNIGHTS_LANDING] = "Knights Landing",
d9e469
 };
d9e469
 
d9e469
 static enum cputype select_intel_cputype(struct ras_events *ras)
d9e469
@@ -91,6 +92,8 @@ static enum cputype select_intel_cputype(struct ras_events *ras)
d9e469
 			return CPU_HASWELL_EPEX;
d9e469
 		else if (mce->model == 0x3d)
d9e469
 			return CPU_BROADWELL;
d9e469
+		else if (mce->model == 0x57)
d9e469
+			return CPU_KNIGHTS_LANDING;
d9e469
 
d9e469
 		if (mce->model > 0x1a) {
d9e469
 			log(ALL, LOG_INFO,
d9e469
diff --git a/ras-mce-handler.h b/ras-mce-handler.h
d9e469
index ba01f55..28aad00 100644
d9e469
--- a/ras-mce-handler.h
d9e469
+++ b/ras-mce-handler.h
d9e469
@@ -45,6 +45,7 @@ enum cputype {
d9e469
 	CPU_HASWELL,
d9e469
 	CPU_HASWELL_EPEX,
d9e469
 	CPU_BROADWELL,
d9e469
+	CPU_KNIGHTS_LANDING,
d9e469
 };
d9e469
 
d9e469
 struct mce_event {
d9e469
-- 
d9e469
1.8.3.1
d9e469