Re: 2.6.17-mm4
From: john stultz
Date: Sat Jul 01 2006 - 13:54:49 EST
On Sat, 2006-07-01 at 10:33 -0700, Jesse Brandeburg wrote:
> On 6/30/06, john stultz <johnstul@xxxxxxxxxx> wrote:
> > > <IRQ> [<ffffffff8100d442>] main_timer_handler+0x1ed/0x3ad
> > > [<ffffffff8100d614>] timer_interrupt+0x12/0x27
> > > [<ffffffff8105076a>] handle_IRQ_event+0x29/0x5a
> > > [<ffffffff81050837>] __do_IRQ+0x9c/0xfd
> > > [<ffffffff8100bf27>] do_IRQ+0x63/0x71
> > > [<ffffffff810098b8>] ret_from_intr+0x0/0xa
> > > <EOI>
> >
> > Hmmm. From that trace I suspect something is enabling interrupts (likely
> > in time_init) before timekeeping_init() has chosen the clocksource.
> >
> > Does the following workaround the issue?
> >
> > thanks
> > -john
> >
> > diff --git a/init/main.c b/init/main.c
> > index ae04eb7..41adc97 100644
> > --- a/init/main.c
> > +++ b/init/main.c
> > @@ -497,8 +497,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
> >
>
> Yes it works, the previously failing bisect kernel boots with this
> change. I'll take a look through andrew's suggestions next.
Great! Thanks for the testing!
Andrew: While clearly there is the deeper issue of why interrupts are
enabled before they should be, I may still like to push the two-liner
above, since its a bit safer should someone accidentally enable
interrupts early again. Looking back in my patch history it was
previously in the order above until I switched it (I suspect
accidentally) in the C0 rework.
I also added a warning message so we can still detect the problem w/o
hanging.
Does the patch below look reasonable?
thanks
-john
Signed-off-by: John Stultz <johnstul@xxxxxxxxxx>
diff --git a/init/main.c b/init/main.c
index b2f3b56..2984d16 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("WARNING: Interrupts were enabled early.\n");
local_irq_enable();
#ifdef CONFIG_BLK_DEV_INITRD
if (initrd_start && !initrd_below_start_ok &&
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/