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>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user