Skip to contentSkip to conversation

remove invalid setting in powernow-k8

PATCH New Dominik Brodowski 1 participant 1 message Oct 2, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove invalid setting in powernow-k8

The Powernow-K8 cpufreq driver does not yet depend on CPUFreq Frequency Table support - but work is going on in this direction. Nevertheless, remove this dependency, but mark this driver as being "experimental".

Also, fix up the invalid usage of pol->policy in drv_init() and mark it with a warning in drv_verify()

 arch/i386/kernel/cpu/cpufreq/Kconfig       |    2 +-
 arch/i386/kernel/cpu/cpufreq/powernow-k8.c |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
arch/i386/kernel/cpu/cpufreq/Kconfig +1 -1
diff -ruN linux-original/arch/i386/kernel/cpu/cpufreq/Kconfig linux/arch/i386/kernel/cpu/cpufreq/Kconfig
@@ -90,7 +90,7 @@
 
 config X86_POWERNOW_K8
 	tristate "AMD Opteron/Athlon64 PowerNow!"
-	depends on CPU_FREQ_TABLE
+	depends on CPU_FREQ && EXPERIMENTAL
 	help
 	  This adds the CPUFreq driver for mobile AMD Opteron/Athlon64 processors.
 
arch/i386/kernel/cpu/cpufreq/powernow-k8.c +2 -1
diff -ruN linux-original/arch/i386/kernel/cpu/cpufreq/powernow-k8.c linux/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
@@ -935,6 +935,7 @@
 		return -ENODEV;
 	}
 
+#warning pol->policy is in undefined state here
 	res = find_match(&targ, &min, &max,
 			 pol->policy == CPUFREQ_POLICY_POWERSAVE ?
 			 SEARCH_DOWN : SEARCH_UP, 0, 0);
@@ -954,7 +955,7 @@
 		return -ENODEV;
 	}
 
-	pol->policy = CPUFREQ_POLICY_PERFORMANCE; /* boot as fast as we can */
+	pol->governor = CPUFREQ_DEFAULT_GOVERNOR;
 
 	/* Take a crude guess here. */
 	pol->cpuinfo.transition_latency = ((rvo + 8) * vstable * VST_UNITS_20US)