diff options
Diffstat (limited to 'arch/powerpc/include/asm/stacktrace.h')
| -rw-r--r-- | arch/powerpc/include/asm/stacktrace.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/stacktrace.h b/arch/powerpc/include/asm/stacktrace.h new file mode 100644 index 000000000..987f2e996 --- /dev/null +++ b/arch/powerpc/include/asm/stacktrace.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Stack trace functions. + * + * Copyright 2018, Murilo Opsfelder Araujo, IBM Corporation. + */ + +#ifndef _ASM_POWERPC_STACKTRACE_H +#define _ASM_POWERPC_STACKTRACE_H + +void show_user_instructions(struct pt_regs *regs); + +static __always_inline bool on_thread_stack(void) +{ + return !(((unsigned long)(current->stack) ^ current_stack_pointer) + & ~(THREAD_SIZE - 1)); +} + +#endif /* _ASM_POWERPC_STACKTRACE_H */ |
