Fri Jan 17 02:05:54 2014 UTC ()
sysctl_init needs to be pretty much at the top of main()


(pooka)
diff -r1.282 -r1.283 src/sys/rump/librump/rumpkern/rump.c

cvs diff -r1.282 -r1.283 src/sys/rump/librump/rumpkern/rump.c (expand / switch to unified diff)

--- src/sys/rump/librump/rumpkern/rump.c 2014/01/17 01:32:53 1.282
+++ src/sys/rump/librump/rumpkern/rump.c 2014/01/17 02:05:54 1.283
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: rump.c,v 1.282 2014/01/17 01:32:53 pooka Exp $ */ 1/* $NetBSD: rump.c,v 1.283 2014/01/17 02:05:54 pooka Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved. 4 * Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 14 *
@@ -16,27 +16,27 @@ @@ -16,27 +16,27 @@
16 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE. 25 * SUCH DAMAGE.
26 */ 26 */
27 27
28#include <sys/cdefs.h> 28#include <sys/cdefs.h>
29__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.282 2014/01/17 01:32:53 pooka Exp $"); 29__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.283 2014/01/17 02:05:54 pooka Exp $");
30 30
31#include <sys/systm.h> 31#include <sys/systm.h>
32#define ELFSIZE ARCH_ELFSIZE 32#define ELFSIZE ARCH_ELFSIZE
33 33
34#include <sys/param.h> 34#include <sys/param.h>
35#include <sys/atomic.h> 35#include <sys/atomic.h>
36#include <sys/buf.h> 36#include <sys/buf.h>
37#include <sys/callout.h> 37#include <sys/callout.h>
38#include <sys/conf.h> 38#include <sys/conf.h>
39#include <sys/cpu.h> 39#include <sys/cpu.h>
40#include <sys/device.h> 40#include <sys/device.h>
41#include <sys/evcnt.h> 41#include <sys/evcnt.h>
42#include <sys/event.h> 42#include <sys/event.h>
@@ -326,36 +326,36 @@ rump_init(void) @@ -326,36 +326,36 @@ rump_init(void)
326 uvm_ra_init(); 326 uvm_ra_init();
327 uao_init(); 327 uao_init();
328 328
329 mutex_obj_init(); 329 mutex_obj_init();
330 callout_startup(); 330 callout_startup();
331 331
332 kprintf_init(); 332 kprintf_init();
333 pserialize_init(); 333 pserialize_init();
334 loginit(); 334 loginit();
335 335
336 kauth_init(); 336 kauth_init();
337 337
338 secmodel_init(); 338 secmodel_init();
 339 sysctl_init();
339 340
340 rnd_init(); 341 rnd_init();
341 cprng_init(); 342 cprng_init();
342 kern_cprng = cprng_strong_create("kernel", IPL_VM, 343 kern_cprng = cprng_strong_create("kernel", IPL_VM,
343 CPRNG_INIT_ANY|CPRNG_REKEY_ANY); 344 CPRNG_INIT_ANY|CPRNG_REKEY_ANY);
344 rump_hyperentropy_init(); 345 rump_hyperentropy_init();
345 346
346 procinit(); 347 procinit();
347 proc0_init(); 348 proc0_init();
348 sysctl_init(); 
349 uid_init(); 349 uid_init();
350 chgproccnt(0, 1); 350 chgproccnt(0, 1);
351 351
352 l->l_proc = &proc0; 352 l->l_proc = &proc0;
353 lwp_update_creds(l); 353 lwp_update_creds(l);
354 354
355 lwpinit_specificdata(); 355 lwpinit_specificdata();
356 lwp_initspecific(&lwp0); 356 lwp_initspecific(&lwp0);
357 357
358 rump_biglock_init(); 358 rump_biglock_init();
359 359
360 rump_scheduler_init(numcpu); 360 rump_scheduler_init(numcpu);
361 /* revert temporary context and schedule a semireal context */ 361 /* revert temporary context and schedule a semireal context */