Commit 2ba87ea1 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

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
...@@ -186,6 +186,8 @@ config CPU_FREQ_GOV_CONSERVATIVE ...@@ -186,6 +186,8 @@ config CPU_FREQ_GOV_CONSERVATIVE
config GENERIC_CPUFREQ_CPU0 config GENERIC_CPUFREQ_CPU0
tristate "Generic CPU0 cpufreq driver" tristate "Generic CPU0 cpufreq driver"
depends on HAVE_CLK && OF 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 select PM_OPP
help help
This adds a generic cpufreq driver for CPU0 frequency management. This adds a generic cpufreq driver for CPU0 frequency management.
......
...@@ -2242,10 +2242,8 @@ int cpufreq_update_policy(unsigned int cpu) ...@@ -2242,10 +2242,8 @@ int cpufreq_update_policy(unsigned int cpu)
struct cpufreq_policy new_policy; struct cpufreq_policy new_policy;
int ret; int ret;
if (!policy) { if (!policy)
ret = -ENODEV; return -ENODEV;
goto no_policy;
}
down_write(&policy->rwsem); down_write(&policy->rwsem);
...@@ -2264,7 +2262,7 @@ int cpufreq_update_policy(unsigned int cpu) ...@@ -2264,7 +2262,7 @@ int cpufreq_update_policy(unsigned int cpu)
new_policy.cur = cpufreq_driver->get(cpu); new_policy.cur = cpufreq_driver->get(cpu);
if (WARN_ON(!new_policy.cur)) { if (WARN_ON(!new_policy.cur)) {
ret = -EIO; ret = -EIO;
goto no_policy; goto unlock;
} }
if (!policy->cur) { if (!policy->cur) {
...@@ -2279,10 +2277,10 @@ int cpufreq_update_policy(unsigned int cpu) ...@@ -2279,10 +2277,10 @@ int cpufreq_update_policy(unsigned int cpu)
ret = cpufreq_set_policy(policy, &new_policy); ret = cpufreq_set_policy(policy, &new_policy);
unlock:
up_write(&policy->rwsem); up_write(&policy->rwsem);
cpufreq_cpu_put(policy); cpufreq_cpu_put(policy);
no_policy:
return ret; return ret;
} }
EXPORT_SYMBOL(cpufreq_update_policy); EXPORT_SYMBOL(cpufreq_update_policy);
......
...@@ -196,10 +196,7 @@ static signed int pid_calc(struct _pid *pid, int32_t busy) ...@@ -196,10 +196,7 @@ static signed int pid_calc(struct _pid *pid, int32_t busy)
pid->last_err = fp_error; pid->last_err = fp_error;
result = pterm + mul_fp(pid->integral, pid->i_gain) + dterm; result = pterm + mul_fp(pid->integral, pid->i_gain) + dterm;
if (result >= 0) result = result + (1 << (FRAC_BITS-1));
result = result + (1 << (FRAC_BITS-1));
else
result = result - (1 << (FRAC_BITS-1));
return (signed int)fp_toint(result); return (signed int)fp_toint(result);
} }
......
...@@ -55,7 +55,7 @@ static struct cpuidle_driver armada_370_xp_idle_driver = { ...@@ -55,7 +55,7 @@ static struct cpuidle_driver armada_370_xp_idle_driver = {
.power_usage = 50, .power_usage = 50,
.target_residency = 100, .target_residency = 100,
.flags = CPUIDLE_FLAG_TIME_VALID, .flags = CPUIDLE_FLAG_TIME_VALID,
.name = "MV CPU IDLE", .name = "Idle",
.desc = "CPU power down", .desc = "CPU power down",
}, },
.states[2] = { .states[2] = {
...@@ -65,7 +65,7 @@ static struct cpuidle_driver armada_370_xp_idle_driver = { ...@@ -65,7 +65,7 @@ static struct cpuidle_driver armada_370_xp_idle_driver = {
.target_residency = 1000, .target_residency = 1000,
.flags = CPUIDLE_FLAG_TIME_VALID | .flags = CPUIDLE_FLAG_TIME_VALID |
ARMADA_370_XP_FLAG_DEEP_IDLE, ARMADA_370_XP_FLAG_DEEP_IDLE,
.name = "MV CPU DEEP IDLE", .name = "Deep idle",
.desc = "CPU and L2 Fabric power down", .desc = "CPU and L2 Fabric power down",
}, },
.state_count = ARMADA_370_XP_MAX_STATES, .state_count = ARMADA_370_XP_MAX_STATES,
......
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