aboutsummaryrefslogtreecommitdiffstats
path: root/init/main.c
diff options
context:
space:
mode:
authorjohn stultz <johnstul@us.ibm.com>2006-07-03 03:24:04 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-03 18:26:58 -0400
commit88fecaa27f398d95db6c405a1908292c6f0bc3ef (patch)
tree0789e3b19fa5529229ad5b3936636973a383ca99 /init/main.c
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/main.c')
-rw-r--r--init/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/init/main.c b/init/main.c
index b2f3b566790e..c8960b9df623 100644
--- a/init/main.c
+++ b/init/main.c
@@ -496,8 +496,8 @@ asmlinkage void __init start_kernel(void)
496 init_timers(); 496 init_timers();
497 hrtimers_init(); 497 hrtimers_init();
498 softirq_init(); 498 softirq_init();
499 time_init();
500 timekeeping_init(); 499 timekeeping_init();
500 time_init();
501 501
502 /* 502 /*
503 * HACK ALERT! This is early. We're enabling the console before 503 * HACK ALERT! This is early. We're enabling the console before
@@ -508,6 +508,8 @@ asmlinkage void __init start_kernel(void)
508 if (panic_later) 508 if (panic_later)
509 panic(panic_later, panic_param); 509 panic(panic_later, panic_param);
510 profile_init(); 510 profile_init();
511 if (!irqs_disabled())
512 printk("start_kernel(): bug: interrupts were enabled early\n");
511 local_irq_enable(); 513 local_irq_enable();
512#ifdef CONFIG_BLK_DEV_INITRD 514#ifdef CONFIG_BLK_DEV_INITRD
513 if (initrd_start && !initrd_below_start_ok && 515 if (initrd_start && !initrd_below_start_ok &&