svn commit: r360464 - head/sys/kern
Michal Meloun
mmel at FreeBSD.org
Wed Apr 29 14:14:15 UTC 2020
Author: mmel
Date: Wed Apr 29 14:14:15 2020
New Revision: 360464
URL: https://svnweb.freebsd.org/changeset/base/360464
Log:
Don't try to set frequendcy for enumerated but newer started CPUs.
Openfirmare enumerates and installs the driver for all processors,
regardless of whether they will be started later (because of power
constrains for example).
MFC after: 3 weeks
Modified:
head/sys/kern/kern_cpu.c
Modified: head/sys/kern/kern_cpu.c
==============================================================================
--- head/sys/kern/kern_cpu.c Wed Apr 29 14:06:42 2020 (r360463)
+++ head/sys/kern/kern_cpu.c Wed Apr 29 14:14:15 2020 (r360464)
@@ -325,6 +325,12 @@ cf_set_method(device_t dev, const struct cf_level *lev
/* Bind to the target CPU before switching. */
pc = cpu_get_pcpu(set->dev);
+
+ /* Skip settings if CPU is not started. */
+ if (pc == NULL) {
+ error = 0;
+ goto out;
+ }
thread_lock(curthread);
pri = curthread->td_priority;
sched_prio(curthread, PRI_MIN);
More information about the svn-src-all
mailing list