diff options
author | Len Brown <len.brown@intel.com> | 2008-10-22 23:20:05 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-10-22 23:20:05 -0400 |
commit | 4538fad56ee1c16bce0294b5647d2551f0e03164 (patch) | |
tree | bbfe1b95eb38f2cf160c6521dc32f9a9dbc82cd2 | |
parent | ebd7e45f6d27556c94216024212a462aaf899ecb (diff) | |
parent | 89cedfefca1d446ee2598fd3bcbb23ee3802e26a (diff) |
Merge branch 'cpuidle' into test
-rw-r--r-- | arch/x86/Kconfig | 3 | ||||
-rw-r--r-- | drivers/acpi/processor_idle.c | 1 | ||||
-rw-r--r-- | drivers/cpuidle/cpuidle.c | 9 |
3 files changed, 12 insertions, 1 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index ed92864d1325..f8caf040650e 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -123,6 +123,9 @@ config GENERIC_TIME_VSYSCALL | |||
123 | config ARCH_HAS_CPU_RELAX | 123 | config ARCH_HAS_CPU_RELAX |
124 | def_bool y | 124 | def_bool y |
125 | 125 | ||
126 | config ARCH_HAS_DEFAULT_IDLE | ||
127 | def_bool y | ||
128 | |||
126 | config ARCH_HAS_CACHE_LINE_SIZE | 129 | config ARCH_HAS_CACHE_LINE_SIZE |
127 | def_bool y | 130 | def_bool y |
128 | 131 | ||
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index cf5b1b7b684f..81b40ed5379e 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -1587,6 +1587,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, | |||
1587 | 1587 | ||
1588 | if (acpi_idle_bm_check()) { | 1588 | if (acpi_idle_bm_check()) { |
1589 | if (dev->safe_state) { | 1589 | if (dev->safe_state) { |
1590 | dev->last_state = dev->safe_state; | ||
1590 | return dev->safe_state->enter(dev, dev->safe_state); | 1591 | return dev->safe_state->enter(dev, dev->safe_state); |
1591 | } else { | 1592 | } else { |
1592 | local_irq_disable(); | 1593 | local_irq_disable(); |
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 5ce07b517c58..bb6e3b338043 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c | |||
@@ -56,7 +56,11 @@ static void cpuidle_idle_call(void) | |||
56 | if (pm_idle_old) | 56 | if (pm_idle_old) |
57 | pm_idle_old(); | 57 | pm_idle_old(); |
58 | else | 58 | else |
59 | #if defined(CONFIG_ARCH_HAS_DEFAULT_IDLE) | ||
60 | default_idle(); | ||
61 | #else | ||
59 | local_irq_enable(); | 62 | local_irq_enable(); |
63 | #endif | ||
60 | return; | 64 | return; |
61 | } | 65 | } |
62 | 66 | ||
@@ -67,8 +71,11 @@ static void cpuidle_idle_call(void) | |||
67 | target_state = &dev->states[next_state]; | 71 | target_state = &dev->states[next_state]; |
68 | 72 | ||
69 | /* enter the state and update stats */ | 73 | /* enter the state and update stats */ |
70 | dev->last_residency = target_state->enter(dev, target_state); | ||
71 | dev->last_state = target_state; | 74 | dev->last_state = target_state; |
75 | dev->last_residency = target_state->enter(dev, target_state); | ||
76 | if (dev->last_state) | ||
77 | target_state = dev->last_state; | ||
78 | |||
72 | target_state->time += (unsigned long long)dev->last_residency; | 79 | target_state->time += (unsigned long long)dev->last_residency; |
73 | target_state->usage++; | 80 | target_state->usage++; |
74 | 81 | ||