aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig8
-rw-r--r--init/main.c36
2 files changed, 29 insertions, 15 deletions
diff --git a/init/Kconfig b/init/Kconfig
index f763762d544a..8a63c404ef44 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -588,6 +588,13 @@ config KALLSYMS_ALL
588 588
589 Say N. 589 Say N.
590 590
591config KALLSYMS_STRIP_GENERATED
592 bool "Strip machine generated symbols from kallsyms"
593 depends on KALLSYMS_ALL
594 default y
595 help
596 Say N if you want kallsyms to retain even machine generated symbols.
597
591config KALLSYMS_EXTRA_PASS 598config KALLSYMS_EXTRA_PASS
592 bool "Do an extra kallsyms pass" 599 bool "Do an extra kallsyms pass"
593 depends on KALLSYMS 600 depends on KALLSYMS
@@ -808,6 +815,7 @@ config TRACEPOINTS
808 815
809config MARKERS 816config MARKERS
810 bool "Activate markers" 817 bool "Activate markers"
818 depends on TRACEPOINTS
811 help 819 help
812 Place an empty function call at each marker site. Can be 820 Place an empty function call at each marker site. Can be
813 dynamically changed for a probe function. 821 dynamically changed for a probe function.
diff --git a/init/main.c b/init/main.c
index be1fe2242a55..9711586aa7c9 100644
--- a/init/main.c
+++ b/init/main.c
@@ -63,6 +63,7 @@
63#include <linux/signal.h> 63#include <linux/signal.h>
64#include <linux/idr.h> 64#include <linux/idr.h>
65#include <linux/ftrace.h> 65#include <linux/ftrace.h>
66#include <trace/boot.h>
66 67
67#include <asm/io.h> 68#include <asm/io.h>
68#include <asm/bugs.h> 69#include <asm/bugs.h>
@@ -671,6 +672,7 @@ asmlinkage void __init start_kernel(void)
671 efi_enter_virtual_mode(); 672 efi_enter_virtual_mode();
672#endif 673#endif
673 thread_info_cache_init(); 674 thread_info_cache_init();
675 cred_init();
674 fork_init(num_physpages); 676 fork_init(num_physpages);
675 proc_caches_init(); 677 proc_caches_init();
676 buffer_init(); 678 buffer_init();
@@ -705,31 +707,35 @@ core_param(initcall_debug, initcall_debug, bool, 0644);
705int do_one_initcall(initcall_t fn) 707int do_one_initcall(initcall_t fn)
706{ 708{
707 int count = preempt_count(); 709 int count = preempt_count();
708 ktime_t delta; 710 ktime_t calltime, delta, rettime;
709 char msgbuf[64]; 711 char msgbuf[64];
710 struct boot_trace it; 712 struct boot_trace_call call;
713 struct boot_trace_ret ret;
711 714
712 if (initcall_debug) { 715 if (initcall_debug) {
713 it.caller = task_pid_nr(current); 716 call.caller = task_pid_nr(current);
714 printk("calling %pF @ %i\n", fn, it.caller); 717 printk("calling %pF @ %i\n", fn, call.caller);
715 it.calltime = ktime_get(); 718 calltime = ktime_get();
719 trace_boot_call(&call, fn);
720 enable_boot_trace();
716 } 721 }
717 722
718 it.result = fn(); 723 ret.result = fn();
719 724
720 if (initcall_debug) { 725 if (initcall_debug) {
721 it.rettime = ktime_get(); 726 disable_boot_trace();
722 delta = ktime_sub(it.rettime, it.calltime); 727 rettime = ktime_get();
723 it.duration = (unsigned long long) delta.tv64 >> 10; 728 delta = ktime_sub(rettime, calltime);
729 ret.duration = (unsigned long long) ktime_to_ns(delta) >> 10;
730 trace_boot_ret(&ret, fn);
724 printk("initcall %pF returned %d after %Ld usecs\n", fn, 731 printk("initcall %pF returned %d after %Ld usecs\n", fn,
725 it.result, it.duration); 732 ret.result, ret.duration);
726 trace_boot(&it, fn);
727 } 733 }
728 734
729 msgbuf[0] = 0; 735 msgbuf[0] = 0;
730 736
731 if (it.result && it.result != -ENODEV && initcall_debug) 737 if (ret.result && ret.result != -ENODEV && initcall_debug)
732 sprintf(msgbuf, "error code %d ", it.result); 738 sprintf(msgbuf, "error code %d ", ret.result);
733 739
734 if (preempt_count() != count) { 740 if (preempt_count() != count) {
735 strlcat(msgbuf, "preemption imbalance ", sizeof(msgbuf)); 741 strlcat(msgbuf, "preemption imbalance ", sizeof(msgbuf));
@@ -743,7 +749,7 @@ int do_one_initcall(initcall_t fn)
743 printk("initcall %pF returned with %s\n", fn, msgbuf); 749 printk("initcall %pF returned with %s\n", fn, msgbuf);
744 } 750 }
745 751
746 return it.result; 752 return ret.result;
747} 753}
748 754
749 755
@@ -884,7 +890,7 @@ static int __init kernel_init(void * unused)
884 * we're essentially up and running. Get rid of the 890 * we're essentially up and running. Get rid of the
885 * initmem segments and start the user-mode stuff.. 891 * initmem segments and start the user-mode stuff..
886 */ 892 */
887 stop_boot_trace(); 893
888 init_post(); 894 init_post();
889 return 0; 895 return 0;
890} 896}