summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDave Young <dyoung@redhat.com>2018-02-13 08:28:34 +0100
committerPetr Mladek <pmladek@suse.com>2018-03-15 13:25:36 +0100
commite36df28f532f882965404d58e240f2e058b61f45 (patch)
tree1fed8801f8f82a7a53e2c7005c03de8095f255bd /include
parentprint kdump kernel loaded status in stack dump (diff)
downloadlinux-e36df28f532f882965404d58e240f2e058b61f45.tar.xz
linux-e36df28f532f882965404d58e240f2e058b61f45.zip
printk: move dump stack related code to lib/dump_stack.c
dump_stack related stuff should belong to lib/dump_stack.c thus move them there. Also conditionally compile lib/dump_stack.c since dump_stack code does not make sense if printk is disabled. Link: http://lkml.kernel.org/r/20180213072834.GA24784@dhcp-128-65.nay.redhat.com To: Steven Rostedt <rostedt@goodmis.org> Cc: linux-kernel@vger.kernel.org Cc: akpm@linux-foundation.org Cc: Andi Kleen <ak@linux.intel.com> Signed-off-by: Dave Young <dyoung@redhat.com> Suggested-by: Steven Rostedt <rostedt@goodmis.org> Suggested-by: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: Petr Mladek <pmladek@suse.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/printk.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/printk.h b/include/linux/printk.h
index e9b603ee9953..6d7e800affd8 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -201,6 +201,7 @@ void __init setup_log_buf(int early);
__printf(1, 2) void dump_stack_set_arch_desc(const char *fmt, ...);
void dump_stack_print_info(const char *log_lvl);
void show_regs_print_info(const char *log_lvl);
+extern asmlinkage void dump_stack(void) __cold;
extern void printk_safe_init(void);
extern void printk_safe_flush(void);
extern void printk_safe_flush_on_panic(void);
@@ -264,6 +265,10 @@ static inline void show_regs_print_info(const char *log_lvl)
{
}
+static inline asmlinkage void dump_stack(void)
+{
+}
+
static inline void printk_safe_init(void)
{
}
@@ -279,8 +284,6 @@ static inline void printk_safe_flush_on_panic(void)
extern int kptr_restrict;
-extern asmlinkage void dump_stack(void) __cold;
-
#ifndef pr_fmt
#define pr_fmt(fmt) fmt
#endif