Skip to content

Commit

Permalink
ACPI: cpuidle: port idle timer suspend/resume workaround to cpuidle
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Len Brown committed Oct 10, 2007
1 parent 4f86d3a commit e196441
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,9 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
if (unlikely(!pr))
return 0;

if (acpi_idle_suspend)
return(acpi_idle_enter_c1(dev, state));

if (pr->flags.bm_check)
acpi_idle_update_bm_rld(pr, cx);

Expand Down Expand Up @@ -1477,6 +1480,9 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
if (unlikely(!pr))
return 0;

if (acpi_idle_suspend)
return(acpi_idle_enter_c1(dev, state));

local_irq_disable();
current_thread_info()->status &= ~TS_POLLING;
/*
Expand Down

0 comments on commit e196441

Please sign in to comment.