summaryrefslogtreecommitdiff
path: root/sysutils/mcelog/files/patch-p4.c
diff options
context:
space:
mode:
authorKurt Jaeger <pi@FreeBSD.org>2016-03-08 06:53:10 +0000
committerKurt Jaeger <pi@FreeBSD.org>2016-03-08 06:53:10 +0000
commit72704a08a799038d894737574fd66e2f41dbc10c (patch)
treef1c3c06c51a926d8016d52386b81d7697cead31d /sysutils/mcelog/files/patch-p4.c
parentHook py-tldextract to the build (diff)
sysutils/mcelog: 1.0pre3 -> 133
- Added version prefix - Switched to github over master sites - Removed patch_strip - Changed hard LDFLAGS to include - Fixed version in source - Updated distfile - Regenerated patchfiles for portlint - Modified several patchfiles, adapted to new version - submitter becomes maintainer PR: 207145 Submitted by: Ultima1252@gmail.com Approved by: Jeremy Chadwick <jdc@koitsu.org> (maintainer)
Notes
Notes: svn path=/head/; revision=410604
Diffstat (limited to 'sysutils/mcelog/files/patch-p4.c')
-rw-r--r--sysutils/mcelog/files/patch-p4.c69
1 files changed, 65 insertions, 4 deletions
diff --git a/sysutils/mcelog/files/patch-p4.c b/sysutils/mcelog/files/patch-p4.c
index f512eb8d6658..a9847f8bd8a8 100644
--- a/sysutils/mcelog/files/patch-p4.c
+++ b/sysutils/mcelog/files/patch-p4.c
@@ -1,13 +1,74 @@
---- ./p4.c.orig 2009-12-15 07:18:40.000000000 -0500
-+++ ./p4.c 2011-10-14 22:36:47.000000000 -0400
-@@ -175,8 +175,10 @@
+--- p4.c.orig 2016-02-10 18:38:43 UTC
++++ p4.c
+@@ -175,8 +175,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);
++#ifdef __Linux__
+ if (track == 2)
+ run_yellow_trigger(cpu, -1, levelnum, "unknown", level, socket);
++#endif
+ } else if (test_prefix(4, mca)) {
+ unsigned levelnum, typenum;
+ char *level, *type;
+@@ -185,8 +187,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);
++#ifdef __Linux__
+ if (track == 2)
+ run_yellow_trigger(cpu, typenum, levelnum, type, level, socket);
++#endif
+ } 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
Wprintf("%s CACHE %s %s Error\n", type, level,
get_RRRR_str((mca & CACHE_RRRR_MASK) >>
CACHE_RRRR_SHIFT));
+#ifdef __Linux__
if (track == 2)
- run_yellow_trigger(cpu, typenum, levelnum, type, level, socket);
+ run_yellow_trigger(cpu, typenum, levelnum, type, level,socket);
+#endif
} 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
+
+ Wprintf("BUS error: %d %d %s %s %s %s %s\n", socket, cpu,
+ level, pp, rrrr, ii, timeout);
++#ifdef __Linux__
+ run_bus_trigger(socket, cpu, level, pp, rrrr, ii, timeout);
++#endif
+ /* 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
+ fn = EXTRACT(misc, 16, 18);
+ Wprintf("IO MCA reported by root port %x:%02x:%02x.%x\n",
+ seg, bus, dev, fn);
++#ifdef __Linux__
+ run_iomca_trigger(socket, cpu, seg, bus, dev, fn);
++#endif
+ }
+ } else if (test_prefix(7, mca)) {
+ decode_memory_controller(mca, bank);
+@@ -365,14 +375,18 @@ void decode_intel_mc(struct mce *log, in
+
+ if (log->bank == MCE_THERMAL_BANK) {
+ decode_thermal(log, cpu);
++#ifdef __Linux__
+ run_unknown_trigger(socket, cpu, log);
++#endif
+ return;
+ }
+
+ decode_mcg(log->mcgstatus);
++#ifdef __Linux__
+ if (decode_mci(log->status, log->misc, cpu, log->mcgcap, ismemerr,
+ socket, log->bank))
+ run_unknown_trigger(socket, cpu, log);
++#endif
+
+ if (test_prefix(11, (log->status & 0xffffL))) {
+ switch (cputype) {