summaryrefslogtreecommitdiff
path: root/sysutils/mcelog/files/patch-p4.c
diff options
context:
space:
mode:
authorKurt Jaeger <pi@FreeBSD.org>2016-10-26 04:58:16 +0000
committerKurt Jaeger <pi@FreeBSD.org>2016-10-26 04:58:16 +0000
commitdf3df9df5d9aebb90ae5ba8f630a5b1d19dc55d1 (patch)
tree8ce493d53c1dfc90c3a8c32d0bc9d1743a42bd4e /sysutils/mcelog/files/patch-p4.c
parentdns/openmdns: silence rc.d warning (diff)
sysutils/mcelog: update 141 -> 143
- Mark dmi_entry as packed - Fix memory leak in sysfs reader for bad fields handling - Broadwell: Differentiate regular CE from UC error corrected by memory mirror - Add support to decode MSCOD values for Denverton server PR: 213795 Submitted by: Ultima1252@gmail.com (maintainer)
Notes
Notes: svn path=/head/; revision=424671
Diffstat (limited to 'sysutils/mcelog/files/patch-p4.c')
-rw-r--r--sysutils/mcelog/files/patch-p4.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/sysutils/mcelog/files/patch-p4.c b/sysutils/mcelog/files/patch-p4.c
index a9847f8bd8a8..acea7aa5bedc 100644
--- a/sysutils/mcelog/files/patch-p4.c
+++ b/sysutils/mcelog/files/patch-p4.c
@@ -1,6 +1,6 @@
---- p4.c.orig 2016-02-10 18:38:43 UTC
+--- p4.c.orig 2016-10-10 22:08:11 UTC
+++ p4.c
-@@ -175,8 +175,10 @@ static int decode_mca(u64 status, u64 mi
+@@ -176,8 +176,10 @@ static int decode_mca(u64 status, u64 mi
levelnum = mca & 3;
level = get_LL_str(levelnum);
Wprintf("%s Generic cache hierarchy error\n", level);
@@ -11,7 +11,7 @@
} else if (test_prefix(4, mca)) {
unsigned levelnum, typenum;
char *level, *type;
-@@ -185,8 +187,10 @@ static int decode_mca(u64 status, u64 mi
+@@ -186,8 +188,10 @@ static int decode_mca(u64 status, u64 mi
levelnum = (mca & TLB_LL_MASK) >> TLB_LL_SHIFT;
level = get_LL_str(levelnum);
Wprintf("%s TLB %s Error\n", type, level);
@@ -22,7 +22,7 @@
} else if (test_prefix(8, mca)) {
unsigned typenum = (mca & CACHE_TT_MASK) >> CACHE_TT_SHIFT;
unsigned levelnum = (mca & CACHE_LL_MASK) >> CACHE_LL_SHIFT;
-@@ -195,8 +199,10 @@ static int decode_mca(u64 status, u64 mi
+@@ -196,8 +200,10 @@ static int decode_mca(u64 status, u64 mi
Wprintf("%s CACHE %s %s Error\n", type, level,
get_RRRR_str((mca & CACHE_RRRR_MASK) >>
CACHE_RRRR_SHIFT));
@@ -33,7 +33,7 @@
} else if (test_prefix(10, mca)) {
if (mca == 0x400)
Wprintf("Internal Timer error\n");
-@@ -215,7 +221,9 @@ static int decode_mca(u64 status, u64 mi
+@@ -216,7 +222,9 @@ static int decode_mca(u64 status, u64 mi
Wprintf("BUS error: %d %d %s %s %s %s %s\n", socket, cpu,
level, pp, rrrr, ii, timeout);
@@ -43,7 +43,7 @@
/* IO MCA - reported as bus/interconnect with specific PP,T,RRRR,II,LL values
* and MISCV set. MISC register points to root port that reported the error
* need to cross check with AER logs for more details.
-@@ -231,7 +239,9 @@ static int decode_mca(u64 status, u64 mi
+@@ -232,7 +240,9 @@ static int decode_mca(u64 status, u64 mi
fn = EXTRACT(misc, 16, 18);
Wprintf("IO MCA reported by root port %x:%02x:%02x.%x\n",
seg, bus, dev, fn);
@@ -53,7 +53,14 @@
}
} else if (test_prefix(7, mca)) {
decode_memory_controller(mca, bank);
-@@ -365,14 +375,18 @@ void decode_intel_mc(struct mce *log, in
+@@ -382,19 +392,25 @@ static void decode_thermal(struct mce *l
+
+ void decode_intel_mc(struct mce *log, int cputype, int *ismemerr, unsigned size)
+ {
++#ifdef __Linux__
+ int socket = size > offsetof(struct mce, socketid) ? (int)log->socketid : -1;
++#endif
+ int cpu = log->extcpu ? log->extcpu : log->cpu;
if (log->bank == MCE_THERMAL_BANK) {
decode_thermal(log, cpu);