Fix non-SMP kernel regression introduced in the previous commit.
Reviewed by: jkoshy
This commit is contained in:
parent
ab0b125777
commit
bcba261a2c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=175215
@ -580,10 +580,13 @@ main(int argc, char **argv)
|
||||
if (sysctlbyname("hw.ncpu", &ncpu, &dummy, NULL, 0) < 0)
|
||||
err(EX_OSERR, "ERROR: Cannot determine the number of CPUs");
|
||||
cpumask = (1 << ncpu) - 1;
|
||||
if (sysctlbyname("machdep.hlt_cpus", &haltedcpus, &dummy,
|
||||
NULL, 0) < 0)
|
||||
err(EX_OSERR, "ERROR: Cannot determine which CPUs are halted");
|
||||
cpumask &= ~haltedcpus;
|
||||
if (ncpu > 1) {
|
||||
if (sysctlbyname("machdep.hlt_cpus", &haltedcpus, &dummy,
|
||||
NULL, 0) < 0)
|
||||
err(EX_OSERR, "ERROR: Cannot determine which CPUs are "
|
||||
"halted");
|
||||
cpumask &= ~haltedcpus;
|
||||
}
|
||||
|
||||
while ((option = getopt(argc, argv,
|
||||
"CD:EG:M:NO:P:R:S:Wc:dgk:n:o:p:qr:s:t:vw:z:")) != -1)
|
||||
|
Loading…
Reference in New Issue
Block a user