diff options
Diffstat (limited to 'init/main.c')
-rw-r--r-- | init/main.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/init/main.c b/init/main.c index 2714e0e7cfec..006dcd547dc2 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -306,8 +306,6 @@ static int __init rdinit_setup(char *str) | |||
306 | } | 306 | } |
307 | __setup("rdinit=", rdinit_setup); | 307 | __setup("rdinit=", rdinit_setup); |
308 | 308 | ||
309 | extern void setup_arch(char **); | ||
310 | |||
311 | #ifndef CONFIG_SMP | 309 | #ifndef CONFIG_SMP |
312 | 310 | ||
313 | #ifdef CONFIG_X86_LOCAL_APIC | 311 | #ifdef CONFIG_X86_LOCAL_APIC |
@@ -571,17 +569,23 @@ static void __init do_initcalls(void) | |||
571 | int count = preempt_count(); | 569 | int count = preempt_count(); |
572 | 570 | ||
573 | for (call = __initcall_start; call < __initcall_end; call++) { | 571 | for (call = __initcall_start; call < __initcall_end; call++) { |
574 | char *msg; | 572 | char *msg = NULL; |
573 | char msgbuf[40]; | ||
574 | int result; | ||
575 | 575 | ||
576 | if (initcall_debug) { | 576 | if (initcall_debug) { |
577 | printk(KERN_DEBUG "Calling initcall 0x%p", *call); | 577 | printk("Calling initcall 0x%p", *call); |
578 | print_fn_descriptor_symbol(": %s()", (unsigned long) *call); | 578 | print_fn_descriptor_symbol(": %s()", |
579 | (unsigned long) *call); | ||
579 | printk("\n"); | 580 | printk("\n"); |
580 | } | 581 | } |
581 | 582 | ||
582 | (*call)(); | 583 | result = (*call)(); |
583 | 584 | ||
584 | msg = NULL; | 585 | if (result && (result != -ENODEV || initcall_debug)) { |
586 | sprintf(msgbuf, "error code %d", result); | ||
587 | msg = msgbuf; | ||
588 | } | ||
585 | if (preempt_count() != count) { | 589 | if (preempt_count() != count) { |
586 | msg = "preemption imbalance"; | 590 | msg = "preemption imbalance"; |
587 | preempt_count() = count; | 591 | preempt_count() = count; |
@@ -591,8 +595,10 @@ static void __init do_initcalls(void) | |||
591 | local_irq_enable(); | 595 | local_irq_enable(); |
592 | } | 596 | } |
593 | if (msg) { | 597 | if (msg) { |
594 | printk(KERN_WARNING "error in initcall at 0x%p: " | 598 | printk(KERN_WARNING "initcall at 0x%p", *call); |
595 | "returned with %s\n", *call, msg); | 599 | print_fn_descriptor_symbol(": %s()", |
600 | (unsigned long) *call); | ||
601 | printk(": returned with %s\n", msg); | ||
596 | } | 602 | } |
597 | } | 603 | } |
598 | 604 | ||