summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/stacktrace.h
blob: 987f2e996262f98574f7a250d5e5abf6e3f7658b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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 */