]> git.baikalelectronics.ru Git - kernel.git/commit
clocksource: sh_tmu: compute mult and shift before registration
authorAurelien Jarno <aurelien@aurel32.net>
Mon, 31 May 2010 21:45:48 +0000 (21:45 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 2 Jun 2010 08:02:35 +0000 (17:02 +0900)
commite9b80f0e8eeacc9f6c56e4d6f2208b954bab026c
treecb3897ae04561c13f661c6dd8542be6a34b8d477
parente358e8f8a4ad135e1452f4fa5d829b96783a3ee8
clocksource: sh_tmu: compute mult and shift before registration

Since commit 19aa305d3f2671565b463d7c9b6d9cc9e58014e3 ("nohz: Prevent
clocksource wrapping during idle"), the CPU of an R2D board never goes
to idle. This commit assumes that mult and shift are assigned before
the clocksource is registered. As a consequence the safe maximum sleep
time is negative and the CPU never goes into idle.

This patch fixes the problem by moving mult and shift initialization
from sh_tmu_clocksource_enable() to sh_tmu_register_clocksource().

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Cc: stable@kernel.org
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/clocksource/sh_tmu.c