提交 3ec5652a 编写于 作者: J Jim Cromie 提交者: Greg Kroah-Hartman

dynamic_debug: init with early_initcall, not arch_initcall

1- Call dynamic_debug_init() from early_initcall, not arch_initcall.
2- Call dynamic_debug_init_debugfs() from fs_initcall, not module_init.

RFC: This works for me on a 64 bit desktop and a i586 SBC, but is
untested on other arches.  I presume there is or was a reason
original code used arch_initcall, maybe the constraints have changed.

This makes facility available as soon as possible.

2nd change has a downside when dynamic_debug.verbose=1; all the
vpr_info()s called in the proc-fs code are activated, causing
voluminous output from dmesg.  TBD: Im unsure of this explanation, but
the output is there.  This could be fixed by changing those callsites
to v2pr_info(if verbose > 1).

1st change is still not early enough to enable pr_debugs in
kernel/params, so parsing of boot-args isnt logged.  The reparse of
those args is however visible after params.dyndbg="+p" is processed.
Signed-off-by: NJim Cromie <jim.cromie@gmail.com>
Acked-by: NJason Baron <jbaron@redhat.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 29e36c9f
......@@ -1042,7 +1042,7 @@ static int __init dynamic_debug_init(void)
return 0;
}
/* Allow early initialization for boot messages via boot param */
arch_initcall(dynamic_debug_init);
early_initcall(dynamic_debug_init);
/* Debugfs setup must be done later */
module_init(dynamic_debug_init_debugfs);
fs_initcall(dynamic_debug_init_debugfs);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册