1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
From fcee5d130a033495605cf1194e65b56634c2d1cf 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>
---
init/main.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 54 insertions(+), 0 deletions(-)
diff --git a/init/main.c b/init/main.c
index 6304bab..57af5bc 100644
--- a/init/main.c
+++ b/init/main.c
@@ -427,6 +427,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();
@@ -694,6 +696,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();
}
@@ -797,9 +802,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)
@@ -830,6 +837,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.
@@ -903,7 +913,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.0.4
|