Skip to content

Commit

Permalink
Merge branch 'cpuidle' into test
Browse files Browse the repository at this point in the history
  • Loading branch information
Len Brown committed Oct 23, 2008
2 parents ebd7e45 + 89cedfe commit 4538fad
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ config GENERIC_TIME_VSYSCALL
config ARCH_HAS_CPU_RELAX
def_bool y

config ARCH_HAS_DEFAULT_IDLE
def_bool y

config ARCH_HAS_CACHE_LINE_SIZE
def_bool y

Expand Down
1 change: 1 addition & 0 deletions drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -1587,6 +1587,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,

if (acpi_idle_bm_check()) {
if (dev->safe_state) {
dev->last_state = dev->safe_state;
return dev->safe_state->enter(dev, dev->safe_state);
} else {
local_irq_disable();
Expand Down
9 changes: 8 additions & 1 deletion drivers/cpuidle/cpuidle.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ static void cpuidle_idle_call(void)
if (pm_idle_old)
pm_idle_old();
else
#if defined(CONFIG_ARCH_HAS_DEFAULT_IDLE)
default_idle();
#else
local_irq_enable();
#endif
return;
}

Expand All @@ -67,8 +71,11 @@ static void cpuidle_idle_call(void)
target_state = &dev->states[next_state];

/* enter the state and update stats */
dev->last_residency = target_state->enter(dev, target_state);
dev->last_state = target_state;
dev->last_residency = target_state->enter(dev, target_state);
if (dev->last_state)
target_state = dev->last_state;

target_state->time += (unsigned long long)dev->last_residency;
target_state->usage++;

Expand Down

0 comments on commit 4538fad

Please sign in to comment.