1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef _ASM_ALPHA_FTRACE_H 3 #define _ASM_ALPHA_FTRACE_H 4 5 static void *alpha_ftrace_return_address0(void) 6 noinline notrace; 7 static void *alpha_ftrace_return_address0(void) 8 { 9 return __builtin_return_address(0); 10 } 11 12 #define ftrace_return_address0 alpha_ftrace_return_address0() 13 14 #ifdef CONFIG_FRAME_POINTER 15 16 /* 17 * __builtin_return_address() requires a constant integer argument. 18 * Keep this as a macro so the value is seen at the callsite. 19 */ 20 #define ftrace_return_address(n) __builtin_return_address(n) 21 22 #else /* !CONFIG_FRAME_POINTER */ 23 24 #define ftrace_return_address(n) ((void)(n), 0UL) 25 26 #endif /* CONFIG_FRAME_POINTER */ 27 28 #endif /* _ASM_ALPHA_FTRACE_H */ 29