aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--init/main.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/init/main.c b/init/main.c
index 63534a141b4e..26cd398acf2a 100644
--- a/init/main.c
+++ b/init/main.c
@@ -539,11 +539,8 @@ asmlinkage void __init start_kernel(void)
539 * fragile until we cpu_idle() for the first time. 539 * fragile until we cpu_idle() for the first time.
540 */ 540 */
541 preempt_disable(); 541 preempt_disable();
542 if (!irqs_disabled()) { 542 if (WARN(!irqs_disabled(), "Interrupts were enabled *very* early, fixing it\n"))
543 printk(KERN_WARNING "start_kernel(): bug: interrupts were "
544 "enabled *very* early, fixing it\n");
545 local_irq_disable(); 543 local_irq_disable();
546 }
547 idr_init_cache(); 544 idr_init_cache();
548 perf_event_init(); 545 perf_event_init();
549 rcu_init(); 546 rcu_init();
@@ -558,9 +555,7 @@ asmlinkage void __init start_kernel(void)
558 time_init(); 555 time_init();
559 profile_init(); 556 profile_init();
560 call_function_init(); 557 call_function_init();
561 if (!irqs_disabled()) 558 WARN(!irqs_disabled(), "Interrupts were enabled early\n");
562 printk(KERN_CRIT "start_kernel(): bug: interrupts were "
563 "enabled early\n");
564 early_boot_irqs_disabled = false; 559 early_boot_irqs_disabled = false;
565 local_irq_enable(); 560 local_irq_enable();
566 561
@@ -702,9 +697,7 @@ int __init_or_module do_one_initcall(initcall_t fn)
702 strlcat(msgbuf, "disabled interrupts ", sizeof(msgbuf)); 697 strlcat(msgbuf, "disabled interrupts ", sizeof(msgbuf));
703 local_irq_enable(); 698 local_irq_enable();
704 } 699 }
705 if (msgbuf[0]) { 700 WARN(msgbuf[0], "initcall %pF returned with %s\n", fn, msgbuf);
706 printk("initcall %pF returned with %s\n", fn, msgbuf);
707 }
708 701
709 return ret; 702 return ret;
710} 703}