xref: /openbmc/linux/arch/csky/include/asm/perf_event.h (revision 4a075bd4)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
3 
4 #ifndef __ASM_CSKY_PERF_EVENT_H
5 #define __ASM_CSKY_PERF_EVENT_H
6 
7 #include <abi/regdef.h>
8 
9 #define perf_arch_fetch_caller_regs(regs, __ip) { \
10 	(regs)->pc = (__ip); \
11 	regs_fp(regs) = (unsigned long) __builtin_frame_address(0); \
12 	asm volatile("mov %0, sp\n":"=r"((regs)->usp)); \
13 }
14 
15 #endif /* __ASM_PERF_EVENT_ELF_H */
16