Date: Wed, 5 Feb 2020 19:08:21 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357585 - in head/sys: amd64/include arm/include arm64/include i386/include powerpc/include riscv/include Message-ID: <202002051908.015J8LC6043749@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Wed Feb 5 19:08:21 2020 New Revision: 357585 URL: https://svnweb.freebsd.org/changeset/base/357585 Log: 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 Modified: head/sys/amd64/include/param.h head/sys/arm/include/param.h head/sys/arm64/include/param.h head/sys/i386/include/param.h head/sys/powerpc/include/param.h head/sys/riscv/include/param.h Modified: head/sys/amd64/include/param.h ============================================================================== --- head/sys/amd64/include/param.h Wed Feb 5 18:38:07 2020 (r357584) +++ head/sys/amd64/include/param.h Wed Feb 5 19:08:21 2020 (r357585) @@ -65,7 +65,7 @@ #define MACHINE_ARCH32 "i386" #endif -#if defined(SMP) || defined(KLD_MODULE) +#ifdef SMP #ifndef MAXCPU #define MAXCPU 256 #endif Modified: head/sys/arm/include/param.h ============================================================================== --- head/sys/arm/include/param.h Wed Feb 5 18:38:07 2020 (r357584) +++ head/sys/arm/include/param.h Wed Feb 5 19:08:21 2020 (r357585) @@ -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 Modified: head/sys/arm64/include/param.h ============================================================================== --- head/sys/arm64/include/param.h Wed Feb 5 18:38:07 2020 (r357584) +++ head/sys/arm64/include/param.h Wed Feb 5 19:08:21 2020 (r357585) @@ -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 Modified: head/sys/i386/include/param.h ============================================================================== --- head/sys/i386/include/param.h Wed Feb 5 18:38:07 2020 (r357584) +++ head/sys/i386/include/param.h Wed Feb 5 19:08:21 2020 (r357585) @@ -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 Modified: head/sys/powerpc/include/param.h ============================================================================== --- head/sys/powerpc/include/param.h Wed Feb 5 18:38:07 2020 (r357584) +++ head/sys/powerpc/include/param.h Wed Feb 5 19:08:21 2020 (r357585) @@ -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 Modified: head/sys/riscv/include/param.h ============================================================================== --- head/sys/riscv/include/param.h Wed Feb 5 18:38:07 2020 (r357584) +++ head/sys/riscv/include/param.h Wed Feb 5 19:08:21 2020 (r357585) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002051908.015J8LC6043749>