Skip to content
  • Prarit Bhargava's avatar
    init/main.c: add initcall_blacklist kernel parameter · 7b0b73d7
    Prarit Bhargava authored
    
    
    When a module is built into the kernel the module_init() function
    becomes an initcall.  Sometimes debugging through dynamic debug can
    help, however, debugging built in kernel modules is typically done by
    changing the .config, recompiling, and booting the new kernel in an
    effort to determine exactly which module caused a problem.
    
    This patchset can be useful stand-alone or combined with initcall_debug.
    There are cases where some initcalls can hang the machine before the
    console can be flushed, which can make initcall_debug output inaccurate.
    Having the ability to skip initcalls can help further debugging of these
    scenarios.
    
    Usage: initcall_blacklist=<list of comma separated initcalls>
    
    ex) added "initcall_blacklist=sgi_uv_sysfs_init" as a kernel parameter and
    the log contains:
    
    	blacklisting initcall sgi_uv_sysfs_init
    	...
    	...
    	initcall sgi_uv_sysfs_init blacklisted
    
    ex) added "initcall_blacklist=foo_bar,sgi_uv_sysfs_init" as a kernel parameter
    and the log contains:
    
    	blacklisting initcall foo_bar
    	blacklisting initcall sgi_uv_sysfs_init
    	...
    	...
    	initcall sgi_uv_sysfs_init blacklisted
    
    [akpm@linux-foundation.org: tweak printk text]
    Signed-off-by: default avatarPrarit Bhargava <prarit@redhat.com>
    Cc: Richard Weinberger <richard.weinberger@gmail.com>
    Cc: Andi Kleen <andi@firstfloor.org>
    Cc: Josh Boyer <jwboyer@fedoraproject.org>
    Cc: Rob Landley <rob@landley.net>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    7b0b73d7