diff options
author | John Birrell <jb@FreeBSD.org> | 2008-03-27 05:03:26 +0000 |
---|---|---|
committer | John Birrell <jb@FreeBSD.org> | 2008-03-27 05:03:26 +0000 |
commit | e483943791c5e44918441b32580765ceef74a82c (patch) | |
tree | fab7e3c1d8d06e5b21f4fddec18bc48b6708d26f | |
parent | 97dbe5e48ee458137257e952004b1cd700d387ba (diff) | |
download | src-e483943791c5e44918441b32580765ceef74a82c.tar.gz src-e483943791c5e44918441b32580765ceef74a82c.zip |
When building a kernel module, define MAXCPU the same as SMP so
that modules work with and without SMP.
Notes
Notes:
svn path=/head/; revision=177661
-rw-r--r-- | sys/amd64/include/param.h | 2 | ||||
-rw-r--r-- | sys/arm/include/param.h | 4 | ||||
-rw-r--r-- | sys/i386/include/param.h | 4 | ||||
-rw-r--r-- | sys/ia64/include/param.h | 2 | ||||
-rw-r--r-- | sys/powerpc/include/param.h | 4 | ||||
-rw-r--r-- | sys/sparc64/include/param.h | 4 | ||||
-rw-r--r-- | sys/sun4v/include/param.h | 4 |
7 files changed, 12 insertions, 12 deletions
diff --git a/sys/amd64/include/param.h b/sys/amd64/include/param.h index b1b90f467658..3c1f974b9fe3 100644 --- a/sys/amd64/include/param.h +++ b/sys/amd64/include/param.h @@ -79,7 +79,7 @@ #define MACHINE_ARCH "amd64" #endif -#ifdef SMP +#if defined(SMP) || defined(KLD_MODULE) #define MAXCPU 16 #else #define MAXCPU 1 diff --git a/sys/arm/include/param.h b/sys/arm/include/param.h index 4c59eee53c6d..8fb85559146c 100644 --- a/sys/arm/include/param.h +++ b/sys/arm/include/param.h @@ -72,11 +72,11 @@ #endif #define MID_MACHINE MID_ARM6 -#ifdef SMP +#if defined(SMP) || defined(KLD_MODULE) #define MAXCPU 2 #else #define MAXCPU 1 -#endif /* SMP */ +#endif /* SMP || KLD_MODULE */ #define ALIGNBYTES _ALIGNBYTES #define ALIGN(p) _ALIGN(p) diff --git a/sys/i386/include/param.h b/sys/i386/include/param.h index 0f67c271a7a1..12510094c591 100644 --- a/sys/i386/include/param.h +++ b/sys/i386/include/param.h @@ -65,11 +65,11 @@ #endif #define MID_MACHINE MID_I386 -#ifdef SMP +#if defined(SMP) || defined(KLD_MODULE) #define MAXCPU 16 #else #define MAXCPU 1 -#endif /* SMP */ +#endif /* SMP || KLD_MODULE */ #define ALIGNBYTES _ALIGNBYTES #define ALIGN(p) _ALIGN(p) diff --git a/sys/ia64/include/param.h b/sys/ia64/include/param.h index c71c6e5a7bf3..acea69007d2b 100644 --- a/sys/ia64/include/param.h +++ b/sys/ia64/include/param.h @@ -78,7 +78,7 @@ #define MACHINE_ARCH "ia64" #endif -#ifdef SMP +#if defined(SMP) || defined(KLD_MODULE) #define MAXCPU 4 #else #define MAXCPU 1 diff --git a/sys/powerpc/include/param.h b/sys/powerpc/include/param.h index 6a2018eab0d8..1b58db92805a 100644 --- a/sys/powerpc/include/param.h +++ b/sys/powerpc/include/param.h @@ -67,11 +67,11 @@ #endif #define MID_MACHINE MID_POWERPC -#ifdef SMP +#if defined(SMP) || defined(KLD_MODULE) #define MAXCPU 2 #else #define MAXCPU 1 -#endif /* SMP */ +#endif /* SMP || KLD_MODULE */ #define ALIGNBYTES _ALIGNBYTES #define ALIGN(p) _ALIGN(p) diff --git a/sys/sparc64/include/param.h b/sys/sparc64/include/param.h index dd86233a943b..8a1c7df4aedf 100644 --- a/sys/sparc64/include/param.h +++ b/sys/sparc64/include/param.h @@ -59,11 +59,11 @@ #endif #define MID_MACHINE MID_SPARC64 -#ifdef SMP +#if defined(SMP) || defined(KLD_MODULE) #define MAXCPU 16 #else #define MAXCPU 1 -#endif /* SMP */ +#endif /* SMP || KLD_MODULE */ #define INT_SHIFT 2 #define PTR_SHIFT 3 diff --git a/sys/sun4v/include/param.h b/sys/sun4v/include/param.h index 6e1d389b304c..0ac9c9b793ab 100644 --- a/sys/sun4v/include/param.h +++ b/sys/sun4v/include/param.h @@ -59,11 +59,11 @@ #endif #define MID_MACHINE MID_SPARC64 -#ifdef SMP +#if defined(SMP) || defined(KLD_MODULE) #define MAXCPU 32 #else #define MAXCPU 1 -#endif /* SMP */ +#endif /* SMP || KLD_MODULE */ #define INT_SHIFT 2 #define PTR_SHIFT 3 |