aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttilio Rao <attilio@FreeBSD.org>2011-07-19 00:37:24 +0000
committerAttilio Rao <attilio@FreeBSD.org>2011-07-19 00:37:24 +0000
commit68b739cd6f5af9b2f4f03fe7bb9627dee6e03c42 (patch)
tree05f7da2af94ce8adb51cef94323beaa68ef121a7
parentfcc3d62fa50d0433048a71d54e385ef75ec06011 (diff)
downloadsrc-68b739cd6f5af9b2f4f03fe7bb9627dee6e03c42.tar.gz
src-68b739cd6f5af9b2f4f03fe7bb9627dee6e03c42.zip
Add the possibility to specify from kernel configs MAXCPU value.
This patch is going to help in cases like mips flavours where you want a more granular support on MAXCPU. No MFC is previewed for this patch. Tested by: pluknet Approved by: re (kib)
Notes
Notes: svn path=/head/; revision=224207
-rw-r--r--sys/amd64/include/param.h2
-rw-r--r--sys/arm/include/param.h2
-rw-r--r--sys/conf/NOTES4
-rw-r--r--sys/conf/options1
-rw-r--r--sys/i386/include/param.h2
-rw-r--r--sys/ia64/include/param.h2
-rw-r--r--sys/mips/include/param.h2
-rw-r--r--sys/powerpc/include/param.h2
-rw-r--r--sys/sparc64/include/param.h2
9 files changed, 19 insertions, 0 deletions
diff --git a/sys/amd64/include/param.h b/sys/amd64/include/param.h
index 9a742f94e9b9..74d4d21827bb 100644
--- a/sys/amd64/include/param.h
+++ b/sys/amd64/include/param.h
@@ -64,7 +64,9 @@
#endif
#if defined(SMP) || defined(KLD_MODULE)
+#ifndef MAXCPU
#define MAXCPU 32
+#endif
#else
#define MAXCPU 1
#endif
diff --git a/sys/arm/include/param.h b/sys/arm/include/param.h
index 1694bc43c5ed..96a70388f1f5 100644
--- a/sys/arm/include/param.h
+++ b/sys/arm/include/param.h
@@ -61,7 +61,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 */
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index d3951e34fc2c..0753c1d5c462 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -213,6 +213,10 @@ options SCHED_STATS
# 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
diff --git a/sys/conf/options b/sys/conf/options
index 9f1ac80dbb96..b8f9958ca6fd 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -570,6 +570,7 @@ DFLTPHYS opt_global.h
DIAGNOSTIC opt_global.h
INVARIANT_SUPPORT opt_global.h
INVARIANTS opt_global.h
+MAXCPU opt_global.h
MAXPHYS opt_global.h
MCLSHIFT opt_global.h
MUTEX_DEBUG opt_global.h
diff --git a/sys/i386/include/param.h b/sys/i386/include/param.h
index d95fcf3fd087..6a0495c4c952 100644
--- a/sys/i386/include/param.h
+++ b/sys/i386/include/param.h
@@ -68,7 +68,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 */
diff --git a/sys/ia64/include/param.h b/sys/ia64/include/param.h
index 36b27e048903..a3684ab09e3e 100644
--- a/sys/ia64/include/param.h
+++ b/sys/ia64/include/param.h
@@ -62,7 +62,9 @@
#endif
#if defined(SMP) || defined(KLD_MODULE)
+#ifndef MAXCPU
#define MAXCPU 32
+#endif
#else
#define MAXCPU 1
#endif
diff --git a/sys/mips/include/param.h b/sys/mips/include/param.h
index 0b1ea9837afa..5f25c81c98f9 100644
--- a/sys/mips/include/param.h
+++ b/sys/mips/include/param.h
@@ -87,7 +87,9 @@
#ifdef SMP
#define MAXSMPCPU 32
+#ifndef MAXCPU
#define MAXCPU MAXSMPCPU
+#endif
#else
#define MAXSMPCPU 1
#define MAXCPU 1
diff --git a/sys/powerpc/include/param.h b/sys/powerpc/include/param.h
index 06b131c2a676..f95cc0894726 100644
--- a/sys/powerpc/include/param.h
+++ b/sys/powerpc/include/param.h
@@ -68,7 +68,9 @@
#endif
#if defined(SMP) || defined(KLD_MODULE)
+#ifndef MAXCPU
#define MAXCPU 8
+#endif
#else
#define MAXCPU 1
#endif /* SMP || KLD_MODULE */
diff --git a/sys/sparc64/include/param.h b/sys/sparc64/include/param.h
index af026b293f29..9d11a2fc11e9 100644
--- a/sys/sparc64/include/param.h
+++ b/sys/sparc64/include/param.h
@@ -50,7 +50,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 */