summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/amd64/vm_machdep.c4
-rw-r--r--sys/arm/arm/vm_machdep.c4
-rw-r--r--sys/dev/syscons/syscons.c4
-rw-r--r--sys/i386/i386/vm_machdep.c4
-rw-r--r--sys/ia64/ia64/vm_machdep.c4
-rw-r--r--sys/powerpc/aim/vm_machdep.c4
-rw-r--r--sys/powerpc/powerpc/vm_machdep.c4
-rw-r--r--sys/sparc64/sparc64/vm_machdep.c4
-rw-r--r--sys/sun4v/sun4v/trap.c1
-rw-r--r--sys/sun4v/sun4v/vm_machdep.c4
-rw-r--r--sys/sys/resourcevar.h2
11 files changed, 19 insertions, 20 deletions
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c
index ad256b4..c3c5283 100644
--- a/sys/amd64/amd64/vm_machdep.c
+++ b/sys/amd64/amd64/vm_machdep.c
@@ -170,7 +170,7 @@ cpu_fork(td1, p2, td2, flags)
* pcb2->pcb_[fg]sbase: cloned above
*/
- /* Setup to release sched_lock in fork_exit(). */
+ /* Setup to release spin count in fork_exit(). */
td2->td_md.md_spinlock_count = 1;
td2->td_md.md_saved_flags = PSL_KERNEL | PSL_I;
@@ -304,7 +304,7 @@ cpu_set_upcall(struct thread *td, struct thread *td0)
* pcb2->pcb_[fg]sbase: cloned above
*/
- /* Setup to release sched_lock in fork_exit(). */
+ /* Setup to release spin count in fork_exit(). */
td->td_md.md_spinlock_count = 1;
td->td_md.md_saved_flags = PSL_KERNEL | PSL_I;
}
diff --git a/sys/arm/arm/vm_machdep.c b/sys/arm/arm/vm_machdep.c
index fd25591..49ad346 100644
--- a/sys/arm/arm/vm_machdep.c
+++ b/sys/arm/arm/vm_machdep.c
@@ -143,7 +143,7 @@ cpu_fork(register struct thread *td1, register struct proc *p2,
tf->tf_r1 = 0;
pcb2->un_32.pcb32_sp = (u_int)sf;
- /* Setup to release sched_lock in fork_exit(). */
+ /* Setup to release spin count in fork_exit(). */
td2->td_md.md_spinlock_count = 1;
td2->td_md.md_saved_cspr = 0;
td2->td_md.md_tp = *(uint32_t **)ARM_TP_ADDRESS;
@@ -288,7 +288,7 @@ cpu_set_upcall(struct thread *td, struct thread *td0)
td->td_pcb->un_32.pcb32_sp = (u_int)sf;
td->td_pcb->un_32.pcb32_und_sp = td->td_kstack + USPACE_UNDEF_STACK_TOP;
- /* Setup to release sched_lock in fork_exit(). */
+ /* Setup to release spin count in fork_exit(). */
td->td_md.md_spinlock_count = 1;
td->td_md.md_saved_cspr = 0;
}
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 7dae3ea..89d60ef 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -2326,8 +2326,8 @@ sc_switch_scr(sc_softc_t *sc, u_int next_scr)
if (sc->new_scp == sc->old_scp) {
sc->switch_in_progress = 0;
/*
- * XXX wakeup() calls mtx_lock(&sched_lock) which will hang if
- * sched_lock is in an in-between state, e.g., when we stop at
+ * XXX wakeup() locks the scheduler lock which will hang if
+ * the lock is in an in-between state, e.g., when we stop at
* a breakpoint at fork_exit. It has always been wrong to call
* wakeup() when the debugger is active. In RELENG_4, wakeup()
* is supposed to be locked by splhigh(), but the debugger may
diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c
index 73ce4b7..48e19ae 100644
--- a/sys/i386/i386/vm_machdep.c
+++ b/sys/i386/i386/vm_machdep.c
@@ -264,7 +264,7 @@ cpu_fork(td1, p2, td2, flags)
}
mtx_unlock_spin(&dt_lock);
- /* Setup to release sched_lock in fork_exit(). */
+ /* Setup to release spin count in fork_exit(). */
td2->td_md.md_spinlock_count = 1;
td2->td_md.md_saved_flags = PSL_KERNEL | PSL_I;
@@ -438,7 +438,7 @@ cpu_set_upcall(struct thread *td, struct thread *td0)
*/
pcb2->pcb_ext = NULL;
- /* Setup to release sched_lock in fork_exit(). */
+ /* Setup to release spin count in fork_exit(). */
td->td_md.md_spinlock_count = 1;
td->td_md.md_saved_flags = PSL_KERNEL | PSL_I;
}
diff --git a/sys/ia64/ia64/vm_machdep.c b/sys/ia64/ia64/vm_machdep.c
index 0bda88f..40708c4 100644
--- a/sys/ia64/ia64/vm_machdep.c
+++ b/sys/ia64/ia64/vm_machdep.c
@@ -159,7 +159,7 @@ cpu_set_upcall(struct thread *td, struct thread *td0)
pcb->pcb_special.rp = FDESC_FUNC(fork_trampoline);
cpu_set_fork_handler(td, (void (*)(void*))fork_return, td);
- /* Setup to release sched_lock in fork_exit(). */
+ /* Setup to release the spin count in fork_exit(). */
td->td_md.md_spinlock_count = 1;
td->td_md.md_saved_intr = 1;
}
@@ -284,7 +284,7 @@ cpu_fork(struct thread *td1, struct proc *p2 __unused, struct thread *td2,
td2->td_pcb->pcb_special.rp = FDESC_FUNC(fork_trampoline);
cpu_set_fork_handler(td2, (void (*)(void*))fork_return, td2);
- /* Setup to release sched_lock in fork_exit(). */
+ /* Setup to release the spin count in fork_exit(). */
td2->td_md.md_spinlock_count = 1;
td2->td_md.md_saved_intr = 1;
}
diff --git a/sys/powerpc/aim/vm_machdep.c b/sys/powerpc/aim/vm_machdep.c
index eff8a34..e1bb3d7 100644
--- a/sys/powerpc/aim/vm_machdep.c
+++ b/sys/powerpc/aim/vm_machdep.c
@@ -154,7 +154,7 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags)
pcb->pcb_lr = (register_t)fork_trampoline;
pcb->pcb_usr = kernel_pmap->pm_sr[USER_SR];
- /* Setup to release sched_lock in fork_exit(). */
+ /* Setup to release spin count in fork_exit(). */
td2->td_md.md_spinlock_count = 1;
td2->td_md.md_saved_msr = PSL_KERNSET;
@@ -327,7 +327,7 @@ cpu_set_upcall(struct thread *td, struct thread *td0)
pcb2->pcb_lr = (register_t)fork_trampoline;
pcb2->pcb_usr = kernel_pmap->pm_sr[USER_SR];
- /* Setup to release sched_lock in fork_exit(). */
+ /* Setup to release spin count in fork_exit(). */
td->td_md.md_spinlock_count = 1;
td->td_md.md_saved_msr = PSL_KERNSET;
}
diff --git a/sys/powerpc/powerpc/vm_machdep.c b/sys/powerpc/powerpc/vm_machdep.c
index eff8a34..e1bb3d7 100644
--- a/sys/powerpc/powerpc/vm_machdep.c
+++ b/sys/powerpc/powerpc/vm_machdep.c
@@ -154,7 +154,7 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags)
pcb->pcb_lr = (register_t)fork_trampoline;
pcb->pcb_usr = kernel_pmap->pm_sr[USER_SR];
- /* Setup to release sched_lock in fork_exit(). */
+ /* Setup to release spin count in fork_exit(). */
td2->td_md.md_spinlock_count = 1;
td2->td_md.md_saved_msr = PSL_KERNSET;
@@ -327,7 +327,7 @@ cpu_set_upcall(struct thread *td, struct thread *td0)
pcb2->pcb_lr = (register_t)fork_trampoline;
pcb2->pcb_usr = kernel_pmap->pm_sr[USER_SR];
- /* Setup to release sched_lock in fork_exit(). */
+ /* Setup to release spin count in fork_exit(). */
td->td_md.md_spinlock_count = 1;
td->td_md.md_saved_msr = PSL_KERNSET;
}
diff --git a/sys/sparc64/sparc64/vm_machdep.c b/sys/sparc64/sparc64/vm_machdep.c
index 9dd80fd..10e39ea 100644
--- a/sys/sparc64/sparc64/vm_machdep.c
+++ b/sys/sparc64/sparc64/vm_machdep.c
@@ -171,7 +171,7 @@ cpu_set_upcall(struct thread *td, struct thread *td0)
pcb->pcb_pc = (u_long)fork_trampoline - 8;
pcb->pcb_sp = (u_long)fr - SPOFF;
- /* Setup to release sched_lock in fork_exit(). */
+ /* Setup to release the spin count in fork_exit(). */
td->td_md.md_spinlock_count = 1;
td->td_md.md_saved_pil = 0;
}
@@ -298,7 +298,7 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags)
pcb2->pcb_sp = (u_long)fp - SPOFF;
pcb2->pcb_pc = (u_long)fork_trampoline - 8;
- /* Setup to release sched_lock in fork_exit(). */
+ /* Setup to release the spin count in fork_exit(). */
td2->td_md.md_spinlock_count = 1;
td2->td_md.md_saved_pil = 0;
diff --git a/sys/sun4v/sun4v/trap.c b/sys/sun4v/sun4v/trap.c
index fa2de3d..19631c6 100644
--- a/sys/sun4v/sun4v/trap.c
+++ b/sys/sun4v/sun4v/trap.c
@@ -712,6 +712,5 @@ syscall(struct trapframe *tf)
WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning",
(code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???");
- mtx_assert(&sched_lock, MA_NOTOWNED);
mtx_assert(&Giant, MA_NOTOWNED);
}
diff --git a/sys/sun4v/sun4v/vm_machdep.c b/sys/sun4v/sun4v/vm_machdep.c
index e06c1ee..d5d9a70 100644
--- a/sys/sun4v/sun4v/vm_machdep.c
+++ b/sys/sun4v/sun4v/vm_machdep.c
@@ -155,7 +155,7 @@ cpu_set_upcall(struct thread *td, struct thread *td0)
pcb->pcb_pc = (u_long)fork_trampoline - 8;
pcb->pcb_sp = (u_long)fr - SPOFF;
- /* Setup to release sched_lock in fork_exit(). */
+ /* Setup to release spin count in fork_exit(). */
td->td_md.md_spinlock_count = 1;
td->td_md.md_saved_pil = 0;
}
@@ -288,7 +288,7 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags)
pcb2->pcb_pc = (u_long)fork_trampoline - 8;
pcb2->pcb_kstack = (uint64_t)(((char *)pcb2orig) - (CCFSZ + SPOFF));
- /* Setup to release sched_lock in fork_exit(). */
+ /* Setup to release spin count in fork_exit(). */
td2->td_md.md_spinlock_count = 1;
td2->td_md.md_saved_pil = 0;
diff --git a/sys/sys/resourcevar.h b/sys/sys/resourcevar.h
index 173d7e3..a94ba94 100644
--- a/sys/sys/resourcevar.h
+++ b/sys/sys/resourcevar.h
@@ -47,7 +47,7 @@
* Locking key:
* b - created at fork, never changes
* c - locked by proc mtx
- * j - locked by sched_lock mtx
+ * j - locked by proc slock
* k - only accessed by curthread
*/
struct pstats {
OpenPOWER on IntegriCloud