Prev: x86 efi: Fill all reserved memmap entries if add_efi_memmap specified.
Next: [BUG] Cannot boot any kernel after 2.6.27 if a 256 byte sector SCSI disk is attached
From: Jason Baron on 26 May 2010 14:40 On Wed, May 26, 2010 at 02:25:38PM +0200, Roman Fietze wrote: > Hello Jason, hello list, > > If I'm not wrong one could only enable any dynamic debugging flag > after a module had been completely loaded, using debugfs. This makes > it impossible to use dev_dbg or pr_debug e.g. inside the module init > function or any function called by it. > yes, that's correct. > My patch works by replacing _DPRINTK_FLAGS_DEFAULT after including all > kernel headers in my module source file and some small patch inside > dynamic_debug.c setting up the internal variables already when loading > a module with flags unequal to zero. This patch can of course be > optimized somewhat by reusing existing variables. > > Subject: [PATCH] dynamic_debug: allow to set dynamic debug flags right at module load time > > This allows to use e.g. pr_debug right from the beginning, e.g. in the > module init function. > > - the module must redefine _DPRINTK_FLAGS_DEFAULT, e.g. > > #undef _DPRINTK_FLAGS_DEFAULT > #define _DPRINTK_FLAGS_DEFAULT _DPRINTK_FLAGS_PRINT > > - when a module is loaded and the flags are not zero, the enabled > count and hash masks are enabled right away > it's a good idea, but i think we want this to be runtime configurable. That is, we probably want this implemented as a module parameter, not as a compile time thing. something like: modprobe module verbose=1 thanks, -Jason -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |