socsvn commit: r272133 - soc2014/op/freebsd-base/sys/kern
op at FreeBSD.org
op at FreeBSD.org
Sat Aug 9 15:33:32 UTC 2014
Author: op
Date: Sat Aug 9 15:33:31 2014
New Revision: 272133
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=272133
Log:
KSP: disable selftest + style
Signed-off-by: Oliver Pinter <oliver.pntr at gmail.com>
git: https://github.com/opntr/opBSD/tree/op/gsoc2014/smap+kpatch
Modified:
soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c
Modified: soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c
==============================================================================
--- soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c Sat Aug 9 15:33:22 2014 (r272132)
+++ soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c Sat Aug 9 15:33:31 2014 (r272133)
@@ -61,7 +61,9 @@
SYSCTL_INT(_debug, OID_AUTO, selfpatch_debug, CTLFLAG_RWTUN,
&selfpatch_debug, 0, "Set various levels of selfpatch debug");
+#ifdef KSP_DEBUG
__noinline void lf_selfpatch_selftest(void);
+#endif
bool
lf_selfpatch_patch_needed(struct lf_selfpatch *p)
@@ -84,15 +86,15 @@
}
}
- if (matched != NULL) {
- if ( (*(matched->featurep) & p->feature) != 0)
+ if (matched != NULL)
+ if ((*(matched->featurep) & p->feature) != 0)
return (true);
- }
-
+#ifdef KSP_DEBUG
if (p->feature_selector == KSP_SELFTEST)
if ((p->feature & KSP_FEATURE_SELFTEST) != 0)
return (true);
+#endif
return (false);
}
@@ -136,10 +138,12 @@
}
}
+#ifdef KSP_DEBUG
/*
* when selfpatch does not works, the system should crash
*/
lf_selfpatch_selftest();
+#endif
return (0);
}
@@ -241,6 +245,7 @@
return (0);
}
+#ifdef KSP_DEBUG
__noinline void
lf_selfpatch_selftest(void)
{
@@ -266,4 +271,4 @@
DBG("works.\n");
}
-
+#endif
More information about the svn-soc-all
mailing list