From 8232a1eddadd6e70ce7bee085344b182517d44a7 Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Fri, 23 Sep 2022 21:20:52 +0100 Subject: [PATCH] cpuset(9): Refer to CPU_SETSIZE not MAXCPU The maximum CPU number of a cpuset_t is determined by CPU_SETSIZE. In the kernel this is MAXCPU, but in userspace it is CPU_MAXSIZE unless CPU_SETSIZE is defined before including sys/_cpuset.h. CPU_MAXSIZE is 256 and in userspace MAXCPU is generally 1 because it being set to a larger MD value is gated on SMP being defined (not generally the case in userspace). Reported by: Nathaniel Wesley Filardo Reviewed by: cem, jhb MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D36679 --- share/man/man9/cpuset.9 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man9/cpuset.9 b/share/man/man9/cpuset.9 index 29dbc8fc733b..1320cd9f4350 100644 --- a/share/man/man9/cpuset.9 +++ b/share/man/man9/cpuset.9 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 12, 2019 +.Dd September 23, 2022 .Dt CPUSET 9 .Os .Sh NAME @@ -110,9 +110,9 @@ Each CPU is represented by a single bit. The maximum number of CPUs representable by .Vt cpuset_t is -.Va MAXCPU . +.Va CPU_SETSIZE . Individual CPUs in cpusets are referenced with indices zero through -.Fa MAXCPU - 1 . +.Fa CPU_SETSIZE - 1 . .Pp The .Fn CPUSET_T_INITIALIZER