svn commit: r242151 - in head/sys: vm xen/evtchn
Andre Oppermann
andre at FreeBSD.org
Fri Oct 26 17:31:36 UTC 2012
Author: andre
Date: Fri Oct 26 17:31:35 2012
New Revision: 242151
URL: http://svn.freebsd.org/changeset/base/242151
Log:
Move the corresponding MTX_SYSINIT() next to their struct mtx declaration
to make their relationship more obvious as done with the other such mutexs.
Modified:
head/sys/vm/vm_glue.c
head/sys/xen/evtchn/evtchn.c
Modified: head/sys/vm/vm_glue.c
==============================================================================
--- head/sys/vm/vm_glue.c Fri Oct 26 17:02:50 2012 (r242150)
+++ head/sys/vm/vm_glue.c Fri Oct 26 17:31:35 2012 (r242151)
@@ -307,6 +307,8 @@ struct kstack_cache_entry *kstack_cache;
static int kstack_cache_size = 128;
static int kstacks;
static struct mtx kstack_cache_mtx;
+MTX_SYSINIT(kstack_cache, &kstack_cache_mtx, "kstkch", MTX_DEF);
+
SYSCTL_INT(_vm, OID_AUTO, kstack_cache_size, CTLFLAG_RW, &kstack_cache_size, 0,
"");
SYSCTL_INT(_vm, OID_AUTO, kstacks, CTLFLAG_RD, &kstacks, 0,
@@ -486,7 +488,6 @@ kstack_cache_init(void *nulll)
EVENTHANDLER_PRI_ANY);
}
-MTX_SYSINIT(kstack_cache, &kstack_cache_mtx, "kstkch", MTX_DEF);
SYSINIT(vm_kstacks, SI_SUB_KTHREAD_INIT, SI_ORDER_ANY, kstack_cache_init, NULL);
#ifndef NO_SWAPPING
Modified: head/sys/xen/evtchn/evtchn.c
==============================================================================
--- head/sys/xen/evtchn/evtchn.c Fri Oct 26 17:02:50 2012 (r242150)
+++ head/sys/xen/evtchn/evtchn.c Fri Oct 26 17:31:35 2012 (r242151)
@@ -44,7 +44,15 @@ static inline unsigned long __ffs(unsign
return word;
}
+/*
+ * irq_mapping_update_lock: in order to allow an interrupt to occur in a critical
+ * section, to set pcpu->ipending (etc...) properly, we
+ * must be able to get the icu lock, so it can't be
+ * under witness.
+ */
static struct mtx irq_mapping_update_lock;
+MTX_SYSINIT(irq_mapping_update_lock, &irq_mapping_update_lock, "xp", MTX_SPIN);
+
static struct xenpic *xp;
struct xenpic_intsrc {
struct intsrc xp_intsrc;
@@ -1130,11 +1138,4 @@ evtchn_init(void *dummy __unused)
}
SYSINIT(evtchn_init, SI_SUB_INTR, SI_ORDER_MIDDLE, evtchn_init, NULL);
- /*
- * irq_mapping_update_lock: in order to allow an interrupt to occur in a critical
- * section, to set pcpu->ipending (etc...) properly, we
- * must be able to get the icu lock, so it can't be
- * under witness.
- */
-MTX_SYSINIT(irq_mapping_update_lock, &irq_mapping_update_lock, "xp", MTX_SPIN);
More information about the svn-src-head
mailing list