projects/linux·blob uaccess-cleanups · refs

19 lines · 446 B

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
11void show_user_instructions(struct pt_regs *regs);
12
13static __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 */