]> www.infradead.org Git - users/dwmw2/linux.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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:22:42 +0000 (11:22 -0700)
commita214985570a6290d46800fe235f49b2989bfd784
treed17e54f6a4a279c24277d810e50699c0dbd1ec08
parentfe7f657830d40cc5a21952d7131f0bfdf4aff79d
clocksource: sh_tmu: compute mult and shift before registration

commit 66f49121ffa41a19c59965b31b046d8368fec3c7 upstream.

Since commit 98962465ed9e6ea99c38e0af63fe1dcb5a79dc25 ("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>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/clocksource/sh_tmu.c