aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorjohn stultz <johnstul@us.ibm.com>2006-07-03 00:24:04 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-03 15:26:58 -0700
commit88fecaa27f398d95db6c405a1908292c6f0bc3ef (patch)
tree0789e3b19fa5529229ad5b3936636973a383ca99 /init
parent29454dde27d8e340bb1987bad9aa504af7081eba (diff)
[PATCH] time initialisation fix
We're not reay to take a timer interrupt until timekeeping_init() has run. But time_init() will start the time interrupt and if it is called with local interrupts enabled we'll immediately take an interrupt and die. Fix that by running timekeeping_init() prior to time_init(). We don't know _why_ local interrupts got enabled on Jesse Brandeburg's machine. That's a separate as-yet-unsolved problem. THe patch adds a little bit of debugging to detect that. This whole requirement that local interrupts be held off during early boot keeps on biting us. Signed-off-by: John Stultz <johnstul@us.ibm.com> Cc: Jesse Brandeburg <jesse.brandeburg@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'init')
-rw-r--r--init/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/init/main.c b/init/main.c
index b2f3b566790..c8960b9df62 100644
--- a/init/main.c
+++ b/init/main.c
@@ -496,8 +496,8 @@ asmlinkage void __init start_kernel(void)
init_timers();
hrtimers_init();
softirq_init();
- time_init();
timekeeping_init();
+ time_init();
/*
* HACK ALERT! This is early. We're enabling the console before
@@ -508,6 +508,8 @@ asmlinkage void __init start_kernel(void)
if (panic_later)
panic(panic_later, panic_param);
profile_init();
+ if (!irqs_disabled())
+ printk("start_kernel(): bug: interrupts were enabled early\n");
local_irq_enable();
#ifdef CONFIG_BLK_DEV_INITRD
if (initrd_start && !initrd_below_start_ok &&