aboutsummaryrefslogtreecommitdiffstats
path: root/init/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/main.c')
-rw-r--r--init/main.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c
index 949c27b59d12..c1537e0ddceb 100644
--- a/init/main.c
+++ b/init/main.c
@@ -648,6 +648,7 @@ static void __init do_initcalls(void)
648 int count = preempt_count(); 648 int count = preempt_count();
649 649
650 for (call = __initcall_start; call < __initcall_end; call++) { 650 for (call = __initcall_start; call < __initcall_end; call++) {
651 ktime_t t0, t1, delta;
651 char *msg = NULL; 652 char *msg = NULL;
652 char msgbuf[40]; 653 char msgbuf[40];
653 int result; 654 int result;
@@ -657,10 +658,26 @@ static void __init do_initcalls(void)
657 print_fn_descriptor_symbol(": %s()", 658 print_fn_descriptor_symbol(": %s()",
658 (unsigned long) *call); 659 (unsigned long) *call);
659 printk("\n"); 660 printk("\n");
661 t0 = ktime_get();
660 } 662 }
661 663
662 result = (*call)(); 664 result = (*call)();
663 665
666 if (initcall_debug) {
667 t1 = ktime_get();
668 delta = ktime_sub(t1, t0);
669
670 printk("initcall 0x%p", *call);
671 print_fn_descriptor_symbol(": %s()",
672 (unsigned long) *call);
673 printk(" returned %d.\n", result);
674
675 printk("initcall 0x%p ran for %Ld msecs: ",
676 *call, (unsigned long long)delta.tv64 >> 20);
677 print_fn_descriptor_symbol("%s()\n",
678 (unsigned long) *call);
679 }
680
664 if (result && result != -ENODEV && initcall_debug) { 681 if (result && result != -ENODEV && initcall_debug) {
665 sprintf(msgbuf, "error code %d", result); 682 sprintf(msgbuf, "error code %d", result);
666 msg = msgbuf; 683 msg = msgbuf;