drm/ast: Only warn about unsupported TX chips on Gen4 and later
[drm/drm-misc.git] / include / linux / ftrace_regs.h
blobbe1ed0c891d077eee85363d5c8b40a0fda705f19
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_FTRACE_REGS_H
3 #define _LINUX_FTRACE_REGS_H
5 /*
6 * For archs that just copy pt_regs in ftrace regs, it can use this default.
7 * If an architecture does not use pt_regs, it must define all the below
8 * accessor functions.
9 */
10 #ifndef HAVE_ARCH_FTRACE_REGS
11 struct __arch_ftrace_regs {
12 struct pt_regs regs;
15 #define arch_ftrace_regs(fregs) ((struct __arch_ftrace_regs *)(fregs))
17 struct ftrace_regs;
19 #define ftrace_regs_get_instruction_pointer(fregs) \
20 instruction_pointer(&arch_ftrace_regs(fregs)->regs)
21 #define ftrace_regs_get_argument(fregs, n) \
22 regs_get_kernel_argument(&arch_ftrace_regs(fregs)->regs, n)
23 #define ftrace_regs_get_stack_pointer(fregs) \
24 kernel_stack_pointer(&arch_ftrace_regs(fregs)->regs)
25 #define ftrace_regs_get_return_value(fregs) \
26 regs_return_value(&arch_ftrace_regs(fregs)->regs)
27 #define ftrace_regs_set_return_value(fregs, ret) \
28 regs_set_return_value(&arch_ftrace_regs(fregs)->regs, ret)
29 #define ftrace_override_function_with_return(fregs) \
30 override_function_with_return(&arch_ftrace_regs(fregs)->regs)
31 #define ftrace_regs_query_register_offset(name) \
32 regs_query_register_offset(name)
34 #endif /* HAVE_ARCH_FTRACE_REGS */
36 #endif /* _LINUX_FTRACE_REGS_H */