Skip to content

Commit

Permalink
Merge branches 'pm-sleep', 'pm-cpuidle' and 'pm-cpufreq'
Browse files Browse the repository at this point in the history
* pm-sleep:
  PM / suspend: Make cpuidle work in the "freeze" state

* pm-cpuidle:
  intel_idle: fix IVT idle state table setting

* pm-cpufreq:
  cpufreq: highbank: fix ARM_HIGHBANK_CPUFREQ dependency warning
  cpufreq: ppc: Fix integer overflow in expression
  cpufreq, powernv: Fix build failure on UP
  cpufreq: unicore32: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
  • Loading branch information
Rafael J. Wysocki committed Apr 21, 2014
4 parents 1efa9f9 + f3f1253 + d27dca4 + d76ae2e commit e38ed29
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
6 changes: 1 addition & 5 deletions drivers/cpufreq/Kconfig.arm
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,7 @@ config ARM_EXYNOS_CPU_FREQ_BOOST_SW

config ARM_HIGHBANK_CPUFREQ
tristate "Calxeda Highbank-based"
depends on ARCH_HIGHBANK
select GENERIC_CPUFREQ_CPU0
select PM_OPP
select REGULATOR

depends on ARCH_HIGHBANK && GENERIC_CPUFREQ_CPU0 && REGULATOR
default m
help
This adds the CPUFreq driver for Calxeda Highbank SoC
Expand Down
1 change: 1 addition & 0 deletions drivers/cpufreq/powernv-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

#include <asm/cputhreads.h>
#include <asm/reg.h>
#include <asm/smp.h> /* Required for cpu_sibling_mask() in UP configs */

#define POWERNV_MAX_PSTATES 256

Expand Down
2 changes: 1 addition & 1 deletion drivers/cpufreq/ppc-corenet-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ static int corenet_cpufreq_cpu_init(struct cpufreq_policy *policy)
per_cpu(cpu_data, i) = data;

policy->cpuinfo.transition_latency =
(12 * NSEC_PER_SEC) / fsl_get_sys_freq();
(12ULL * NSEC_PER_SEC) / fsl_get_sys_freq();
of_node_put(np);

return 0;
Expand Down
4 changes: 1 addition & 3 deletions drivers/cpufreq/unicore2-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ static int __init ucv2_cpu_init(struct cpufreq_policy *policy)
policy->max = policy->cpuinfo.max_freq = 1000000;
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
policy->clk = clk_get(NULL, "MAIN_CLK");
if (IS_ERR(policy->clk))
return PTR_ERR(policy->clk);
return 0;
return PTR_ERR_OR_ZERO(policy->clk);
}

static struct cpufreq_driver ucv2_driver = {
Expand Down
3 changes: 2 additions & 1 deletion drivers/idle/intel_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,9 +750,10 @@ void intel_idle_state_table_update(void)
if (package_num + 1 > num_sockets) {
num_sockets = package_num + 1;

if (num_sockets > 4)
if (num_sockets > 4) {
cpuidle_state_table = ivt_cstates_8s;
return;
}
}
}

Expand Down
3 changes: 3 additions & 0 deletions kernel/power/suspend.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/init.h>
#include <linux/console.h>
#include <linux/cpu.h>
#include <linux/cpuidle.h>
#include <linux/syscalls.h>
#include <linux/gfp.h>
#include <linux/io.h>
Expand Down Expand Up @@ -53,7 +54,9 @@ static void freeze_begin(void)

static void freeze_enter(void)
{
cpuidle_resume();
wait_event(suspend_freeze_wait_head, suspend_freeze_wake);
cpuidle_pause();
}

void freeze_wake(void)
Expand Down

0 comments on commit e38ed29

Please sign in to comment.