| From f19969c6550ffc869cd6f8577ab5c459ae742ae6 Mon Sep 17 00:00:00 2001 |
| From: Ingo Molnar <mingo@elte.hu> |
| Date: Fri, 3 Jul 2009 08:30:13 -0500 |
| Subject: [PATCH] init: show enabled debugs |
| |
| commit d0cd6d95886e800ac64e1467b6ec262a7d8782fd in tip. |
| |
| Signed-off-by: Ingo Molnar <mingo@elte.hu> |
| Signed-off-by: Thomas Gleixner <tglx@linutronix.de> |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| |
| diff --git a/init/main.c b/init/main.c |
| index 650c1ce..2a09cb6 100644 |
| --- a/init/main.c |
| +++ b/init/main.c |
| @@ -413,6 +413,8 @@ static noinline void __init_refok rest_init(void) |
| { |
| int pid; |
| |
| + system_state = SYSTEM_BOOTING_SCHEDULER_OK; |
| + |
| rcu_scheduler_starting(); |
| kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND); |
| numa_default_policy(); |
| @@ -678,6 +680,9 @@ asmlinkage void __init start_kernel(void) |
| |
| ftrace_init(); |
| |
| +#ifdef CONFIG_PREEMPT_RT |
| + WARN_ON(irqs_disabled()); |
| +#endif |
| /* Do the rest non-__init'ed, we're now alive */ |
| rest_init(); |
| } |
| @@ -781,9 +786,11 @@ static void __init do_basic_setup(void) |
| static void __init do_pre_smp_initcalls(void) |
| { |
| initcall_t *fn; |
| + extern int spawn_desched_task(void); |
| |
| for (fn = __initcall_start; fn < __early_initcall_end; fn++) |
| do_one_initcall(*fn); |
| + spawn_desched_task(); |
| } |
| |
| static void run_init_process(char *init_filename) |
| @@ -819,6 +826,9 @@ static noinline int init_post(void) |
| printk(KERN_WARNING "Failed to execute %s\n", |
| ramdisk_execute_command); |
| } |
| +#ifdef CONFIG_PREEMPT_RT |
| + WARN_ON(irqs_disabled()); |
| +#endif |
| |
| /* |
| * We try each of these until one succeeds. |
| @@ -885,7 +895,51 @@ static int __init kernel_init(void * unused) |
| ramdisk_execute_command = NULL; |
| prepare_namespace(); |
| } |
| +#ifdef CONFIG_PREEMPT_RT |
| + WARN_ON(irqs_disabled()); |
| +#endif |
| + |
| +#define DEBUG_COUNT (defined(CONFIG_DEBUG_RT_MUTEXES) + defined(CONFIG_CRITICAL_PREEMPT_TIMING) + defined(CONFIG_CRITICAL_IRQSOFF_TIMING) + defined(CONFIG_FUNCTION_TRACE) + defined(CONFIG_DEBUG_SLAB) + defined(CONFIG_DEBUG_PAGEALLOC) + defined(CONFIG_LOCKDEP)) |
| |
| +#if DEBUG_COUNT > 0 |
| + printk(KERN_ERR "*****************************************************************************\n"); |
| + printk(KERN_ERR "* *\n"); |
| +#if DEBUG_COUNT == 1 |
| + printk(KERN_ERR "* REMINDER, the following debugging option is turned on in your .config: *\n"); |
| +#else |
| + printk(KERN_ERR "* REMINDER, the following debugging options are turned on in your .config: *\n"); |
| +#endif |
| + printk(KERN_ERR "* *\n"); |
| +#ifdef CONFIG_DEBUG_RT_MUTEXES |
| + printk(KERN_ERR "* CONFIG_DEBUG_RT_MUTEXES *\n"); |
| +#endif |
| +#ifdef CONFIG_CRITICAL_PREEMPT_TIMING |
| + printk(KERN_ERR "* CONFIG_CRITICAL_PREEMPT_TIMING *\n"); |
| +#endif |
| +#ifdef CONFIG_CRITICAL_IRQSOFF_TIMING |
| + printk(KERN_ERR "* CONFIG_CRITICAL_IRQSOFF_TIMING *\n"); |
| +#endif |
| +#ifdef CONFIG_FUNCTION_TRACE |
| + printk(KERN_ERR "* CONFIG_FUNCTION_TRACE *\n"); |
| +#endif |
| +#ifdef CONFIG_DEBUG_SLAB |
| + printk(KERN_ERR "* CONFIG_DEBUG_SLAB *\n"); |
| +#endif |
| +#ifdef CONFIG_DEBUG_PAGEALLOC |
| + printk(KERN_ERR "* CONFIG_DEBUG_PAGEALLOC *\n"); |
| +#endif |
| +#ifdef CONFIG_LOCKDEP |
| + printk(KERN_ERR "* CONFIG_LOCKDEP *\n"); |
| +#endif |
| + printk(KERN_ERR "* *\n"); |
| +#if DEBUG_COUNT == 1 |
| + printk(KERN_ERR "* it may increase runtime overhead and latencies. *\n"); |
| +#else |
| + printk(KERN_ERR "* they may increase runtime overhead and latencies. *\n"); |
| +#endif |
| + printk(KERN_ERR "* *\n"); |
| + printk(KERN_ERR "*****************************************************************************\n"); |
| +#endif |
| /* |
| * Ok, we have completed the initial bootup, and |
| * we're essentially up and running. Get rid of the |
| -- |
| 1.7.1.1 |
| |