2019-06-03 07:44:50 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2012-03-05 11:49:32 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2012 ARM Ltd.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ASM_PERF_EVENT_H
|
|
|
|
#define __ASM_PERF_EVENT_H
|
|
|
|
|
2016-11-03 20:23:05 +00:00
|
|
|
#include <asm/stack_pointer.h>
|
2017-12-04 10:56:46 +01:00
|
|
|
#include <asm/ptrace.h>
|
2016-11-03 20:23:05 +00:00
|
|
|
|
2015-07-06 12:23:54 +01:00
|
|
|
#ifdef CONFIG_PERF_EVENTS
|
2017-12-04 10:56:46 +01:00
|
|
|
#define perf_arch_bpf_user_pt_regs(regs) ®s->user_regs
|
2013-01-23 16:52:18 +00:00
|
|
|
#endif
|
2012-03-05 11:49:32 +00:00
|
|
|
|
2015-05-10 11:07:40 +00:00
|
|
|
#define perf_arch_fetch_caller_regs(regs, __ip) { \
|
|
|
|
(regs)->pc = (__ip); \
|
|
|
|
(regs)->regs[29] = (unsigned long) __builtin_frame_address(0); \
|
|
|
|
(regs)->sp = current_stack_pointer; \
|
|
|
|
(regs)->pstate = PSR_MODE_EL1h; \
|
|
|
|
}
|
|
|
|
|
2012-03-05 11:49:32 +00:00
|
|
|
#endif
|