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:
mmel 2020-04-29 14:14:15 +00:00
parent b9cad2d4c8
commit 43798da41a

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);