Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpkern Make number of virtual CPUs match ...
details: https://anonhg.NetBSD.org/src/rev/291c8ed038b1
branches: trunk
changeset: 754330:291c8ed038b1
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Apr 28 00:43:16 2010 +0000
description:
Make number of virtual CPUs match number of host CPUs on NetBSD/x86 hosts.
diffstat:
sys/rump/librump/rumpkern/rump.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diffs (43 lines):
diff -r 3e709aae8fb3 -r 291c8ed038b1 sys/rump/librump/rumpkern/rump.c
--- a/sys/rump/librump/rumpkern/rump.c Wed Apr 28 00:42:16 2010 +0000
+++ b/sys/rump/librump/rumpkern/rump.c Wed Apr 28 00:43:16 2010 +0000
@@ -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;
Home |
Main Index |
Thread Index |
Old Index