{
struct cpufreq_freqs *freq = data;
+ /* Don't update cur_freq if CPU is managed and we're
+ * waking up: else we won't remember what frequency
+ * we need to set the CPU to.
+ */
+ if (cpu_is_managed[freq->cpu] && (val == CPUFREQ_RESUMECHANGE))
+ return 0;
+
cpu_cur_freq[freq->cpu] = freq->new;
return 0;
#ifdef CONFIG_CPU_FREQ_24_API
+#warning The /proc/sys/cpu/ and sysctl interface to cpufreq will be removed from the 2.6. kernel series soon after 2005-01-01
+
+static unsigned int warning_print = 0;
/*********************** cpufreq_sysctl interface ********************/
static int
return 0;
}
+ if (!warning_print) {
+ warning_print++;
+ printk(KERN_INFO "Access to /proc/sys/cpu/ is deprecated and "
+ "will be removed from (new) 2.6. kernels soon "
+ "after 2005-01-01\n");
+ }
+
if (write) {
unsigned int freq;
if (!cpu_online(cpu))
return -EINVAL;
+ if (!warning_print) {
+ warning_print++;
+ printk(KERN_INFO "Access to /proc/sys/cpu/ is deprecated and "
+ "will be removed from (new) 2.6. kernels soon "
+ "after 2005-01-01\n");
+ }
+
if (oldval && oldlenp) {
size_t oldlen;
else if (policy->min > cpu_cur_freq[cpu])
__cpufreq_driver_target(¤t_policy[cpu], policy->min,
CPUFREQ_RELATION_L);
+ else
+ __cpufreq_driver_target(¤t_policy[cpu], cpu_cur_freq[cpu],
+ CPUFREQ_RELATION_L);
memcpy (¤t_policy[cpu], policy, sizeof(struct cpufreq_policy));
up(&userspace_sem);
break;