xref: /linux/arch/powerpc/include/asm/stacktrace.h (revision c98d767b34574be82b74d77d02264a830ae1cadd)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Stack trace functions.
4  *
5  * Copyright 2018, Murilo Opsfelder Araujo, IBM Corporation.
6  */
7 
8 #ifndef _ASM_POWERPC_STACKTRACE_H
9 #define _ASM_POWERPC_STACKTRACE_H
10 
11 void show_user_instructions(struct pt_regs *regs);
12 
13 static __always_inline bool on_thread_stack(void)
14 {
15 	return !(((unsigned long)(current->stack) ^ current_stack_pointer)
16 			& ~(THREAD_SIZE - 1));
17 }
18 
19 #endif /* _ASM_POWERPC_STACKTRACE_H */
20