svn commit: r299383 - head/sys/arm/arm
Emmanuel Vadot
manu at FreeBSD.org
Tue May 10 19:11:26 UTC 2016
Author: manu
Date: Tue May 10 19:11:25 2016
New Revision: 299383
URL: https://svnweb.freebsd.org/changeset/base/299383
Log:
When PLATFORM_SMP is enabled, check if tunable hw.ncpu is set and valid
(>= 1 and <= real ncores) and set mp_ncpus to it.
Approved by: andrew (mentor)
Differential Revision: https://reviews.freebsd.org/D6151
Modified:
head/sys/arm/arm/platform.c
Modified: head/sys/arm/arm/platform.c
==============================================================================
--- head/sys/arm/arm/platform.c Tue May 10 18:28:38 2016 (r299382)
+++ head/sys/arm/arm/platform.c Tue May 10 19:11:25 2016 (r299383)
@@ -209,8 +209,16 @@ platform_delay(int usec, void *arg __unu
void
platform_mp_setmaxid(void)
{
+ int ncpu;
PLATFORM_MP_SETMAXID(plat_obj);
+
+ if (TUNABLE_INT_FETCH("hw.ncpu", &ncpu)) {
+ if (ncpu >= 1 && ncpu <= mp_ncpus) {
+ mp_ncpus = ncpu;
+ mp_maxid = ncpu - 1;
+ }
+ }
}
void
More information about the svn-src-all
mailing list