diff --git a/sys/conf/param.c b/sys/conf/param.c index 5327edcac823..c0a99eaf9918 100644 --- a/sys/conf/param.c +++ b/sys/conf/param.c @@ -1,4 +1,4 @@ -/* $NetBSD: param.c,v 1.53 2007/12/26 16:01:35 ad Exp $ */ +/* $NetBSD: param.c,v 1.54 2008/03/15 14:55:22 ad Exp $ */ /* * Copyright (c) 1980, 1986, 1989 Regents of the University of California. @@ -37,13 +37,14 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: param.c,v 1.53 2007/12/26 16:01:35 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: param.c,v 1.54 2008/03/15 14:55:22 ad Exp $"); #include "opt_hz.h" #include "opt_rtc_offset.h" #include "opt_sysv.h" #include "opt_sysvparam.h" #include "opt_nmbclusters.h" +#include "opt_multiprocessor.h" #include #include @@ -110,6 +111,11 @@ int maxproc = NPROC; int desiredvnodes = NVNODE; u_int maxfiles = MAXFILES; int fscale = FSCALE; /* kernel uses `FSCALE', user uses `fscale' */ +#ifdef MULTIPROCESSOR +u_int maxcpus = MAXCPUS; +#else +u_int maxcpus = 1; +#endif /* * Various mbuf-related parameters. These can also be changed at run-time diff --git a/sys/sys/cpu.h b/sys/sys/cpu.h index b96b82a589b6..fe159dc31d98 100644 --- a/sys/sys/cpu.h +++ b/sys/sys/cpu.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.15 2008/01/15 14:50:07 joerg Exp $ */ +/* $NetBSD: cpu.h,v 1.16 2008/03/15 14:55:22 ad Exp $ */ /*- * Copyright (c) 2007 YAMAMOTO Takashi, @@ -68,6 +68,7 @@ int cpu_setonline(struct cpu_info *, bool); bool cpu_intr_p(void); extern kmutex_t cpu_lock; +extern u_int maxcpus; static inline u_int cpu_index(struct cpu_info *ci)