Commit e658d442 authored by Dave Jones's avatar Dave Jones

[CPUFREQ][X86] Small fixes necessary to separate the governors from policies.

parent 4299ec58
......@@ -580,7 +580,7 @@ acpi_cpufreq_cpu_init (
if (perf->states[i].transition_latency > policy->cpuinfo.transition_latency)
policy->cpuinfo.transition_latency = perf->states[i].transition_latency;
}
policy->policy = CPUFREQ_POLICY_PERFORMANCE;
policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cur = perf->states[pr->limit.state.px].core_frequency * 1000;
/* table init */
......
......@@ -216,7 +216,7 @@ static int elanfreq_cpu_init(struct cpufreq_policy *policy)
}
/* cpuinfo and default policy values */
policy->policy = CPUFREQ_POLICY_PERFORMANCE;
policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
policy->cur = elanfreq_get_cpu_frequency();
......
......@@ -434,7 +434,7 @@ static int cpufreq_gx_cpu_init(struct cpufreq_policy *policy)
policy->min = maxfreq / POLICY_MIN_DIV;
policy->max = maxfreq;
policy->cur = curfreq;
policy->policy = CPUFREQ_POLICY_PERFORMANCE;
policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.min_freq = maxfreq / max_duration;
policy->cpuinfo.max_freq = maxfreq;
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
......
......@@ -584,7 +584,7 @@ static int longhaul_cpu_init (struct cpufreq_policy *policy)
if (ret != 0)
return ret;
policy->policy = CPUFREQ_POLICY_PERFORMANCE;
policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
policy->cur = (unsigned int) (longhaul_get_cpu_fsb() * longhaul_get_cpu_mult() * 100);
......
......@@ -120,7 +120,8 @@ static int longrun_verify_policy(struct cpufreq_policy *policy)
policy->cpuinfo.min_freq,
policy->cpuinfo.max_freq);
if (policy->policy == CPUFREQ_POLICY_GOVERNOR)
if ((policy->policy != CPUFREQ_POLICY_POWERSAVE) &&
(policy->policy != CPUFREQ_POLICY_PERFORMANCE))
return -EINVAL;
return 0;
......
......@@ -211,7 +211,7 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy)
cpufreq_frequency_table_get_attr(p4clockmod_table, policy->cpu);
/* cpuinfo and default policy values */
policy->policy = CPUFREQ_POLICY_PERFORMANCE;
policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.transition_latency = 1000;
policy->cur = stock_freq;
......
......@@ -157,7 +157,7 @@ static int powernow_k6_cpu_init(struct cpufreq_policy *policy)
}
/* cpuinfo and default policy values */
policy->policy = CPUFREQ_POLICY_PERFORMANCE;
policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
policy->cur = busfreq * max_multiplier;
......
......@@ -372,7 +372,7 @@ static int __init powernow_cpu_init (struct cpufreq_policy *policy)
printk (KERN_INFO PFX "Minimum speed %d MHz. Maximum speed %d MHz.\n",
minimum_speed, maximum_speed);
policy->policy = CPUFREQ_POLICY_PERFORMANCE;
policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.transition_latency = latency;
policy->cur = maximum_speed;
......
......@@ -201,9 +201,7 @@ static int centrino_cpu_init(struct cpufreq_policy *policy)
freq = get_cur_freq();
policy->policy = (freq == centrino_model->max_freq) ?
CPUFREQ_POLICY_PERFORMANCE :
CPUFREQ_POLICY_POWERSAVE;
policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.transition_latency = 10; /* 10uS transition latency */
policy->cur = freq;
......
......@@ -299,8 +299,7 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)
(speed / 1000));
/* cpuinfo and default policy values */
policy->policy = (speed == speedstep_freqs[SPEEDSTEP_LOW].frequency) ?
CPUFREQ_POLICY_POWERSAVE : CPUFREQ_POLICY_PERFORMANCE;
policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
policy->cur = speed;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment