mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
dynamic_debug: add an option to enable dynamic debug for modules only
Instead of enabling dynamic debug globally with CONFIG_DYNAMIC_DEBUG, CONFIG_DYNAMIC_DEBUG_CORE will only enable core function of dynamic debug. With the DYNAMIC_DEBUG_MODULE defined for any modules, dynamic debug will be tied to them. This is useful for people who only want to enable dynamic debug for kernel modules without worrying about kernel image size and memory consumption is increasing too much. [orson.zhai@unisoc.com: v2] Link: http://lkml.kernel.org/r/1587408228-10861-1-git-send-email-orson.unisoc@gmail.com Signed-off-by: Orson Zhai <orson.zhai@unisoc.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Petr Mladek <pmladek@suse.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Jason Baron <jbaron@akamai.com> Cc: Randy Dunlap <rdunlap@infradead.org> Link: http://lkml.kernel.org/r/1586521984-5890-1-git-send-email-orson.unisoc@gmail.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
e1eb26fa62
commit
ceabef7dd7
10 changed files with 46 additions and 14 deletions
|
@ -109,7 +109,8 @@ void _dev_info(const struct device *dev, const char *fmt, ...)
|
|||
#define dev_info(dev, fmt, ...) \
|
||||
_dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
|
||||
|
||||
#if defined(CONFIG_DYNAMIC_DEBUG)
|
||||
#if defined(CONFIG_DYNAMIC_DEBUG) || \
|
||||
(defined(CONFIG_DYNAMIC_DEBUG_CORE) && defined(DYNAMIC_DEBUG_MODULE))
|
||||
#define dev_dbg(dev, fmt, ...) \
|
||||
dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
|
||||
#elif defined(DEBUG)
|
||||
|
@ -181,7 +182,8 @@ do { \
|
|||
dev_level_ratelimited(dev_notice, dev, fmt, ##__VA_ARGS__)
|
||||
#define dev_info_ratelimited(dev, fmt, ...) \
|
||||
dev_level_ratelimited(dev_info, dev, fmt, ##__VA_ARGS__)
|
||||
#if defined(CONFIG_DYNAMIC_DEBUG)
|
||||
#if defined(CONFIG_DYNAMIC_DEBUG) || \
|
||||
(defined(CONFIG_DYNAMIC_DEBUG_CORE) && defined(DYNAMIC_DEBUG_MODULE))
|
||||
/* descriptor check is first to prevent flooding with "callbacks suppressed" */
|
||||
#define dev_dbg_ratelimited(dev, fmt, ...) \
|
||||
do { \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue