Index: sys/arm/include/param.h =================================================================== --- sys/arm/include/param.h (revision 223872) +++ sys/arm/include/param.h (working copy) @@ -45,6 +45,8 @@ * Machine dependent constants for StrongARM */ +#include "opt_maxcpu.h" + #include #define STACKALIGNBYTES (8 - 1) @@ -61,7 +63,9 @@ #define MID_MACHINE MID_ARM6 #if defined(SMP) || defined(KLD_MODULE) +#ifndef MAXCPU #define MAXCPU 2 +#endif #else #define MAXCPU 1 #endif /* SMP || KLD_MODULE */ Index: sys/powerpc/include/param.h =================================================================== --- sys/powerpc/include/param.h (revision 223872) +++ sys/powerpc/include/param.h (working copy) @@ -45,6 +45,8 @@ * Machine dependent constants for PowerPC */ +#include "opt_maxcpu.h" + #include /* Needed to display interrupts on OFW PCI */ @@ -68,7 +70,9 @@ #endif #if defined(SMP) || defined(KLD_MODULE) +#ifndef MAXCPU #define MAXCPU 8 +#endif #else #define MAXCPU 1 #endif /* SMP || KLD_MODULE */ Index: sys/sparc64/include/param.h =================================================================== --- sys/sparc64/include/param.h (revision 223872) +++ sys/sparc64/include/param.h (working copy) @@ -37,6 +37,8 @@ * Machine dependent constants for sparc64. */ +#include "opt_maxcpu.h" + #include #define __PCI_BAR_ZERO_VALID @@ -50,7 +52,9 @@ #define MID_MACHINE MID_SPARC64 #if defined(SMP) || defined(KLD_MODULE) +#ifndef MAXCPU #define MAXCPU 16 +#endif #else #define MAXCPU 1 #endif /* SMP || KLD_MODULE */ Index: sys/conf/NOTES =================================================================== --- sys/conf/NOTES (revision 223872) +++ sys/conf/NOTES (working copy) @@ -213,6 +213,10 @@ # Mandatory: options SMP # Symmetric MultiProcessor Kernel +# MAXCPU defines the maximum number of CPUs that can boot in the system. +# A default value should be already present, for every architecture. +options MAXCPU=32 + # ADAPTIVE_MUTEXES changes the behavior of blocking mutexes to spin # if the thread that currently owns the mutex is executing on another # CPU. This behaviour is enabled by default, so this option can be used Index: sys/conf/options =================================================================== --- sys/conf/options (revision 223872) +++ sys/conf/options (working copy) @@ -571,6 +571,7 @@ DIAGNOSTIC opt_global.h INVARIANT_SUPPORT opt_global.h INVARIANTS opt_global.h +MAXCPU MAXPHYS opt_global.h MCLSHIFT opt_global.h MUTEX_DEBUG opt_global.h Index: sys/ia64/include/param.h =================================================================== --- sys/ia64/include/param.h (revision 223872) +++ sys/ia64/include/param.h (working copy) @@ -46,6 +46,8 @@ * Machine dependent constants for the IA64. */ +#include "opt_maxcpu.h" + #include #define __HAVE_ACPI @@ -62,7 +64,9 @@ #endif #if defined(SMP) || defined(KLD_MODULE) +#ifndef MAXCPU #define MAXCPU 32 +#endif #else #define MAXCPU 1 #endif Index: sys/mips/include/param.h =================================================================== --- sys/mips/include/param.h (revision 223872) +++ sys/mips/include/param.h (working copy) @@ -42,6 +42,8 @@ #ifndef _MIPS_INCLUDE_PARAM_H_ #define _MIPS_INCLUDE_PARAM_H_ +#include "opt_maxcpu.h" + #include #include @@ -87,7 +89,9 @@ #ifdef SMP #define MAXSMPCPU 32 +#ifndef MAXCPU #define MAXCPU MAXSMPCPU +#endif #else #define MAXSMPCPU 1 #define MAXCPU 1 Index: sys/i386/include/param.h =================================================================== --- sys/i386/include/param.h (revision 223872) +++ sys/i386/include/param.h (working copy) @@ -33,6 +33,8 @@ * $FreeBSD$ */ +#include "opt_maxcpu.h" + #include #ifndef _I386_INCLUDE_PARAM_H_ @@ -68,7 +70,9 @@ #define MID_MACHINE MID_I386 #if defined(SMP) || defined(KLD_MODULE) +#ifndef MAXCPU #define MAXCPU 32 +#endif #else #define MAXCPU 1 #endif /* SMP || KLD_MODULE */ Index: sys/amd64/include/param.h =================================================================== --- sys/amd64/include/param.h (revision 223872) +++ sys/amd64/include/param.h (working copy) @@ -43,6 +43,8 @@ #ifndef _AMD64_INCLUDE_PARAM_H_ #define _AMD64_INCLUDE_PARAM_H_ +#include "opt_maxcpu.h" + #include /* @@ -64,7 +66,9 @@ #endif #if defined(SMP) || defined(KLD_MODULE) +#ifndef MAXCPU #define MAXCPU 32 +#endif #else #define MAXCPU 1 #endif