Note, echoing 1 into this file without the
                        tracepoint_printk kernel cmdline option has no effect.
 
+                       The tp_printk_stop_on_boot (see below) can also be used
+                       to stop the printing of events to console at
+                       late_initcall_sync.
+
                        ** CAUTION **
 
                        Having tracepoints sent to printk() and activating high
                        frequency tracepoints such as irq or sched, can cause
                        the system to live lock.
 
+       tp_printk_stop_on_boot[FTRACE]
+                       When tp_printk (above) is set, it can cause a lot of noise
+                       on the console. It may be useful to only include the
+                       printing of events during boot up, as user space may
+                       make the system inoperable.
+
+                       This command line option will stop the printing of events
+                       to console at the late_initcall_sync() time frame.
+
        traceoff_on_warning
                        [FTRACE] enable this option to disable tracing when a
                        warning is hit. This turns off "tracing_on". Tracing can
 
 /* Pipe tracepoints to printk */
 struct trace_iterator *tracepoint_print_iter;
 int tracepoint_printk;
+static bool tracepoint_printk_stop_on_boot __initdata;
 static DEFINE_STATIC_KEY_FALSE(tracepoint_printk_key);
 
 /* For tracers that don't implement custom flags */
 }
 __setup("tp_printk", set_tracepoint_printk);
 
+static int __init set_tracepoint_printk_stop(char *str)
+{
+       tracepoint_printk_stop_on_boot = true;
+       return 1;
+}
+__setup("tp_printk_stop_on_boot", set_tracepoint_printk_stop);
+
 unsigned long long ns2usecs(u64 nsec)
 {
        nsec += 500;
        return 0;
 }
 
+fs_initcall(tracer_init_tracefs);
+
 static int trace_panic_handler(struct notifier_block *this,
                               unsigned long event, void *unused)
 {
        trace_event_init();
 }
 
-__init static int clear_boot_tracer(void)
+__init static void clear_boot_tracer(void)
 {
        /*
         * The default tracer at boot buffer is an init section.
         * about to be freed.
         */
        if (!default_bootup_tracer)
-               return 0;
+               return;
 
        printk(KERN_INFO "ftrace bootup tracer '%s' not registered.\n",
               default_bootup_tracer);
        default_bootup_tracer = NULL;
-
-       return 0;
 }
 
-fs_initcall(tracer_init_tracefs);
-late_initcall_sync(clear_boot_tracer);
-
 #ifdef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
-__init static int tracing_set_default_clock(void)
+__init static void tracing_set_default_clock(void)
 {
        /* sched_clock_stable() is determined in late_initcall */
        if (!trace_boot_clock && !sched_clock_stable()) {
                if (security_locked_down(LOCKDOWN_TRACEFS)) {
                        pr_warn("Can not set tracing clock due to lockdown\n");
-                       return -EPERM;
+                       return;
                }
 
                printk(KERN_WARNING
                       "on the kernel command line\n");
                tracing_set_clock(&global_trace, "global");
        }
+}
+#else
+static inline void tracing_set_default_clock(void) { }
+#endif
 
+__init static int late_trace_init(void)
+{
+       if (tracepoint_printk && tracepoint_printk_stop_on_boot) {
+               static_key_disable(&tracepoint_printk_key.key);
+               tracepoint_printk = 0;
+       }
+
+       tracing_set_default_clock();
+       clear_boot_tracer();
        return 0;
 }
-late_initcall_sync(tracing_set_default_clock);
-#endif
+
+late_initcall_sync(late_trace_init);