Commit 8cdfdf7f authored by Ard Biesheuvel's avatar Ard Biesheuvel

ARM: export dump_mem() to other objects

The unwind info based stack unwinder will make its own call to
dump_mem() to dump the exception stack, so give it external linkage.
Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Tested-by: default avatarKeith Packard <keithpac@amazon.com>
Tested-by: default avatarMarc Zyngier <maz@kernel.org>
Tested-by: Vladimir Murzin <vladimir.murzin@arm.com> # ARMv7M
parent b6506981
...@@ -36,5 +36,7 @@ void arm_get_current_stackframe(struct pt_regs *regs, struct stackframe *frame) ...@@ -36,5 +36,7 @@ void arm_get_current_stackframe(struct pt_regs *regs, struct stackframe *frame)
extern int unwind_frame(struct stackframe *frame); extern int unwind_frame(struct stackframe *frame);
extern void walk_stackframe(struct stackframe *frame, extern void walk_stackframe(struct stackframe *frame,
int (*fn)(struct stackframe *, void *), void *data); int (*fn)(struct stackframe *, void *), void *data);
extern void dump_mem(const char *lvl, const char *str, unsigned long bottom,
unsigned long top);
#endif /* __ASM_STACKTRACE_H */ #endif /* __ASM_STACKTRACE_H */
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/unwind.h> #include <asm/unwind.h>
#include <asm/tls.h> #include <asm/tls.h>
#include <asm/stacktrace.h>
#include <asm/system_misc.h> #include <asm/system_misc.h>
#include <asm/opcodes.h> #include <asm/opcodes.h>
...@@ -60,8 +61,6 @@ static int __init user_debug_setup(char *str) ...@@ -60,8 +61,6 @@ static int __init user_debug_setup(char *str)
__setup("user_debug=", user_debug_setup); __setup("user_debug=", user_debug_setup);
#endif #endif
static void dump_mem(const char *, const char *, unsigned long, unsigned long);
void dump_backtrace_entry(unsigned long where, unsigned long from, void dump_backtrace_entry(unsigned long where, unsigned long from,
unsigned long frame, const char *loglvl) unsigned long frame, const char *loglvl)
{ {
...@@ -118,8 +117,8 @@ static int verify_stack(unsigned long sp) ...@@ -118,8 +117,8 @@ static int verify_stack(unsigned long sp)
/* /*
* Dump out the contents of some memory nicely... * Dump out the contents of some memory nicely...
*/ */
static void dump_mem(const char *lvl, const char *str, unsigned long bottom, void dump_mem(const char *lvl, const char *str, unsigned long bottom,
unsigned long top) unsigned long top)
{ {
unsigned long first; unsigned long first;
int i; int i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment