krishnanadh / rpms / rasdaemon

Forked from rpms/rasdaemon a year ago
Clone

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

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