drm/panthor: Don't add write fences to the shared BOs
[drm/drm-misc.git] / arch / riscv / include / asm / stacktrace.h
blobb1495a7e06ce693b4fc698ee4d62549bd0614700
1 /* SPDX-License-Identifier: GPL-2.0 */
3 #ifndef _ASM_RISCV_STACKTRACE_H
4 #define _ASM_RISCV_STACKTRACE_H
6 #include <linux/sched.h>
7 #include <asm/ptrace.h>
9 struct stackframe {
10 unsigned long fp;
11 unsigned long ra;
14 extern void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs,
15 bool (*fn)(void *, unsigned long), void *arg);
16 extern void dump_backtrace(struct pt_regs *regs, struct task_struct *task,
17 const char *loglvl);
19 static inline bool on_thread_stack(void)
21 return !(((unsigned long)(current->stack) ^ current_stack_pointer) & ~(THREAD_SIZE - 1));
25 #ifdef CONFIG_VMAP_STACK
26 DECLARE_PER_CPU(unsigned long [OVERFLOW_STACK_SIZE/sizeof(long)], overflow_stack);
27 #endif /* CONFIG_VMAP_STACK */
29 #endif /* _ASM_RISCV_STACKTRACE_H */