summaryrefslogtreecommitdiff
path: root/arch/alpha/include/asm/stacktrace.h
blob: f006d6f00fd09cf20463a36304e0e86259423955 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_ALPHA_STACKTRACE_H
#define _ASM_ALPHA_STACKTRACE_H

#include <linux/compiler_attributes.h>
#include <linux/types.h>

#include <asm/current.h>
#include <asm/processor.h>
#include <asm/thread_info.h>

static __always_inline bool on_thread_stack(void)
{
	unsigned long base = (unsigned long)current->stack;
	unsigned long sp = (unsigned long)current_stack_pointer;

	return !((base ^ sp) & ~(THREAD_SIZE - 1));
}

#endif /* _ASM_ALPHA_STACKTRACE_H */