aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-04-29 03:59:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:06:02 -0400
commit626adeb6675fdf60e9d8c6212776b0b0acf0e376 (patch)
treee526309273a2ee93c9e1546ce69c8c2cd5100606 /init
parent22caa0417db3b1d3dfafc9b7c0bf31baf8d667e7 (diff)
Simplify initcall_debug output
print_fn_descriptor_symbol() prints the address if we don't have a symbol, so no need to print both. Also, combine printing return value with elapsed time. Changes this: Calling initcall 0xc05b7a70: pci_mmcfg_late_insert_resources+0x0/0x50() initcall 0xc05b7a70: pci_mmcfg_late_insert_resources+0x0/0x50() returned 1. initcall 0xc05b7a70 ran for 0 msecs: pci_mmcfg_late_insert_resources+0x0/0x50() initcall at 0xc05b7a70: pci_mmcfg_late_insert_resources+0x0/0x50(): returned with error code 1 to this: calling pci_mmcfg_late_insert_resources+0x0/0x50() initcall pci_mmcfg_late_insert_resources+0x0/0x50() returned 1 after 0 msecs initcall pci_mmcfg_late_insert_resources+0x0/0x50() returned with error code 1 Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init')
-rw-r--r--init/main.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/init/main.c b/init/main.c
index 1687b0167c4a..1116d2f40cc1 100644
--- a/init/main.c
+++ b/init/main.c
@@ -700,10 +700,8 @@ static void __init do_initcalls(void)
700 int result; 700 int result;
701 701
702 if (initcall_debug) { 702 if (initcall_debug) {
703 printk("Calling initcall 0x%p", *call); 703 print_fn_descriptor_symbol("calling %s()\n",
704 print_fn_descriptor_symbol(": %s()",
705 (unsigned long) *call); 704 (unsigned long) *call);
706 printk("\n");
707 t0 = ktime_get(); 705 t0 = ktime_get();
708 } 706 }
709 707
@@ -713,15 +711,10 @@ static void __init do_initcalls(void)
713 t1 = ktime_get(); 711 t1 = ktime_get();
714 delta = ktime_sub(t1, t0); 712 delta = ktime_sub(t1, t0);
715 713
716 printk("initcall 0x%p", *call); 714 print_fn_descriptor_symbol("initcall %s()",
717 print_fn_descriptor_symbol(": %s()",
718 (unsigned long) *call); 715 (unsigned long) *call);
719 printk(" returned %d.\n", result); 716 printk(" returned %d after %Ld msecs\n", result,
720 717 (unsigned long long) delta.tv64 >> 20);
721 printk("initcall 0x%p ran for %Ld msecs: ",
722 *call, (unsigned long long)delta.tv64 >> 20);
723 print_fn_descriptor_symbol("%s()\n",
724 (unsigned long) *call);
725 } 718 }
726 719
727 if (result && result != -ENODEV && initcall_debug) { 720 if (result && result != -ENODEV && initcall_debug) {
@@ -737,10 +730,9 @@ static void __init do_initcalls(void)
737 local_irq_enable(); 730 local_irq_enable();
738 } 731 }
739 if (msg) { 732 if (msg) {
740 printk(KERN_WARNING "initcall at 0x%p", *call); 733 print_fn_descriptor_symbol(KERN_WARNING "initcall %s()",
741 print_fn_descriptor_symbol(": %s()",
742 (unsigned long) *call); 734 (unsigned long) *call);
743 printk(": returned with %s\n", msg); 735 printk(" returned with %s\n", msg);
744 } 736 }
745 } 737 }
746 738