diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2012-07-09 15:43:37 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2012-07-09 15:43:37 +0000 |
commit | 77a156b99d270a043cf97ca6692a707f0a83da0a (patch) | |
tree | faad8c13c644805b834e4c3cb5374ad727b21e40 /sys/kern/kern_xxx.c | |
parent | 3f9cc710aacdf7ad33b1a7a109592d037d0883ae (diff) |
In reboot, no need to sched_peg_curproc() to the primary, because
sched_stop_secondary_cpus() leaves us on the only cpu which is left.
ok kettenis haesbaert guenther
Diffstat (limited to 'sys/kern/kern_xxx.c')
-rw-r--r-- | sys/kern/kern_xxx.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/sys/kern/kern_xxx.c b/sys/kern/kern_xxx.c index d6406ddfa7f..2b0331c3378 100644 --- a/sys/kern/kern_xxx.c +++ b/sys/kern/kern_xxx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_xxx.c,v 1.21 2011/07/11 15:40:47 guenther Exp $ */ +/* $OpenBSD: kern_xxx.c,v 1.22 2012/07/09 15:43:36 deraadt Exp $ */ /* $NetBSD: kern_xxx.c,v 1.32 1996/04/22 01:38:41 christos Exp $ */ /* @@ -51,33 +51,16 @@ sys_reboot(struct proc *p, void *v, register_t *retval) struct sys_reboot_args /* { syscallarg(int) opt; } */ *uap = v; -#ifdef MULTIPROCESSOR - CPU_INFO_ITERATOR cii; - struct cpu_info *ci; -#endif int error; if ((error = suser(p, 0)) != 0) return (error); #ifdef MULTIPROCESSOR - /* - * Make sure this thread only runs on the primary cpu. - */ - CPU_INFO_FOREACH(cii, ci) { - if (CPU_IS_PRIMARY(ci)) { - sched_peg_curproc(ci); - break; - } - } - sched_stop_secondary_cpus(); + KASSERT(CPU_IS_PRIMARY(curcpu())); #endif - boot(SCARG(uap, opt)); - - atomic_clearbits_int(&p->p_flag, P_CPUPEG); /* XXX */ - return (0); } |