diff options
author | jb <jb@FreeBSD.org> | 2008-03-27 05:03:26 +0000 |
---|---|---|
committer | jb <jb@FreeBSD.org> | 2008-03-27 05:03:26 +0000 |
commit | 34e730ca273d9bd38d9081bc80c78688c6abdd4c (patch) | |
tree | fab7e3c1d8d06e5b21f4fddec18bc48b6708d26f /sys | |
parent | 2a244be0948ebf54f47b701a69bdc0acbc452299 (diff) | |
download | FreeBSD-src-34e730ca273d9bd38d9081bc80c78688c6abdd4c.zip FreeBSD-src-34e730ca273d9bd38d9081bc80c78688c6abdd4c.tar.gz |
When building a kernel module, define MAXCPU the same as SMP so
that modules work with and without SMP.
Diffstat (limited to 'sys')
-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 b1b90f4..3c1f974 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 4c59eee..8fb8555 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 0f67c27..1251009 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 c71c6e5..acea690 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 6a2018e..1b58db9 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 dd86233..8a1c7df 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 6e1d389..0ac9c9b 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 |