krishnanadh / rpms / rasdaemon

Forked from rpms/rasdaemon a year ago
Clone

Blame SOURCES/0045-rasdaemon-add-support-for-Broadwell.patch

d9e469
From a9810094cf838e03102f95333db7ddfe810ccabd Mon Sep 17 00:00:00 2001
d9e469
From: Aristeu Rozanski <arozansk@redhat.com>
d9e469
Date: Mon, 18 May 2015 14:19:32 -0300
d9e469
Subject: [PATCH 05/13] rasdaemon: add support for Broadwell
d9e469
d9e469
Only basic support for now.
d9e469
d9e469
Based on mcelog code.
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 07e298f..e059b92 100644
d9e469
--- a/ras-mce-handler.c
d9e469
+++ b/ras-mce-handler.c
d9e469
@@ -49,6 +49,7 @@ static char *cputype_name[] = {
d9e469
 	[CPU_IVY_BRIDGE_EPEX] = "Ivy Bridge EP/EX",	/* Fill in better name */
d9e469
 	[CPU_HASWELL] = "Haswell",
d9e469
 	[CPU_HASWELL_EPEX] = "Intel Xeon v3 (Haswell) EP/EX",
d9e469
+	[CPU_BROADWELL] = "Broadwell",
d9e469
 };
d9e469
 
d9e469
 static enum cputype select_intel_cputype(struct ras_events *ras)
d9e469
@@ -88,6 +89,8 @@ static enum cputype select_intel_cputype(struct ras_events *ras)
d9e469
 			return CPU_HASWELL;
d9e469
 		else if (mce->model == 0x3f)
d9e469
 			return CPU_HASWELL_EPEX;
d9e469
+		else if (mce->model == 0x3d)
d9e469
+			return CPU_BROADWELL;
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 b8b3d4f..ba01f55 100644
d9e469
--- a/ras-mce-handler.h
d9e469
+++ b/ras-mce-handler.h
d9e469
@@ -44,6 +44,7 @@ enum cputype {
d9e469
 	CPU_IVY_BRIDGE_EPEX,
d9e469
 	CPU_HASWELL,
d9e469
 	CPU_HASWELL_EPEX,
d9e469
+	CPU_BROADWELL,
d9e469
 };
d9e469
 
d9e469
 struct mce_event {
d9e469
-- 
d9e469
1.8.3.1
d9e469