powerd: Make sure that cpu0 is in the usched global cpumask.
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Tue, 23 Jun 2015 14:56:15 +0000 (22:56 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 24 Jun 2015 01:29:39 +0000 (09:29 +0800)
usr.sbin/powerd/powerd.c

index 567a94e..5d41e10 100644 (file)
@@ -416,7 +416,7 @@ acpi_setcpufreq(int nstate)
        /*
         * Set the mask of cpus the userland scheduler is allowed to use.
         */
-       CPUMASK_ASSBMASK(global_cpumask, nstate);
+       CPUMASK_ASSBMASK(global_cpumask, nstate == 0 ? 1 : nstate);
        sysctlbyname("kern.usched_global_cpumask", NULL, 0,
                     &global_cpumask, sizeof(global_cpumask));