Module Name: src Committed By: pooka Date: Wed Apr 28 00:43:16 UTC 2010
Modified Files: src/sys/rump/librump/rumpkern: rump.c Log Message: Make number of virtual CPUs match number of host CPUs on NetBSD/x86 hosts. To generate a diff of this commit: cvs rdiff -u -r1.165 -r1.166 src/sys/rump/librump/rumpkern/rump.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/rump/librump/rumpkern/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.165 src/sys/rump/librump/rumpkern/rump.c:1.166 --- src/sys/rump/librump/rumpkern/rump.c:1.165 Tue Apr 27 23:30:30 2010 +++ src/sys/rump/librump/rumpkern/rump.c Wed Apr 28 00:43:16 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.c,v 1.165 2010/04/27 23:30:30 pooka Exp $ */ +/* $NetBSD: rump.c,v 1.166 2010/04/28 00:43:16 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.165 2010/04/27 23:30:30 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.166 2010/04/28 00:43:16 pooka Exp $"); #include <sys/systm.h> #define ELFSIZE ARCH_ELFSIZE @@ -203,7 +203,7 @@ uint64_t sec, nsec; struct proc *p; struct lwp *l; - int i; + int i, numcpu; int error; /* not reentrant */ @@ -219,8 +219,13 @@ boothowto = AB_VERBOSE; } - /* get our CPUs initialized */ - rump_cpus_bootstrap(1); + /* non-x86 is missing CPU_INFO_FOREACH() support */ +#if defined(__i386__) || defined(__x86_64__) + numcpu = rumpuser_getnhostcpu(); +#else + numcpu = 1; +#endif + rump_cpus_bootstrap(numcpu); rumpuser_gettime(&sec, &nsec, &error); boottime.tv_sec = sec;