Commit:     c4a68306b9c0939b3facdad2cc5e34d660ff463a
Parent:     34f1ca540679f61a02b7406f036d9edde9717ee2
Author:     Ard van Breemen <[EMAIL PROTECTED]>
AuthorDate: Fri Jan 5 16:36:19 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Jan 5 23:55:21 2007 -0800

    [PATCH] start_kernel: test if irq's got enabled early, barf, and disable 
them again
    The calls made by parse_parms to other initialization code might enable
    interrupts again way too early.
    Having interrupts on this early can make systems PANIC when they initialize
    the IRQ controllers (which happens later in the code).  This patch detects
    that irq's are enabled again, barfs about it and disables them again as a
    safety net.
    [EMAIL PROTECTED]: cleanups]
    Signed-off-by: Ard van Breemen <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 init/main.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/init/main.c b/init/main.c
index 2b1cdaa..bc27d72 100644
--- a/init/main.c
+++ b/init/main.c
@@ -538,6 +538,11 @@ asmlinkage void __init start_kernel(void)
        parse_args("Booting kernel", command_line, __start___param,
                   __stop___param - __start___param,
+       if (!irqs_disabled()) {
+               printk(KERN_WARNING "start_kernel(): bug: interrupts were "
+                               "enabled *very* early, fixing it\n");
+               local_irq_disable();
+       }
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to