diff options
author | Len Brown <len.brown@intel.com> | 2007-10-04 01:23:47 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-10-10 00:26:43 -0400 |
commit | e196441bdf2dbf0526b28a6829c39557c236d611 (patch) | |
tree | d0f1c806a503f127ba54ddad7a5a1a0778080bb7 /drivers/acpi/processor_idle.c | |
parent | 4f86d3a8e297205780cca027e974fd5f81064780 (diff) |
ACPI: cpuidle: port idle timer suspend/resume workaround to cpuidle
Some timers stop during C2 and C3, and so there are various
generations of timer broadcast workarounds to deal with that.
But that (already complex) code gets confused during suspend.
As it is unlikely that deep C-states would save much power
during the actual suspend/resume process anyway, deep C-states
were disabled via the addition of .suspend/.resume hooks
in to the ACPI processor driver.
Here that workaround is ported to the cpuidle version of
the ACPI idle loop. Technically, ACPI could un-register
itself from cpuidle on .suspend, but that code path
is currently quite cumbersome. So instead,
we simply invoke C1 from the C2 and C3 handlers
for the duration of .suspend/.resume.
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/processor_idle.c')
-rw-r--r-- | drivers/acpi/processor_idle.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 99da6a790857..0cad56ca342b 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -1416,6 +1416,9 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, | |||
1416 | if (unlikely(!pr)) | 1416 | if (unlikely(!pr)) |
1417 | return 0; | 1417 | return 0; |
1418 | 1418 | ||
1419 | if (acpi_idle_suspend) | ||
1420 | return(acpi_idle_enter_c1(dev, state)); | ||
1421 | |||
1419 | if (pr->flags.bm_check) | 1422 | if (pr->flags.bm_check) |
1420 | acpi_idle_update_bm_rld(pr, cx); | 1423 | acpi_idle_update_bm_rld(pr, cx); |
1421 | 1424 | ||
@@ -1477,6 +1480,9 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, | |||
1477 | if (unlikely(!pr)) | 1480 | if (unlikely(!pr)) |
1478 | return 0; | 1481 | return 0; |
1479 | 1482 | ||
1483 | if (acpi_idle_suspend) | ||
1484 | return(acpi_idle_enter_c1(dev, state)); | ||
1485 | |||
1480 | local_irq_disable(); | 1486 | local_irq_disable(); |
1481 | current_thread_info()->status &= ~TS_POLLING; | 1487 | current_thread_info()->status &= ~TS_POLLING; |
1482 | /* | 1488 | /* |