Merge branches 'pm-cpufreq' and 'pm-cpuidle'

* pm-cpufreq:
  cpufreq: unlock when failing cpufreq_update_policy()
  intel_pstate: Correct rounding in busy calculation
  cpufreq: cpufreq-cpu0: fix CPU_THERMAL dependency

* pm-cpuidle:
  cpuidle: mvebu: Fix the name of the states
This commit is contained in:
Rafael J. Wysocki 2014-06-19 14:41:22 +02:00
commit 2ba87ea132
4 changed files with 9 additions and 12 deletions

View file

@ -186,6 +186,8 @@ config CPU_FREQ_GOV_CONSERVATIVE
config GENERIC_CPUFREQ_CPU0
tristate "Generic CPU0 cpufreq driver"
depends on HAVE_CLK && OF
# if CPU_THERMAL is on and THERMAL=m, CPU0 cannot be =y:
depends on !CPU_THERMAL || THERMAL
select PM_OPP
help
This adds a generic cpufreq driver for CPU0 frequency management.

View file

@ -2242,10 +2242,8 @@ int cpufreq_update_policy(unsigned int cpu)
struct cpufreq_policy new_policy;
int ret;
if (!policy) {
ret = -ENODEV;
goto no_policy;
}
if (!policy)
return -ENODEV;
down_write(&policy->rwsem);
@ -2264,7 +2262,7 @@ int cpufreq_update_policy(unsigned int cpu)
new_policy.cur = cpufreq_driver->get(cpu);
if (WARN_ON(!new_policy.cur)) {
ret = -EIO;
goto no_policy;
goto unlock;
}
if (!policy->cur) {
@ -2279,10 +2277,10 @@ int cpufreq_update_policy(unsigned int cpu)
ret = cpufreq_set_policy(policy, &new_policy);
unlock:
up_write(&policy->rwsem);
cpufreq_cpu_put(policy);
no_policy:
return ret;
}
EXPORT_SYMBOL(cpufreq_update_policy);

View file

@ -196,10 +196,7 @@ static signed int pid_calc(struct _pid *pid, int32_t busy)
pid->last_err = fp_error;
result = pterm + mul_fp(pid->integral, pid->i_gain) + dterm;
if (result >= 0)
result = result + (1 << (FRAC_BITS-1));
else
result = result - (1 << (FRAC_BITS-1));
result = result + (1 << (FRAC_BITS-1));
return (signed int)fp_toint(result);
}

View file

@ -55,7 +55,7 @@ static struct cpuidle_driver armada_370_xp_idle_driver = {
.power_usage = 50,
.target_residency = 100,
.flags = CPUIDLE_FLAG_TIME_VALID,
.name = "MV CPU IDLE",
.name = "Idle",
.desc = "CPU power down",
},
.states[2] = {
@ -65,7 +65,7 @@ static struct cpuidle_driver armada_370_xp_idle_driver = {
.target_residency = 1000,
.flags = CPUIDLE_FLAG_TIME_VALID |
ARMADA_370_XP_FLAG_DEEP_IDLE,
.name = "MV CPU DEEP IDLE",
.name = "Deep idle",
.desc = "CPU and L2 Fabric power down",
},
.state_count = ARMADA_370_XP_MAX_STATES,