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:
parent
28e68bc000
commit
c3d326fd44
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357585
@ -65,7 +65,7 @@
|
|||||||
#define MACHINE_ARCH32 "i386"
|
#define MACHINE_ARCH32 "i386"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SMP) || defined(KLD_MODULE)
|
#ifdef SMP
|
||||||
#ifndef MAXCPU
|
#ifndef MAXCPU
|
||||||
#define MAXCPU 256
|
#define MAXCPU 256
|
||||||
#endif
|
#endif
|
||||||
|
@ -75,13 +75,13 @@
|
|||||||
#define MACHINE_ARCH "arm" _V_SUFFIX _EB_SUFFIX
|
#define MACHINE_ARCH "arm" _V_SUFFIX _EB_SUFFIX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SMP) || defined(KLD_MODULE)
|
#ifdef SMP
|
||||||
#ifndef MAXCPU
|
#ifndef MAXCPU
|
||||||
#define MAXCPU 4
|
#define MAXCPU 4
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define MAXCPU 1
|
#define MAXCPU 1
|
||||||
#endif /* SMP || KLD_MODULE */
|
#endif
|
||||||
|
|
||||||
#ifndef MAXMEMDOM
|
#ifndef MAXMEMDOM
|
||||||
#define MAXMEMDOM 1
|
#define MAXMEMDOM 1
|
||||||
|
@ -54,13 +54,13 @@
|
|||||||
#define MACHINE_ARCH32 "armv7"
|
#define MACHINE_ARCH32 "armv7"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SMP) || defined(KLD_MODULE)
|
#ifdef SMP
|
||||||
#ifndef MAXCPU
|
#ifndef MAXCPU
|
||||||
#define MAXCPU 256
|
#define MAXCPU 256
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define MAXCPU 1
|
#define MAXCPU 1
|
||||||
#endif /* SMP || KLD_MODULE */
|
#endif
|
||||||
|
|
||||||
#ifndef MAXMEMDOM
|
#ifndef MAXMEMDOM
|
||||||
#define MAXMEMDOM 2
|
#define MAXMEMDOM 2
|
||||||
|
@ -58,13 +58,13 @@
|
|||||||
#endif
|
#endif
|
||||||
#define MID_MACHINE MID_I386
|
#define MID_MACHINE MID_I386
|
||||||
|
|
||||||
#if defined(SMP) || defined(KLD_MODULE)
|
#ifdef SMP
|
||||||
#ifndef MAXCPU
|
#ifndef MAXCPU
|
||||||
#define MAXCPU 32
|
#define MAXCPU 32
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define MAXCPU 1
|
#define MAXCPU 1
|
||||||
#endif /* SMP || KLD_MODULE */
|
#endif
|
||||||
|
|
||||||
#ifndef MAXMEMDOM
|
#ifndef MAXMEMDOM
|
||||||
#define MAXMEMDOM 1
|
#define MAXMEMDOM 1
|
||||||
|
@ -73,13 +73,13 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SMP) || defined(KLD_MODULE)
|
#ifdef SMP
|
||||||
#ifndef MAXCPU
|
#ifndef MAXCPU
|
||||||
#define MAXCPU 256
|
#define MAXCPU 256
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define MAXCPU 1
|
#define MAXCPU 1
|
||||||
#endif /* SMP || KLD_MODULE */
|
#endif
|
||||||
|
|
||||||
#ifndef MAXMEMDOM
|
#ifndef MAXMEMDOM
|
||||||
#define MAXMEMDOM 8
|
#define MAXMEMDOM 8
|
||||||
|
@ -49,13 +49,13 @@
|
|||||||
#define MACHINE_ARCH "riscv64"
|
#define MACHINE_ARCH "riscv64"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SMP) || defined(KLD_MODULE)
|
#ifdef SMP
|
||||||
#ifndef MAXCPU
|
#ifndef MAXCPU
|
||||||
#define MAXCPU 16
|
#define MAXCPU 16
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define MAXCPU 1
|
#define MAXCPU 1
|
||||||
#endif /* SMP || KLD_MODULE */
|
#endif
|
||||||
|
|
||||||
#ifndef MAXMEMDOM
|
#ifndef MAXMEMDOM
|
||||||
#define MAXMEMDOM 1
|
#define MAXMEMDOM 1
|
||||||
|
Loading…
Reference in New Issue
Block a user