aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_mutex.c
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2016-05-18 03:34:02 +0000
committerMark Johnston <markj@FreeBSD.org>2016-05-18 03:34:02 +0000
commitbe2dfd58fefe6d365ba423763538224c7eaae6d3 (patch)
treeb86bc29504d2d248b7ecc55cbb5bbf4f293315fb /sys/kern/kern_mutex.c
parent632da4eb896f1279553b7e455a350ac7aaa25cc3 (diff)
downloadsrc-be2dfd58fefe6d365ba423763538224c7eaae6d3.tar.gz
src-be2dfd58fefe6d365ba423763538224c7eaae6d3.zip
Remove the MUTEX_DEBUG kernel option.
It has no counterpart among the other lock primitives and has been a no-op for years. Mutex consistency checks are generally done whenver INVARIANTS is enabled.
Notes
Notes: svn path=/head/; revision=300106
Diffstat (limited to 'sys/kern/kern_mutex.c')
-rw-r--r--sys/kern/kern_mutex.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c
index d9e5872e2a4f..3f62d171528d 100644
--- a/sys/kern/kern_mutex.c
+++ b/sys/kern/kern_mutex.c
@@ -845,37 +845,6 @@ __mtx_assert(const volatile uintptr_t *c, int what, const char *file, int line)
#endif
/*
- * The MUTEX_DEBUG-enabled mtx_validate()
- *
- * Most of these checks have been moved off into the LO_INITIALIZED flag
- * maintained by the witness code.
- */
-#ifdef MUTEX_DEBUG
-
-void mtx_validate(struct mtx *);
-
-void
-mtx_validate(struct mtx *m)
-{
-
-/*
- * XXX: When kernacc() does not require Giant we can reenable this check
- */
-#ifdef notyet
- /*
- * Can't call kernacc() from early init386(), especially when
- * initializing Giant mutex, because some stuff in kernacc()
- * requires Giant itself.
- */
- if (!cold)
- if (!kernacc((caddr_t)m, sizeof(m),
- VM_PROT_READ | VM_PROT_WRITE))
- panic("Can't read and write to mutex %p", m);
-#endif
-}
-#endif
-
-/*
* General init routine used by the MTX_SYSINIT() macro.
*/
void
@@ -908,11 +877,6 @@ _mtx_init(volatile uintptr_t *c, const char *name, const char *type, int opts)
("%s: mtx_lock not aligned for %s: %p", __func__, name,
&m->mtx_lock));
-#ifdef MUTEX_DEBUG
- /* Diagnostic and error correction */
- mtx_validate(m);
-#endif
-
/* Determine lock class and lock flags. */
if (opts & MTX_SPIN)
class = &lock_class_mtx_spin;