ARM: sched_clock: allow init_sched_clock() to be called early
authorRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 11 Jan 2011 16:23:04 +0000 (16:23 +0000)
committer黄涛 <huangtao@rock-chips.com>
Fri, 11 Mar 2011 03:36:09 +0000 (11:36 +0800)
commit4ce92e81ee9cc41360fcf3694a718cbbb7862bd2
tree7bce176ac60aec68cc682eaf829ce0a36aac6e1f
parent78a8e9426d1ffaa19c29e92a8c4a726d2364c10e
ARM: sched_clock: allow init_sched_clock() to be called early

sched_clock is supposed to be initialized early - in the recently added
init_early platform hook.  However, in doing so we end up calling
mod_timer() before the timer lists are initialized, resulting in an
oops.

Split the initialization in two - the part which the platform calls
early which starts things off.  The addition of the timer can be
delayed until after we have more of the kernel initialized - when the
normal time sources are initialized.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/sched_clock.h
arch/arm/kernel/sched_clock.c
arch/arm/kernel/time.c