krishnanadh / rpms / rasdaemon

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