Permalink
Browse files

ARM: smp_twd: Preserve prescaler on shutdown event

Preserve timer prescaler through timer shutdown. This is needed
because timer shutdown is invoked on low power CPU transitions when the kernel
switches to using the broadcast timer, and a governor may not update the
prescaler after CPU powers back up.

BUG=chrome-os-partner:5483
TEST=V8 benchmark regression is fixed.

Change-Id: I35901b3fc606da3f90967d8591c9d015b2872015
Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Reviewed-on: http://gerrit.chromium.org/gerrit/6233
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
  • Loading branch information...
Rakesh Iyer Sonny Rao
Rakesh Iyer authored and Sonny Rao committed Aug 18, 2011
1 parent b5c8a05 commit b08158c5eb90a5c52b0621bb301c189047793a24
Showing with 3 additions and 1 deletion.
  1. +3 −1 arch/arm/kernel/smp_twd.c
@@ -46,8 +46,10 @@ static void twd_set_mode(enum clock_event_mode mode,
/* period set, and timer enabled in 'next_event' hook */
ctrl |= TWD_TIMER_CONTROL_IT_ENABLE | TWD_TIMER_CONTROL_ONESHOT;
break;
- case CLOCK_EVT_MODE_UNUSED:
case CLOCK_EVT_MODE_SHUTDOWN:
+ /* turn off the timer but leave the prescaler as is. */
+ break;
+ case CLOCK_EVT_MODE_UNUSED:
default:
ctrl = 0;
}

0 comments on commit b08158c

Please sign in to comment.