diff options
Diffstat (limited to 'init/main.c')
-rw-r--r-- | init/main.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/init/main.c b/init/main.c index a87d4ca5c36c..f406fefa626c 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -602,6 +602,7 @@ asmlinkage void __init start_kernel(void) | |||
602 | softirq_init(); | 602 | softirq_init(); |
603 | timekeeping_init(); | 603 | timekeeping_init(); |
604 | time_init(); | 604 | time_init(); |
605 | sched_clock_init(); | ||
605 | profile_init(); | 606 | profile_init(); |
606 | if (!irqs_disabled()) | 607 | if (!irqs_disabled()) |
607 | printk("start_kernel(): bug: interrupts were enabled early\n"); | 608 | printk("start_kernel(): bug: interrupts were enabled early\n"); |
@@ -701,7 +702,6 @@ static void __init do_initcalls(void) | |||
701 | 702 | ||
702 | for (call = __initcall_start; call < __initcall_end; call++) { | 703 | for (call = __initcall_start; call < __initcall_end; call++) { |
703 | ktime_t t0, t1, delta; | 704 | ktime_t t0, t1, delta; |
704 | char *msg = NULL; | ||
705 | char msgbuf[40]; | 705 | char msgbuf[40]; |
706 | int result; | 706 | int result; |
707 | 707 | ||
@@ -723,22 +723,23 @@ static void __init do_initcalls(void) | |||
723 | (unsigned long long) delta.tv64 >> 20); | 723 | (unsigned long long) delta.tv64 >> 20); |
724 | } | 724 | } |
725 | 725 | ||
726 | if (result && result != -ENODEV && initcall_debug) { | 726 | msgbuf[0] = 0; |
727 | sprintf(msgbuf, "error code %d", result); | 727 | |
728 | msg = msgbuf; | 728 | if (result && result != -ENODEV && initcall_debug) |
729 | } | 729 | sprintf(msgbuf, "error code %d ", result); |
730 | |||
730 | if (preempt_count() != count) { | 731 | if (preempt_count() != count) { |
731 | msg = "preemption imbalance"; | 732 | strncat(msgbuf, "preemption imbalance ", sizeof(msgbuf)); |
732 | preempt_count() = count; | 733 | preempt_count() = count; |
733 | } | 734 | } |
734 | if (irqs_disabled()) { | 735 | if (irqs_disabled()) { |
735 | msg = "disabled interrupts"; | 736 | strncat(msgbuf, "disabled interrupts ", sizeof(msgbuf)); |
736 | local_irq_enable(); | 737 | local_irq_enable(); |
737 | } | 738 | } |
738 | if (msg) { | 739 | if (msgbuf[0]) { |
739 | print_fn_descriptor_symbol(KERN_WARNING "initcall %s()", | 740 | print_fn_descriptor_symbol(KERN_WARNING "initcall %s()", |
740 | (unsigned long) *call); | 741 | (unsigned long) *call); |
741 | printk(" returned with %s\n", msg); | 742 | printk(" returned with %s\n", msgbuf); |
742 | } | 743 | } |
743 | } | 744 | } |
744 | 745 | ||