| 1 |
/* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 |
/* |
| 3 |
* Copyright (C) 2012 ARM Ltd. |
| 4 |
*/ |
| 5 |
|
| 6 |
#ifndef __ASM_PERF_EVENT_H |
| 7 |
#define __ASM_PERF_EVENT_H |
| 8 |
|
| 9 |
#include <asm/stack_pointer.h> |
| 10 |
#include <asm/ptrace.h> |
| 11 |
|
| 12 |
#ifdef CONFIG_PERF_EVENTS |
| 13 |
#define perf_arch_bpf_user_pt_regs(regs) ®s->user_regs |
| 14 |
#endif |
| 15 |
|
| 16 |
#define perf_arch_fetch_caller_regs(regs, __ip) { \ |
| 17 |
(regs)->pc = (__ip); \ |
| 18 |
(regs)->regs[29] = (unsigned long) __builtin_frame_address(0); \ |
| 19 |
(regs)->sp = current_stack_pointer; \ |
| 20 |
(regs)->pstate = PSR_MODE_EL1h; \ |
| 21 |
} |
| 22 |
|
| 23 |
#endif |