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
This commit is contained in:
Michal Meloun 2020-04-29 14:14:15 +00:00
parent 7838a78269
commit 5ab94f48a2

View File

@ -325,6 +325,12 @@ cf_set_method(device_t dev, const struct cf_level *level, int priority)
/* 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);