summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2005-08-16 20:03:08 +0000
committerume <ume@FreeBSD.org>2005-08-16 20:03:08 +0000
commit69a7276f8fbc2461d034a784abb6acd57872f0ec (patch)
tree8e4450d25e84eb38eceb86149313819a0d69f781
parent0b8c72b90b7b6c3863eed4dec8b9faef01615bbe (diff)
downloadFreeBSD-src-69a7276f8fbc2461d034a784abb6acd57872f0ec.zip
FreeBSD-src-69a7276f8fbc2461d034a784abb6acd57872f0ec.tar.gz
Save cpu level only when priority is greater than PRIO_USER
to make CPUFREQ_SET(NULL, prio) work. TODO: implement saved_level as stack. Reviewed by: njl
-rw-r--r--sys/kern/kern_cpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_cpu.c b/sys/kern/kern_cpu.c
index be7fce9..d619ec8 100644
--- a/sys/kern/kern_cpu.c
+++ b/sys/kern/kern_cpu.c
@@ -336,7 +336,7 @@ cf_set_method(device_t dev, const struct cf_level *level, int priority)
*/
if (sc->curr_level.total_set.freq != CPUFREQ_VAL_UNKNOWN &&
sc->saved_level.total_set.freq == CPUFREQ_VAL_UNKNOWN &&
- priority > sc->curr_priority) {
+ priority > CPUFREQ_PRIO_USER && priority > sc->curr_priority) {
CF_DEBUG("saving level, freq %d prio %d\n",
sc->curr_level.total_set.freq, sc->curr_priority);
sc->saved_level = sc->curr_level;
OpenPOWER on IntegriCloud