[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1331766126-11674-2-git-send-email-jim.cromie@gmail.com>
Date: Wed, 14 Mar 2012 17:01:56 -0600
From: jim.cromie@...il.com
To: jbaron@...hat.com, rusty@...tcorp.com.au
Cc: linux-kernel@...r.kernel.org, Jim Cromie <jim.cromie@...il.com>
Subject: [PATCH 01/11] init: trivial tweaks to initcall_levels
From: Jim Cromie <jim.cromie@...il.com>
add a pr_info to print current level and level_name of initcall,
and number of registered initcalls at that level. This adds 7
lines to dmesg output, like:
initlevel:6=device, 172 registered initcalls
Drop "parameters" from initcall_level_names[], it can be added
back in the printk where it clarifies things.
Signed-off-by: Jim Cromie <jim.cromie@...il.com>
---
init/main.c | 25 +++++++++++++++----------
1 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/init/main.c b/init/main.c
index d595751..deee88f 100644
--- a/init/main.c
+++ b/init/main.c
@@ -723,14 +723,14 @@ static initcall_t *initcall_levels[] __initdata = {
};
static char *initcall_level_names[] __initdata = {
- "early parameters",
- "core parameters",
- "postcore parameters",
- "arch parameters",
- "subsys parameters",
- "fs parameters",
- "device parameters",
- "late parameters",
+ "early",
+ "core",
+ "postcore",
+ "arch",
+ "subsys",
+ "fs",
+ "device",
+ "late",
};
static int __init ignore_unknown_bootoption(char *param, char *val)
@@ -748,7 +748,7 @@ static void __init do_initcall_level(int level)
static_command_line, __start___param,
__stop___param - __start___param,
level, level,
- ignore_unknown_bootoption);
+ &ignore_unknown_bootoption);
for (fn = initcall_levels[level]; fn < initcall_levels[level+1]; fn++)
do_one_initcall(*fn);
@@ -758,8 +758,13 @@ static void __init do_initcalls(void)
{
int level;
- for (level = 0; level < ARRAY_SIZE(initcall_levels) - 1; level++)
+ for (level = 0; level < ARRAY_SIZE(initcall_levels) - 1; level++) {
+ pr_info("initlevel:%d=%s, %d registered initcalls\n",
+ level, initcall_level_names[level],
+ (int) (initcall_levels[level+1]
+ - initcall_levels[level]));
do_initcall_level(level);
+ }
}
/*
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists