diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-01-11 16:23:04 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-01-11 16:23:04 +0000 |
commit | 211baa7016894c02fc18693e21ca479cd08ac0c0 (patch) | |
tree | 0fea398c6288b46542fc1640adff697f9b1e07a5 /arch/arm/kernel/time.c | |
parent | 1aa023b8fda8096caf41c20427a0ef396d88eb0f (diff) | |
download | op-kernel-dev-211baa7016894c02fc18693e21ca479cd08ac0c0.zip op-kernel-dev-211baa7016894c02fc18693e21ca479cd08ac0c0.tar.gz |
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>
Diffstat (limited to 'arch/arm/kernel/time.c')
-rw-r--r-- | arch/arm/kernel/time.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index f1e2eb1..3d76bf2 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c @@ -29,6 +29,7 @@ #include <asm/leds.h> #include <asm/thread_info.h> +#include <asm/sched_clock.h> #include <asm/stacktrace.h> #include <asm/mach/arch.h> #include <asm/mach/time.h> @@ -163,5 +164,8 @@ void __init time_init(void) { system_timer = machine_desc->timer; system_timer->init(); +#ifdef CONFIG_HAVE_SCHED_CLOCK + sched_clock_postinit(); +#endif } |