Define MAXCPU consistently between the kernel and KLDs.

This reverts r177661.  The change is no longer very useful since
out-of-tree KLDs will be built to target SMP kernels anyway.  Moveover
it breaks the KBI in !SMP builds since cpuset_t's layout depends on the
value of MAXCPU, and several kernel interfaces, notably
smp_rendezvous_cpus(), take a cpuset_t as a parameter.

PR:		243711
Reviewed by:	jhb, kib
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23512
This commit is contained in:
Mark Johnston 2020-02-05 19:08:21 +00:00
parent 28e68bc000
commit c3d326fd44
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357585
6 changed files with 11 additions and 11 deletions

View File

@ -65,7 +65,7 @@
#define MACHINE_ARCH32 "i386"
#endif
#if defined(SMP) || defined(KLD_MODULE)
#ifdef SMP
#ifndef MAXCPU
#define MAXCPU 256
#endif

View File

@ -75,13 +75,13 @@
#define MACHINE_ARCH "arm" _V_SUFFIX _EB_SUFFIX
#endif
#if defined(SMP) || defined(KLD_MODULE)
#ifdef SMP
#ifndef MAXCPU
#define MAXCPU 4
#endif
#else
#define MAXCPU 1
#endif /* SMP || KLD_MODULE */
#endif
#ifndef MAXMEMDOM
#define MAXMEMDOM 1

View File

@ -54,13 +54,13 @@
#define MACHINE_ARCH32 "armv7"
#endif
#if defined(SMP) || defined(KLD_MODULE)
#ifdef SMP
#ifndef MAXCPU
#define MAXCPU 256
#endif
#else
#define MAXCPU 1
#endif /* SMP || KLD_MODULE */
#endif
#ifndef MAXMEMDOM
#define MAXMEMDOM 2

View File

@ -58,13 +58,13 @@
#endif
#define MID_MACHINE MID_I386
#if defined(SMP) || defined(KLD_MODULE)
#ifdef SMP
#ifndef MAXCPU
#define MAXCPU 32
#endif
#else
#define MAXCPU 1
#endif /* SMP || KLD_MODULE */
#endif
#ifndef MAXMEMDOM
#define MAXMEMDOM 1

View File

@ -73,13 +73,13 @@
#endif
#endif
#if defined(SMP) || defined(KLD_MODULE)
#ifdef SMP
#ifndef MAXCPU
#define MAXCPU 256
#endif
#else
#define MAXCPU 1
#endif /* SMP || KLD_MODULE */
#endif
#ifndef MAXMEMDOM
#define MAXMEMDOM 8

View File

@ -49,13 +49,13 @@
#define MACHINE_ARCH "riscv64"
#endif
#if defined(SMP) || defined(KLD_MODULE)
#ifdef SMP
#ifndef MAXCPU
#define MAXCPU 16
#endif
#else
#define MAXCPU 1
#endif /* SMP || KLD_MODULE */
#endif
#ifndef MAXMEMDOM
#define MAXMEMDOM 1